![]() ![]() This sounds like a bug to me.Īs a workaround, you could try updating paymentRequest when handling onPaymentDataChanged. You can pay with a card you saved in Google Pay: If the app or website offers Google Pay as a payment method. Subsequent clicks on the button always displayed the original price and then a silent update. Which leads me to think that the initial value may be cached. ![]() However, for me, it only appeared to show the correct price the first time I clicked the button ( sometimes). A React version is also available if using React. It can be PaymentDataRequestUpdate object, or a promise that resolves the same object.įYI, the JSFiddle uses the Google Pay custom element. The most important thing is that you return something in the onPaymentDataChanged method. TotalPrice: displayItems.reduce((sum, i) => sum + parseFloat(i.price), 0).toFixed(2), ShippingItem.price = shippingOption.price I've put together the following JSFiddle: button.onPaymentDataChanged = paymentData => = ansactionInfo Ĭonst shippingItem = displayItems.find(i => i.label = 'Shipping') Have you got some sample code to show what you've done so far? ![]()
0 Comments
Leave a Reply. |