Shopify / mobile-buy-sdk-android

Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using their credit card.
MIT License
214 stars 136 forks source link

Google Pay integration #587

Open moesalih opened 5 years ago

moesalih commented 5 years ago

The documentation mentions Google Pay support but only provides information on how to complete a checkout after the Google Pay flow is done: https://github.com/Shopify/mobile-buy-sdk-android#google-pay-checkout-

So I've gone through he Google Pay docs and the last step involves getting the PaymentData from Google Pay: https://developers.google.com/pay/api/android/guides/tutorial#paymentdata

My question is how do we connect those two steps? How do we covert the PaymentData object retrieved from Google Pay to the Storefront.TokenizedPaymentInput required to complete a checkout?

moesalih commented 5 years ago

Any update?

GrossGhost commented 4 years ago

This code from Readme of mobile-buy-sdk-android:

Storefront.TokenizedPaymentInput input = new Storefront.TokenizedPaymentInput(totalPrice, idempotencyKey,
  billingAddressInput, "google_pay", googlePayToken).setIdentifier(paymentToken.publicKeyHash);

but i cant understand what is "paymentToken.publicKeyHash". From GooglePay sdk we get String token only.

Maragues commented 4 years ago

Hi, anyone can shed some light?

I'm also stuck on the publicKeyHash

I don't even know how to get checkoutId, but I guess that's because I'm still new to shopify