@salla.sa/applepay 2.11.78 → 2.11.83

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/applepay",
3
- "version": "2.11.78",
3
+ "version": "2.11.83",
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": "^0.23.0"
28
28
  },
29
- "gitHead": "5ca63f52cf2146c6d6f0280274f56ef7cc45970f"
29
+ "gitHead": "9581fc229e7aa3ae8ce52287d5b63619848b37b0"
30
30
  }
package/src/index.js CHANGED
@@ -510,7 +510,8 @@ window.SallaApplePay = {
510
510
  }))
511
511
  }
512
512
 
513
- if (window.ApplePaySession && ApplePaySession.canMakePayments()) {
513
+ //applePay doesn't allow iframes
514
+ if (window.ApplePaySession && this.self === this.top && ApplePaySession.canMakePayments()) {
514
515
  SallaApplePay.init();
515
516
  } else {
516
517
  // You can hide the Apple Pay button easy with add data-show-if-apple-pay-supported to element like <div data-show-if-apple-pay-supported>