Skip to content

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

@fresh5447

Description

@fresh5447

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions