Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `onAuthorizedBeforeSubmit` for ApplePay

See original GitHub issue

Is your feature request related to a problem? Please describe. Having access to the apple pay event before submitting is important. Adding an event that isonAuthorizedBeforeSubmit would help solve this so you don’t have to implement it with apple pay without Adyen.

Describe the solution you’d like Add onAuthorizedBeforeSubmit event and execute here:

onPaymentAuthorized: (resolve, reject, event) => {
    if (!!event.payment.token && !!event.payment.token.paymentData) {
        this.setState({ applePayToken: btoa(JSON.stringify(event.payment.token.paymentData)) });

+   if(onAuthorizedBeforeSubmit) {
+      await new Promise((resolve) => onAuthorizedBeforeSubmit(resolve, reject, event));
+  }
    onPaymentAuthorized(resolve, reject, event);

**Describe alternatives you've considered**
Adding the apple pay `event` to the `beforeSubmit` event.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

ribeiroguilhermecommented, May 17, 2022

Glad to hear it worked. Cheers! 👌

aralrocacommented, May 16, 2022

Sorry. I can confirm that your proposal works correctly. Yes, it was a mistake, however, now it’is working fine. Thanks a lot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Payment authorization with Apple Pay
Apple Pay uses the Secure Enclave and Secure Element to secure payment authorization when Apple Pay is used for a purchase.
Read more >
Set up Apple Card Family and add a co-owner and participants
Learn how to share Apple Card with trusted members of your Family Sharing group. You can even co-own the account with one other...
Read more >
Set up Apple Pay
To set up Apple Pay, add a debit, credit, or prepaid card to the Wallet app on your iPhone, Apple Watch, or other...
Read more >
Apple Pay Support
Set up Apple Pay. Add a credit, debit, or prepaid card to your iPhone, iPad, Apple Watch, or Mac. ... View preauthorized payments...
Read more >
Apple Pay security and privacy overview
After your card is approved, your bank, your bank's authorized service provider, or your card issuer creates a device-specific Device Account ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found