@salla.sa/applepay 3.0.14 → 3.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/utils.js +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salla.sa/applepay",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.16",
|
|
4
4
|
"description": "Salla Apple Pay light",
|
|
5
5
|
"main": "dist/app.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"axios": "^1.10.0"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "af738e29f688014ca3855c395acb99c821019b32"
|
|
30
30
|
}
|
package/src/utils.js
CHANGED
|
@@ -34,7 +34,7 @@ export async function mutateShippingContact(SallaApplePay, shippingContact, isAu
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
if (isAuthorized) {
|
|
37
|
-
if (isGuestCheckout()) {
|
|
37
|
+
if (isGuestCheckout(SallaApplePay)) {
|
|
38
38
|
|
|
39
39
|
if (
|
|
40
40
|
!shippingContact.emailAddress ||
|
|
@@ -180,8 +180,9 @@ export async function mutateShippingContact(SallaApplePay, shippingContact, isAu
|
|
|
180
180
|
);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
// the caller passes guestContactSelected only when it decided on guest checkout (same signal as the QR flow)
|
|
184
|
+
function isGuestCheckout(SallaApplePay) {
|
|
185
|
+
return salla.config.isGuest() && !!SallaApplePay.detail?.guestContactSelected;
|
|
185
186
|
}
|
|
186
187
|
|
|
187
188
|
/**
|