Add GooglePay validations

This commit is contained in:
Pedro Silva 2023-08-31 17:38:23 +01:00
parent dc9eb96d99
commit 0ac4089bec
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
6 changed files with 85 additions and 37 deletions

View file

@ -29,7 +29,8 @@ class GooglepayManager {
init() {
(async () => {
await this.config();
// Gets GooglePay configuration of the PayPal merchant.
this.googlePayConfig = await paypal.Googlepay().config();
for (const button of this.buttons) {
button.init(this.googlePayConfig);
@ -37,15 +38,6 @@ class GooglepayManager {
})();
}
/**
* Gets GooglePay configuration of the PayPal merchant.
* @returns {Promise<null>}
*/
async config() {
this.googlePayConfig = await paypal.Googlepay().config();
return this.googlePayConfig;
}
}
export default GooglepayManager;