Add logic of apple to session, validation and shipping

This commit is contained in:
carmenmaymo 2023-08-31 16:43:40 +02:00
parent 63ab1e383d
commit 7394c809b7
No known key found for this signature in database
GPG key ID: 6023F686B0F3102E
4 changed files with 306 additions and 123 deletions

View file

@ -33,25 +33,23 @@ import ApplepayManager from "./ApplepayManager";
let paypalLoaded = false;
let applePayLoaded = false;
/* const tryToBoot = () => {
const tryToBoot = () => {
if (!bootstrapped && paypalLoaded && applePayLoaded) {
console.log('Trying to bootstrap')
bootstrapped = true;
bootstrap();
}
}*/
}
// Load ApplePay SDK
/*loadCustomScript({ url: buttonConfig.sdk_url }).then(() => {
console.log('ApplePay SDK loaded', buttonConfig.sdk_url)
loadCustomScript({ url: buttonConfig.sdk_url }).then(() => {
applePayLoaded = true;
//tryToBoot();
});*/
tryToBoot();
});
// Load PayPal
loadPaypalScript(ppcpConfig, () => {
paypalLoaded = true;
//tryToBoot();
tryToBoot();
});
},
);