@paystack/inline-js 2.14.0-dev.4 → 2.14.0-dev.6
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 +13 -9
- package/es/inline.js +13 -9
- package/lib/inline.js +13 -9
- package/package.json +1 -1
package/dist/inline.js
CHANGED
|
@@ -1102,6 +1102,14 @@ var PaystackPop = (function () {
|
|
|
1102
1102
|
value: 'language',
|
|
1103
1103
|
required: false,
|
|
1104
1104
|
types: ['string']
|
|
1105
|
+
}, {
|
|
1106
|
+
value: 'connect_account',
|
|
1107
|
+
required: false,
|
|
1108
|
+
types: ['string']
|
|
1109
|
+
}, {
|
|
1110
|
+
value: 'connect_split',
|
|
1111
|
+
required: false,
|
|
1112
|
+
types: ['object']
|
|
1105
1113
|
}];
|
|
1106
1114
|
function validate(args) {
|
|
1107
1115
|
function ValidationError(message, issues) {
|
|
@@ -1448,13 +1456,14 @@ var PaystackPop = (function () {
|
|
|
1448
1456
|
}
|
|
1449
1457
|
};
|
|
1450
1458
|
|
|
1451
|
-
var _excluded$1 = ["language"];
|
|
1459
|
+
var _excluded$1 = ["language", "connect_account"];
|
|
1452
1460
|
var TransactionApi = {
|
|
1453
1461
|
requestInline: function requestInline() {
|
|
1454
1462
|
var inlineTransactionInstance = this;
|
|
1455
1463
|
|
|
1456
1464
|
var _this$urlParameters = this.urlParameters,
|
|
1457
1465
|
language = _this$urlParameters.language,
|
|
1466
|
+
connectAccount = _this$urlParameters.connect_account,
|
|
1458
1467
|
params = _objectWithoutProperties(_this$urlParameters, _excluded$1);
|
|
1459
1468
|
|
|
1460
1469
|
var request;
|
|
@@ -1473,7 +1482,9 @@ var PaystackPop = (function () {
|
|
|
1473
1482
|
request = fetch(new URL('/checkout/request_inline', config.paystackApiUrl).toString(), {
|
|
1474
1483
|
method: 'POST',
|
|
1475
1484
|
body: JSON.stringify(params),
|
|
1476
|
-
headers: headers
|
|
1485
|
+
headers: _objectSpread2(_objectSpread2({}, headers), connectAccount && {
|
|
1486
|
+
'connect-account': connectAccount
|
|
1487
|
+
})
|
|
1477
1488
|
});
|
|
1478
1489
|
}
|
|
1479
1490
|
|
|
@@ -2177,13 +2188,6 @@ var PaystackPop = (function () {
|
|
|
2177
2188
|
|
|
2178
2189
|
if (eventType) {
|
|
2179
2190
|
switch (eventType) {
|
|
2180
|
-
case 'language:changed':
|
|
2181
|
-
window.postMessage({
|
|
2182
|
-
type: 'language:changed',
|
|
2183
|
-
params: actualEvent.language
|
|
2184
|
-
}, '*');
|
|
2185
|
-
break;
|
|
2186
|
-
|
|
2187
2191
|
case 'loaded:checkout':
|
|
2188
2192
|
this.isLoaded = true;
|
|
2189
2193
|
|
package/es/inline.js
CHANGED
|
@@ -1099,6 +1099,14 @@ var allParameters = [{
|
|
|
1099
1099
|
value: 'language',
|
|
1100
1100
|
required: false,
|
|
1101
1101
|
types: ['string']
|
|
1102
|
+
}, {
|
|
1103
|
+
value: 'connect_account',
|
|
1104
|
+
required: false,
|
|
1105
|
+
types: ['string']
|
|
1106
|
+
}, {
|
|
1107
|
+
value: 'connect_split',
|
|
1108
|
+
required: false,
|
|
1109
|
+
types: ['object']
|
|
1102
1110
|
}];
|
|
1103
1111
|
function validate(args) {
|
|
1104
1112
|
function ValidationError(message, issues) {
|
|
@@ -1445,13 +1453,14 @@ var AnalyticsFunctions = {
|
|
|
1445
1453
|
}
|
|
1446
1454
|
};
|
|
1447
1455
|
|
|
1448
|
-
var _excluded$1 = ["language"];
|
|
1456
|
+
var _excluded$1 = ["language", "connect_account"];
|
|
1449
1457
|
var TransactionApi = {
|
|
1450
1458
|
requestInline: function requestInline() {
|
|
1451
1459
|
var inlineTransactionInstance = this;
|
|
1452
1460
|
|
|
1453
1461
|
var _this$urlParameters = this.urlParameters,
|
|
1454
1462
|
language = _this$urlParameters.language,
|
|
1463
|
+
connectAccount = _this$urlParameters.connect_account,
|
|
1455
1464
|
params = _objectWithoutProperties(_this$urlParameters, _excluded$1);
|
|
1456
1465
|
|
|
1457
1466
|
var request;
|
|
@@ -1470,7 +1479,9 @@ var TransactionApi = {
|
|
|
1470
1479
|
request = fetch(new URL('/checkout/request_inline', config.paystackApiUrl).toString(), {
|
|
1471
1480
|
method: 'POST',
|
|
1472
1481
|
body: JSON.stringify(params),
|
|
1473
|
-
headers: headers
|
|
1482
|
+
headers: _objectSpread2(_objectSpread2({}, headers), connectAccount && {
|
|
1483
|
+
'connect-account': connectAccount
|
|
1484
|
+
})
|
|
1474
1485
|
});
|
|
1475
1486
|
}
|
|
1476
1487
|
|
|
@@ -2174,13 +2185,6 @@ var Inline = /*#__PURE__*/function () {
|
|
|
2174
2185
|
|
|
2175
2186
|
if (eventType) {
|
|
2176
2187
|
switch (eventType) {
|
|
2177
|
-
case 'language:changed':
|
|
2178
|
-
window.postMessage({
|
|
2179
|
-
type: 'language:changed',
|
|
2180
|
-
params: actualEvent.language
|
|
2181
|
-
}, '*');
|
|
2182
|
-
break;
|
|
2183
|
-
|
|
2184
2188
|
case 'loaded:checkout':
|
|
2185
2189
|
this.isLoaded = true;
|
|
2186
2190
|
|
package/lib/inline.js
CHANGED
|
@@ -1101,6 +1101,14 @@ var allParameters = [{
|
|
|
1101
1101
|
value: 'language',
|
|
1102
1102
|
required: false,
|
|
1103
1103
|
types: ['string']
|
|
1104
|
+
}, {
|
|
1105
|
+
value: 'connect_account',
|
|
1106
|
+
required: false,
|
|
1107
|
+
types: ['string']
|
|
1108
|
+
}, {
|
|
1109
|
+
value: 'connect_split',
|
|
1110
|
+
required: false,
|
|
1111
|
+
types: ['object']
|
|
1104
1112
|
}];
|
|
1105
1113
|
function validate(args) {
|
|
1106
1114
|
function ValidationError(message, issues) {
|
|
@@ -1447,13 +1455,14 @@ var AnalyticsFunctions = {
|
|
|
1447
1455
|
}
|
|
1448
1456
|
};
|
|
1449
1457
|
|
|
1450
|
-
var _excluded$1 = ["language"];
|
|
1458
|
+
var _excluded$1 = ["language", "connect_account"];
|
|
1451
1459
|
var TransactionApi = {
|
|
1452
1460
|
requestInline: function requestInline() {
|
|
1453
1461
|
var inlineTransactionInstance = this;
|
|
1454
1462
|
|
|
1455
1463
|
var _this$urlParameters = this.urlParameters,
|
|
1456
1464
|
language = _this$urlParameters.language,
|
|
1465
|
+
connectAccount = _this$urlParameters.connect_account,
|
|
1457
1466
|
params = _objectWithoutProperties(_this$urlParameters, _excluded$1);
|
|
1458
1467
|
|
|
1459
1468
|
var request;
|
|
@@ -1472,7 +1481,9 @@ var TransactionApi = {
|
|
|
1472
1481
|
request = fetch(new URL('/checkout/request_inline', config.paystackApiUrl).toString(), {
|
|
1473
1482
|
method: 'POST',
|
|
1474
1483
|
body: JSON.stringify(params),
|
|
1475
|
-
headers: headers
|
|
1484
|
+
headers: _objectSpread2(_objectSpread2({}, headers), connectAccount && {
|
|
1485
|
+
'connect-account': connectAccount
|
|
1486
|
+
})
|
|
1476
1487
|
});
|
|
1477
1488
|
}
|
|
1478
1489
|
|
|
@@ -2176,13 +2187,6 @@ var Inline = /*#__PURE__*/function () {
|
|
|
2176
2187
|
|
|
2177
2188
|
if (eventType) {
|
|
2178
2189
|
switch (eventType) {
|
|
2179
|
-
case 'language:changed':
|
|
2180
|
-
window.postMessage({
|
|
2181
|
-
type: 'language:changed',
|
|
2182
|
-
params: actualEvent.language
|
|
2183
|
-
}, '*');
|
|
2184
|
-
break;
|
|
2185
|
-
|
|
2186
2190
|
case 'loaded:checkout':
|
|
2187
2191
|
this.isLoaded = true;
|
|
2188
2192
|
|