-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 error when using createPlatformPayPaymentMethod
for Apple Pay on physical devices
#1236
Comments
Update: we are very occasionally also seeing the message "This transaction approval has already been used to create a token." instead, but regardless it's still always failing in prod. |
Is it possible that you're calling |
@charliecruzan-stripe according to all of our logs we're only calling it once |
Interesting, well it seems from the message that we're getting here, but at that time |
More specifically what seems to be happening is that the first time a user tries to set up apple pay on a physical device through
then each successive time they try to set up the card afterwards they get
I have no idea where the first message is coming from - it doesn't seem to be from code in this repo or in Also wondering given the fact that future calls hit the |
Looking at our Stripe logs, it seems that after completing the apple pay form summoned by
The second token call is what is failing and triggering the error logic. Based on the error message this may be because both token calls are using the same Some request details:
|
Ok yeah so it looks like this is where the issue is: stripe-react-native/ios/ApplePayViewController.swift Lines 18 to 35 in 9a1a163
tl;dr
this line in stripe-ios may be why it's working in sim just fine - it uses a test transaction ID every time in sim, but uses a real I'm.. not really sure where to go from here tbh. Is there a way to directly call |
createPlatformPayPaymentMethod
createPlatformPayPaymentMethod
for Apple Pay on physical devices
createPlatformPayPaymentMethod
for Apple Pay on physical devicescreatePlatformPayPaymentMethod
for Apple Pay on physical devices
the best long-term solution here may just be to move out the
where each one accepts the exact same params, and migrating from the latter to the former is trivial. There doesn't seem to be a situation where one needs both the PaymentMethod & a Token. |
Fix was released in v0.23.0 |
The following code returns a working token in development but in production builds it returns an error saying "The payment has been cancelled":
Visually on iOS calling this opens up the apple pay card selection form, then a success sound plays after authenticating with TouchID, then the form closes itself, but the function itself returns an
error
object whosemessage
field is the above error message.Are we doing something wrong here? As far as we can tell we've set things up correctly with our merchant ID and publishable key in the
StripeProvider
, and the exact same values were working when using tipsi-stripe. Would love pointers here if you have any.Test Devices:
The text was updated successfully, but these errors were encountered: