Apple Pay not showing when .begin() is triggered.

Hi.

I have this issue of apple pay not showing whenever .begin() is triggered. After some debugging, I have found out that applePaySession.oncancel() being called every time I trigger .being(). Any idea what is causing this to happen?

P.S. Trying to implement apple pay on react js.

Answered by wego-payment in 725524022

Gotten it fixed. Problem lies with the line items I have added. It doesn't add up to the total amount and apple pay session have some validation check on it. Had a try catch statement around initialising apple pay session and .begin() and no error is thrown but instead .oncancel() is being trigger.

Accepted Answer

Gotten it fixed. Problem lies with the line items I have added. It doesn't add up to the total amount and apple pay session have some validation check on it. Had a try catch statement around initialising apple pay session and .begin() and no error is thrown but instead .oncancel() is being trigger.

For anyone else who has this problem where the line item solution doesn't solve the problem, make sure your laptop is open and the screen is active. We had ours closed with an external monitor plugged in and it would not work or provide any relevant error messages.

Apple Pay not showing when .begin() is triggered.
 
 
Q