#ademuk_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1334503880431763527
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
See screen capture
Anything in particular?
Hey! Taking over for my colleague. Let me catch up.
Let me try and reproduce on the official example:
https://github.com/stripe/stripe-react-native/blob/master/example/src/screens/CustomerSheetScreen.tsx
Ok this is expected.
Because the CustomerSheet.retrievePaymentOptionSelection() return paymentOption (Apple Pay) and not a PaymentMethod.
It seems like you need to implement the Apple Pay call later...
Try running the official sample I shared and you'll understand the flow
Could you link me to the specific line where apple pay is implemented?
In that screen there is no implementation to Apple Pay, you can refere to this screen instead:
https://github.com/stripe/stripe-react-native/blob/master/example/src/screens/ApplePayScreen.tsx
The Customer sheet will respond just saying that the customer have chosen Apple Pay.
Ok, I was under the impression CustomerSheet would prompt the user for apple pay. But this must be implemented separately?
But this must be implemented separately?
Yes.
When I select apple pay within CustomerSheet, I'm getting paymentMethod: undefined, and a payment option with {image: <image>, label: "Apple Pay"}. Am I expected to look at the label, to determine whether to prompt user for apple pay?
Correct yes.
The function createPlatformPayPaymentMethod looks almost suitable.
https://github.com/stripe/stripe-react-native/blob/master/example/src/screens/ApplePayScreen.tsx#L251
But what should be provided for the "cartItems" property, if we are only looking to add a payment method?
The end game here is to save/setup a wallet payment method yes?
Correct
Got it, thank you!
this flow of customer sheet -> select apple pay feels wrong
after the user selects apple pay from customer sheet, we should present them with the payment sheet?
Wouldn't it make sense for the add new payment method view (from customer sheet) to include an apple pay option?
Yes, if you're saving a new card/payment method. The Customer Sheet is purely for managing existing payment methods