@paystack/inline-js 2.11.0-dev.8 → 2.11.0-dev.9
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/dist/inline.js +10 -1
- package/package.json +1 -1
package/dist/inline.js
CHANGED
|
@@ -1312,7 +1312,7 @@ var Inline = function () {
|
|
|
1312
1312
|
|
|
1313
1313
|
var preCheckoutModalCloseButton = getPreCheckoutModalCloseButton(this.preCheckoutModal);
|
|
1314
1314
|
preCheckoutModalCloseButton.onclick = function () {
|
|
1315
|
-
_this2.
|
|
1315
|
+
_this2.closePreCheckoutModalAndCancelTransaction();
|
|
1316
1316
|
};
|
|
1317
1317
|
}
|
|
1318
1318
|
}, {
|
|
@@ -1324,6 +1324,15 @@ var Inline = function () {
|
|
|
1324
1324
|
this.preCheckoutModal = null;
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
1327
|
+
}, {
|
|
1328
|
+
key: 'closePreCheckoutModalAndCancelTransaction',
|
|
1329
|
+
value: function closePreCheckoutModalAndCancelTransaction() {
|
|
1330
|
+
if (this.preCheckoutModal) {
|
|
1331
|
+
this.cancelTransaction();
|
|
1332
|
+
this.checkoutIframe.contentWindow.postMessage('close', '*');
|
|
1333
|
+
this.closePreCheckoutModal();
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1327
1336
|
}, {
|
|
1328
1337
|
key: 'newTransaction',
|
|
1329
1338
|
value: function newTransaction(_ref) {
|