Skip to content

Commit cc3b269

Browse files
Test Apple Pay cross browser support
1 parent 7a62096 commit cc3b269

7 files changed

Lines changed: 31 additions & 33 deletions

File tree

etc/csp_whitelist.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<value id="cashapp" type="host">*.cash.app</value>
1212
<value id="visa" type="host">*.visa.com</value>
1313
<value id="mastercard" type="host">*.mastercard.com</value>
14+
<value id="applepay" type="host">applepay.cdn-apple.com</value>
1415
</values>
1516
</policy>
1617
<policy id="font-src">

view/base/web/css/adyen.css

Lines changed: 25 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

view/base/web/css/adyen.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

view/base/web/js/adyen.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

view/base/web/js/adyen.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

view/frontend/web/js/view/payment/method-renderer/adyen-applepay-method.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ define(
4040
}
4141

4242
return applePayConfiguration;
43-
},
44-
checkBrowserCompatibility: function () {
45-
// Disables Apple Pay for non-Safari browsers
46-
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
4743
}
4844
})
4945
}

view/frontend/web/js/view/payment/method-renderer/adyen-pm-method.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ define(
9797
},
9898

9999
enablePaymentMethod: function (paymentMethodsResponse) {
100-
if (this.checkBrowserCompatibility() && !!paymentMethodsResponse.paymentMethodsResponse) {
100+
if (!!paymentMethodsResponse.paymentMethodsResponse) {
101101
this.paymentMethod(
102102
adyenPaymentService.getPaymentMethodFromResponse(
103103
this.getTxVariant(),
@@ -505,10 +505,6 @@ define(
505505
};
506506
},
507507

508-
checkBrowserCompatibility: function () {
509-
return true;
510-
},
511-
512508
getPaymentMethodComponent: function () {
513509
return this.paymentComponent;
514510
}

0 commit comments

Comments
 (0)