You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to update total price when user adds promo code or use wallet using state but when Apple Pay shows up, price doesn't change !
here is my code:
applePayPressHandler=()=>{
const paymentRequest = new PaymentRequest(
this.METHOD_DATA,
this.state.applePayDetails,
);
paymentRequest.canMakePayments().then((canMakePayment: any) => {
//1- Check if user can make payment
if (canMakePayment) {
paymentRequest.show().then((paymentResponse: any) => {
const { paymentData } = paymentResponse._details;
//2-Check if payment succeeded or failed
if (paymentData == null) {
paymentResponse.complete('fail');
} else {
//API call goes here
paymentResponse.complete('success');
}
});
}
else {
console.log('Cant Make Payment');
}
}).catch((error: any) => {
console.log("Can Make Payments Error", error );
});
}
I am trying to update total price when user adds promo code or use wallet using state but when Apple Pay shows up, price doesn't change !
here is my code:
and here is wallet code:
The text was updated successfully, but these errors were encountered: