1.0.2 • Published 5 years ago

@demyz/google-payments v1.0.2

Weekly downloads
4
License
ISC
Repository
-
Last release
5 years ago

Google Payments Client

import {
    GooglePayments,
    defaultGooglePaymentsParams,
    loadGooglePaymentsScript,
} from './main';

const params = {
    ...defaultGooglePaymentsParams,
    buttonSelector: document.getElementById('gpay-container'),
}

const main = async () => {

    try {
        await loadGooglePaymentsScript();

        const gPay = new GooglePayments(params);
        await gPay.init();

    } catch(e) {
        console.error(e);
    }

}

main();