checkout-sdk-js icon indicating copy to clipboard operation
checkout-sdk-js copied to clipboard

Google Pay: getGooglePayClient -> `Cannot read properties of undefined (reading 'api')`

Open fresh5447 opened this issue 3 years ago • 2 comments

I am trying to initialize CyberSource : GooglePay and receive the following errors:

Screenshot 2023-02-20 at 11 19 30 AM Screenshot 2023-02-20 at 11 19 19 AM

Here is a snapshot of the payment method I am referring to:

Screenshot 2023-02-20 at 11 22 09 AM

Here are the options I initialize the method with, which seem to be aligned with the docs: https://github.com/bigcommerce/checkout-sdk-js/blob/master/docs/interfaces/GooglePayPaymentInitializeOptions.md

                    const options = {
                        methodId: 'googlepaycybersourcev2',
                        googlepaycybersourcev2: {
                            walletButton: 'checkoutButton--googlepaycybersourcev2',
                            onPaymentSelect: () => console.log("payment select"),
                            onError: (error) => {
                                console.log("googlepaycybersourcev2", error)
                            },
                        },
                    }

                    service.initializePayment(options);

Currently running stencil-cli 6.0.0 and Checkout-SDK version 1.183.0

fresh5447 avatar Feb 20 '23 18:02 fresh5447

Hey @fresh5447 SDK's current version is 1.351.0, have you tried updating to latest version?

animesh1987 avatar Feb 20 '23 22:02 animesh1987

@fresh5447 was this resolved by upgrading the SDK version?

bc-0dp avatar Feb 16 '24 16:02 bc-0dp