Create an Express Checkout Element

266 Views Asked by At

I have some issues with expressCheckout APIs. After I mount the element and receive the ready event, the event does not have any method available.

    element.on('ready', function (event) {
        becameReady = true;
        showHidePlaceholder(0);
        if (event.availablePaymentMethods) {
            //
        }

The event.availablePaymentMethods is undefined. No error, only the event.availablePaymentMethods didn't return any payment method. Google Pay is active. I have two applications which i'm working on. Same code on both, same stripe account . In one, the GPay displays with no issue in the 'ready' event I get the google-pay as the available payment method.

On the other, the even.availablepaymentMethods is undefined. so it's not the account nor the code or the browser. how can I find out what the issue is?

Source: https://stripe.com/docs/elements/express-checkout-element

I'm not quite sure if it's the becameReady = true; that's triggering this. But again, it's working on my other application. What's the becameReady = true; for?

0

There are 0 best solutions below