#vm1172

1 messages · Page 1 of 1 (latest)

severe salmonBOT
misty mason
#

Hi đź‘‹

I'm not going to be able to reivew a previous thread, can you summarize the discussion?

solemn hedge
#

sure, I was facing this error inside the Simulator when testing out my Apple Pay integration using Expo Go

Stripe Apple Pay Error {"code": "Failed", "declineCode": null, "localizedMessage": "The data couldn’t be read because it isn’t in the correct format.", "message": "The data couldn’t be read because it isn’t in the correct format.", "stripeErrorCode": null, "type": null}

Bismarck suggested to deploy the app and 'build' it since the Expo documentation [1] suggested that Apple Pay is not supported in Expo Go.

I made the build and am now receiving this error on TestFlight

Failed: There was an unexpected error - please try again in a few seconds

[1] - https://docs.expo.dev/versions/latest/sdk/stripe/#apple-pay

misty mason
solemn hedge
#
invalid_request_error
We were unable to decrypt your request. Please make sure you've generated and uploaded your Apple Pay certificate at https://dashboard.stripe.com/settings/payments/apple_pay.
#

thing is, we've followed all instructions to add iOS Certificates <> Stripe integrations

#

am I missing something?

misty mason
solemn hedge
#

yes, one second

#

req_8jfms40ELKobpb

misty mason
#

Thanks, taking a look.

#

Okay I can see the ApplePay cert in your dashboard

solemn hedge
#

I just added a new one right now

#

should it resolve by now?

#

I can try testing

#

it still failing for me

misty mason
#

Sure I do see that was added just now.

#

Can you share the latest request that failed

#

?

solemn hedge
#

req_DshOUbIhextUwF

misty mason
#

Okay so the error message seems to indicate that we don't have all the information to decrypt the PKToken sent by Apple Pay.

#

How did you go through the steps to create the ApplePay Certificate?

#

Did you use Stripe to create the Certificat Signing Request (CSR)?

solemn hedge
#

yes and then I uploaded it to Apple Developer Certificates

#

hi

misty mason
#

Hi yes we are looking into this but it's taking some time

solemn hedge
#

all good thank you

misty mason
#

Okay have you configured the certificate for your project in XCode?

solemn hedge
misty mason
#

I know it's an RN project but it will have a XCode workspace file were you still need to add your merchant iD

solemn hedge
#

yes, let me check my plist right now

misty mason
#

And that code matches the merchant ID for that certificate?

solemn hedge
#

sorry give me a few minutes, ill just double check this and get back to you

misty mason
#

Okay because this error is either the wrong certificate is being used, or the wrong merchant ID is being used. The request is correct as far as Stripe is concerned but ApplePay is throwing an error.

solemn hedge
#

im building the xcode project right now, will need 10 minutes or so

misty mason
#

Okay so it looks like you have two Apple Pay certificates for payment processing using the same merchant ID. That could be causing the issue and why the Merchant ID is showing up a red in XCode

solemn hedge
#

I can revoke the old one right now and try again. will that require a new rebuild?

misty mason
#

Unfortunately I'm not sure. We can try without for now

solemn hedge
misty mason
#

Yes those are the directions you should follow here

severe salmonBOT
solemn hedge
#

so it looks like I'll have to build a new app to test this

#

its not currently working out of the gate

formal raft
#

Hello! I'm taking over and catching up...

#

Are you just working on this right now, or do you have a question?