#J Reitz-Apple Pay
1 messages · Page 1 of 1 (latest)
@blazing veldt this is a HTML page in a WebView? What type of WebView is it? WkWebview/SFSafariViewController etc?
This is a view from my react-native app simulated from Xcode. I am not sure where I check what type of WebView it is, how do I check that?
oh ok
why aren't you using our react-native library instead of having your payment page be a non-native webpage in a view in the app? https://github.com/stripe/stripe-react-native
oh ok, hmm
in any case if Apple Pay is not appearing on your physical device you must not have it set up correctly
are you logged into your Apple account with live cards in your wallet?
Yupp I am logged in on my phone
But from the app side, there shouldn't be an issue as it works on the simulator?
yes
Could it be a permission issue? That the phone doesn't allow the app to retrieve if Apple Pay is supported or not?
it could be! there's a few things you can test, like do any other apps you use support Apple Pay and work on your device? Or if you visit https://stripe-payments-demo.appspot.com/ in Safari, does Apple Pay appear there?
Because my "fear" is that isApplePaySupported is always "null"
Yupp it appears there, no problem
I am also using Apple Pay every day so I don't think that's the issue
How does isApplePaySupported get set?
the specific code is at https://github.com/stripe/stripe-ios/blob/fabd7ebe/Stripe/StripeAPI.swift#L76-L97 if you're curious
but it's mostly a call into a native function in Apple's SDKs (https://developer.apple.com/documentation/passkit/pkpaymentauthorizationcontroller/1649461-canmakepayments)
Yeah got it, I mean if I know that it does work on my device, just for testing purposes, should be able to remove the criteria of that boolean in order to present the button and trigger the rest of the functions
Yeah that worked but then it says it's not supported on the device
so maybe check that you have valid cards(they have to be Visa/Mastercard cards) in your wallet; and that you've set a merchant identifier https://stripe.com/docs/apple-pay?platform=react-native#set-merchantid and that you have the capability enabled in Xcode
ahhh I think I know why, this merchant.identifier is not linked to my personal phone
I mean I have set the merchant ID, but maybe the wallet doesn't contain any of my current cards registered on my phone?
Actually, I think it's the capability issue
The ID is not enabled there
yeah that would likely be the issue!
but yeah to test this on a physical device you need an Apple Developer account and to create a Payment Processing certificate and upload it to Stripe and so on.
sorry, wasn't clear how much of that you've done. I've also never done this process on React Native myself(only in a native iOS app), but it's on my todo list!
Yeah I have all that, I just need to add it to my xcode 🙂
I will get back to you with the results! At least now I know it's not an issue with the code which is always nice
yep if it works in a simulator it should work at a functional code level, it's just the 'metadata' around actually deploying the app that can cause the problem