diff --git a/modules/ppcp-googlepay/resources/js/GooglepayButton.js b/modules/ppcp-googlepay/resources/js/GooglepayButton.js index d518c1850..d8a910f34 100644 --- a/modules/ppcp-googlepay/resources/js/GooglepayButton.js +++ b/modules/ppcp-googlepay/resources/js/GooglepayButton.js @@ -573,16 +573,18 @@ class GooglepayButton extends PaymentButton { }; const checkPayPalApproval = async ( orderId ) => { + const confirmationData = { + orderId, + paymentMethodData: paymentData.paymentMethodData, + }; + const confirmOrderResponse = await widgetBuilder.paypal .Googlepay() - .confirmOrder( { - orderId, - paymentMethodData: paymentData.paymentMethodData, - } ); + .confirmOrder( confirmationData ); this.log( 'confirmOrder', confirmOrderResponse ); - return 'APPROVE' === confirmOrderResponse?.status; + return 'APPROVED' === confirmOrderResponse?.status; }; const approveOrderServerSide = async ( orderID ) => {