FROM CACHE - en_header

Apple Pay payment won't complete

Solved
DanielCamargo
New Member
2 1 1

Hi, 

 

I've implemented the apple pay payment on my app by using the mobileBuySDK.

Also, I've created the merchant id on apple's site, I created the certificate, the sandbox user and everything else.

 

On my device, I'm using a sandbox user and on my store, on Shopify, I enabled the test mode payment.

 

When I try to do the payment on my device it is generating the applePayToken, like this:

 

{"version":"EC_v1","data":"SFDK/WIiPImf+UM/...","header":{"ephemeralPublicKey":"...","publicKeyHash":"...,"transactionId":"b56897dcdf79d8305faed5fd8081db54b9128d44562a707a8ee134f14d3ee9f0"}}

 also, it generates the  idempotencyToken, something like:

 

FDB12645-...

The method  didAuthorizePayment is returning the PayAuthorization token. But when I try to complete the checkout, the last step, it keeps saying:

payment Optional(<Payment: ["creditCard": <null>, 
"errorMessage": There was an issue processing your payment. Try again or use a different payment method.,
"test": 0, "amountV2": { amount = "312.22"; currencyCode = USD; }, "id": ..., "__typename": Payment, "ready": 1, "checkout": { ... }]>)

At the payment object shouldn’t the `test` be `1`?

 

Is it the expected behavior? Like, is there a way I can test the Apple Pay on Shopify? By using the SDK?

 

Thanks in advance

Accepted Solution (1)

Accepted Solutions
DanielCamargo
New Member
2 1 1

This is an accepted solution.

I figured out I should use the cert generated by using Shopify's signature

 

To enable Apple Pay for your app:

 

  1. From your Shopify admin, go to Apps.

  2. Click Manage private apps.

  3. Click the name of your app.

  4. In the Storefront API section, click Configure Mobile Buy SDK settings (optional).

  5. In the Mobile Buy SDK (iOS) section, click Enable.

  6. Click Download CSR.

  7. Follow the instructions to generate your Apple Pay certificate, then click Next.

  8. Click Upload certificate and select the certificate you downloaded.

View solution in original post

Replies 2 (2)
DanielCamargo
New Member
2 1 1

This is an accepted solution.

I figured out I should use the cert generated by using Shopify's signature

 

To enable Apple Pay for your app:

 

  1. From your Shopify admin, go to Apps.

  2. Click Manage private apps.

  3. Click the name of your app.

  4. In the Storefront API section, click Configure Mobile Buy SDK settings (optional).

  5. In the Mobile Buy SDK (iOS) section, click Enable.

  6. Click Download CSR.

  7. Follow the instructions to generate your Apple Pay certificate, then click Next.

  8. Click Upload certificate and select the certificate you downloaded.

unathi-dev
New Member
3 0 0

Hi @DanielCamargo  I am facing the same issue. I've already uploaded the right certificate to the shopify but apple pay is not working. Is there any other position I could miss?