capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
https://capacitor-community-stripe.netlify.app/
MIT License
192 stars 77 forks source link

Question: How to get the billing details out of Apple Pay / Google Pay? #243

Closed mariusbolik closed 1 year ago

mariusbolik commented 1 year ago

Hello, thank you for the awesome Plugin! Is there a way to receive the billing information after payment, so I can create an account for the user on my backend?

mariusbolik commented 1 year ago

The data is incomplete. Address and name are missing. The plugin capacitor-plugin-applepay also return the full address. So it should be possible for the stripe plugin.

rdlabo commented 1 year ago

@mariusbolik Thanks for issue. You can set field at Apple Pay:

We prepare requiredShippingContactFields for get user information. Please pass by method of CreateApplePayOption. https://github.com/capacitor-community/stripe/blob/master/ios/Plugin/ApplePay/ApplePayExecutor.swift#L49-L67

Please try this.

But not implement to get Google Pay's shippingAddress. I shall challenge you to implement it in the near future. Thanks.

rdlabo commented 1 year ago

Reference: https://developers.google.com/pay/api/web/guides/tutorial?hl=ja#load

EdByrnee commented 1 year ago

The data is incomplete. Address and name are missing. The plugin capacitor-plugin-applepay also return the full address. So it should be possible for the stripe plugin.

Did you manage to find a solution for this?

Are we subscribing to the correct event? Are the shipping details only available after Authorization (apple pay)?

krisloekkegaard commented 1 year ago

I created PR #280 which should solve this. It's working for our use case (we get the email address and phone number from Google Pay users on Android), but let me know if anyone has issues using it. We are running against a fork, but would love to get back on the official package if this is merged 🤞

rdlabo commented 1 year ago

This Issue is closed due to a long period of inactivity. Please create a new Issue if necessary.