question

jacobnarayan avatar image
jacobnarayan asked pepkoakrapovik sent

Google Payment Request Button for iFrame not Working

// Create paymentRequestButton & mount to <div> container
const paymentRequestButton = elements.create('PAYMENT_REQUEST_BUTTON', {
  paymentReqData
 });

paymentRequestButton.mount('#payment-request-button');

// Handle validation errors after tokenization
paymentRequestButton.addEventListener('paymentMethod', function(tokenData) {
  console.log(tokenData);
});


I am following the documentation for the iFrame and using the Google Pay button like this. The Button renders fine and I can select a card. When I submit payment the event listener fires and there is no token data at all it's just an empty object.

Is this just the behavior when using sandbox keys? Will it provide a card token similar the tokenized card if you enter your details that way?


ecommerce
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community