Skip to content
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

Changing or Editing Shipping info in Apple Pay trigger processing and results in "Abort Error" #358

Open
mkekovic opened this issue Aug 11, 2022 · 0 comments

Comments

@mkekovic
Copy link

mkekovic commented Aug 11, 2022

Hello,

I am using react native payments on ios platform and my implementation looks like this.

pr = new PaymentRequest(appConfigValues?.apple_pay?.apple_pay_methods_data, DETAILS, { ...appConfigValues?.apple_pay?.apple_pay_options, ...shippingRequired });
    pr.canMakePayments()
      .then(canMakePayment => {
        if (canMakePayment) {
          pr.show()
            .then((paymentResponse: any) => {
              // ommitted for simplicity 
            })
            .catch((err: any) => {
              pr = new PaymentRequest(appConfigValues?.apple_pay?.apple_pay_methods_data, DETAILS, appConfigValues?.apple_pay?.apple_pay_options);
              
              console.log('this is error in apple pay', err);
            });
        } else {
          console.log('Cant Make Payment');
        }
      })
      .catch((error: any) => {
        pr = new PaymentRequest(appConfigValues?.apple_pay?.apple_pay_methods_data, DETAILS, { ...appConfigValues?.apple_pay?.apple_pay_options, ...shippingRequired });
        console.log('Can Make Payments Error', error);
      });

The payment (ApplePay) works with the orders that are not for shipping. When shipping option is added, everything works fine, however, when a user click on apple pay button in the app and changes their shipping address within the apple wallet, or updates the current one, the payment starts processing without users actual approval. Essentially .show() method never resolves and goes to .catch block. This ends up failing with the Abort Error (content of err). Any help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant