mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Add GooglePay validations
This commit is contained in:
parent
dc9eb96d99
commit
0ac4089bec
6 changed files with 85 additions and 37 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue