@paystack/checkout-js 1.51.0-dev.7 → 1.51.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/checkout.js +13 -18
- package/es/checkout.js +13 -18
- package/lib/checkout.js +13 -18
- package/package.json +1 -1
package/dist/checkout.js
CHANGED
|
@@ -13431,17 +13431,20 @@ var Paystack = (function (exports) {
|
|
|
13431
13431
|
}
|
|
13432
13432
|
};
|
|
13433
13433
|
|
|
13434
|
+
var buildHeaders = function buildHeaders(publicKey) {
|
|
13435
|
+
var language = getLanguage();
|
|
13436
|
+
return _objectSpread2({
|
|
13437
|
+
Authorization: "Bearer ".concat(publicKey)
|
|
13438
|
+
}, language && {
|
|
13439
|
+
'Accept-Language': language
|
|
13440
|
+
});
|
|
13441
|
+
};
|
|
13434
13442
|
var PayPalAPI = {
|
|
13435
13443
|
createOrder: function createOrder(_ref) {
|
|
13436
13444
|
var publicKey = _ref.publicKey,
|
|
13437
13445
|
transactionId = _ref.transactionId;
|
|
13438
13446
|
var url = new URL("paypal/".concat(transactionId, "/create"), configToUse.paystackApiUrl).toString();
|
|
13439
|
-
var
|
|
13440
|
-
var headers = _objectSpread2({
|
|
13441
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
13442
|
-
}, language && {
|
|
13443
|
-
'Accept-Language': language
|
|
13444
|
-
});
|
|
13447
|
+
var headers = buildHeaders(publicKey);
|
|
13445
13448
|
return axiosInstance.post(url, null, {
|
|
13446
13449
|
headers: headers
|
|
13447
13450
|
}).then(function (response) {
|
|
@@ -13452,12 +13455,7 @@ var Paystack = (function (exports) {
|
|
|
13452
13455
|
var publicKey = _ref2.publicKey,
|
|
13453
13456
|
transactionId = _ref2.transactionId;
|
|
13454
13457
|
var url = new URL("paypal/".concat(transactionId, "/capture"), configToUse.paystackApiUrl).toString();
|
|
13455
|
-
var
|
|
13456
|
-
var headers = _objectSpread2({
|
|
13457
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
13458
|
-
}, language && {
|
|
13459
|
-
'Accept-Language': language
|
|
13460
|
-
});
|
|
13458
|
+
var headers = buildHeaders(publicKey);
|
|
13461
13459
|
return axiosInstance.post(url, null, {
|
|
13462
13460
|
headers: headers
|
|
13463
13461
|
}).then(function (response) {
|
|
@@ -13468,12 +13466,7 @@ var Paystack = (function (exports) {
|
|
|
13468
13466
|
var publicKey = _ref3.publicKey,
|
|
13469
13467
|
transactionId = _ref3.transactionId;
|
|
13470
13468
|
var url = new URL("paypal/config?transaction=".concat(transactionId), configToUse.paystackApiUrl).toString();
|
|
13471
|
-
var
|
|
13472
|
-
var headers = _objectSpread2({
|
|
13473
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
13474
|
-
}, language && {
|
|
13475
|
-
'Accept-Language': language
|
|
13476
|
-
});
|
|
13469
|
+
var headers = buildHeaders(publicKey);
|
|
13477
13470
|
return axiosInstance.get(url, {
|
|
13478
13471
|
headers: headers
|
|
13479
13472
|
}).then(function (response) {
|
|
@@ -22635,7 +22628,9 @@ var Paystack = (function (exports) {
|
|
|
22635
22628
|
this.qr = {};
|
|
22636
22629
|
this.directDebit = {};
|
|
22637
22630
|
this.deviceFingerprint = data.deviceFingerprint || null;
|
|
22631
|
+
// TODO: remove this.customer
|
|
22638
22632
|
this.customer = data.customer;
|
|
22633
|
+
this.customerCode = data.customer_code;
|
|
22639
22634
|
this.custom_filters = data.custom_filters || null;
|
|
22640
22635
|
this.isCharging = false;
|
|
22641
22636
|
this.isListening = false;
|
package/es/checkout.js
CHANGED
|
@@ -13428,17 +13428,20 @@ var ApplePayCharge = {
|
|
|
13428
13428
|
}
|
|
13429
13429
|
};
|
|
13430
13430
|
|
|
13431
|
+
var buildHeaders = function buildHeaders(publicKey) {
|
|
13432
|
+
var language = getLanguage();
|
|
13433
|
+
return _objectSpread2({
|
|
13434
|
+
Authorization: "Bearer ".concat(publicKey)
|
|
13435
|
+
}, language && {
|
|
13436
|
+
'Accept-Language': language
|
|
13437
|
+
});
|
|
13438
|
+
};
|
|
13431
13439
|
var PayPalAPI = {
|
|
13432
13440
|
createOrder: function createOrder(_ref) {
|
|
13433
13441
|
var publicKey = _ref.publicKey,
|
|
13434
13442
|
transactionId = _ref.transactionId;
|
|
13435
13443
|
var url = new URL("paypal/".concat(transactionId, "/create"), configToUse.paystackApiUrl).toString();
|
|
13436
|
-
var
|
|
13437
|
-
var headers = _objectSpread2({
|
|
13438
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
13439
|
-
}, language && {
|
|
13440
|
-
'Accept-Language': language
|
|
13441
|
-
});
|
|
13444
|
+
var headers = buildHeaders(publicKey);
|
|
13442
13445
|
return axiosInstance.post(url, null, {
|
|
13443
13446
|
headers: headers
|
|
13444
13447
|
}).then(function (response) {
|
|
@@ -13449,12 +13452,7 @@ var PayPalAPI = {
|
|
|
13449
13452
|
var publicKey = _ref2.publicKey,
|
|
13450
13453
|
transactionId = _ref2.transactionId;
|
|
13451
13454
|
var url = new URL("paypal/".concat(transactionId, "/capture"), configToUse.paystackApiUrl).toString();
|
|
13452
|
-
var
|
|
13453
|
-
var headers = _objectSpread2({
|
|
13454
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
13455
|
-
}, language && {
|
|
13456
|
-
'Accept-Language': language
|
|
13457
|
-
});
|
|
13455
|
+
var headers = buildHeaders(publicKey);
|
|
13458
13456
|
return axiosInstance.post(url, null, {
|
|
13459
13457
|
headers: headers
|
|
13460
13458
|
}).then(function (response) {
|
|
@@ -13465,12 +13463,7 @@ var PayPalAPI = {
|
|
|
13465
13463
|
var publicKey = _ref3.publicKey,
|
|
13466
13464
|
transactionId = _ref3.transactionId;
|
|
13467
13465
|
var url = new URL("paypal/config?transaction=".concat(transactionId), configToUse.paystackApiUrl).toString();
|
|
13468
|
-
var
|
|
13469
|
-
var headers = _objectSpread2({
|
|
13470
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
13471
|
-
}, language && {
|
|
13472
|
-
'Accept-Language': language
|
|
13473
|
-
});
|
|
13466
|
+
var headers = buildHeaders(publicKey);
|
|
13474
13467
|
return axiosInstance.get(url, {
|
|
13475
13468
|
headers: headers
|
|
13476
13469
|
}).then(function (response) {
|
|
@@ -22632,7 +22625,9 @@ var TransactionInstance = /*#__PURE__*/function () {
|
|
|
22632
22625
|
this.qr = {};
|
|
22633
22626
|
this.directDebit = {};
|
|
22634
22627
|
this.deviceFingerprint = data.deviceFingerprint || null;
|
|
22628
|
+
// TODO: remove this.customer
|
|
22635
22629
|
this.customer = data.customer;
|
|
22630
|
+
this.customerCode = data.customer_code;
|
|
22636
22631
|
this.custom_filters = data.custom_filters || null;
|
|
22637
22632
|
this.isCharging = false;
|
|
22638
22633
|
this.isListening = false;
|
package/lib/checkout.js
CHANGED
|
@@ -13432,17 +13432,20 @@ var ApplePayCharge = {
|
|
|
13432
13432
|
}
|
|
13433
13433
|
};
|
|
13434
13434
|
|
|
13435
|
+
var buildHeaders = function buildHeaders(publicKey) {
|
|
13436
|
+
var language = getLanguage();
|
|
13437
|
+
return _objectSpread2({
|
|
13438
|
+
Authorization: "Bearer ".concat(publicKey)
|
|
13439
|
+
}, language && {
|
|
13440
|
+
'Accept-Language': language
|
|
13441
|
+
});
|
|
13442
|
+
};
|
|
13435
13443
|
var PayPalAPI = {
|
|
13436
13444
|
createOrder: function createOrder(_ref) {
|
|
13437
13445
|
var publicKey = _ref.publicKey,
|
|
13438
13446
|
transactionId = _ref.transactionId;
|
|
13439
13447
|
var url = new URL("paypal/".concat(transactionId, "/create"), configToUse.paystackApiUrl).toString();
|
|
13440
|
-
var
|
|
13441
|
-
var headers = _objectSpread2({
|
|
13442
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
13443
|
-
}, language && {
|
|
13444
|
-
'Accept-Language': language
|
|
13445
|
-
});
|
|
13448
|
+
var headers = buildHeaders(publicKey);
|
|
13446
13449
|
return axiosInstance.post(url, null, {
|
|
13447
13450
|
headers: headers
|
|
13448
13451
|
}).then(function (response) {
|
|
@@ -13453,12 +13456,7 @@ var PayPalAPI = {
|
|
|
13453
13456
|
var publicKey = _ref2.publicKey,
|
|
13454
13457
|
transactionId = _ref2.transactionId;
|
|
13455
13458
|
var url = new URL("paypal/".concat(transactionId, "/capture"), configToUse.paystackApiUrl).toString();
|
|
13456
|
-
var
|
|
13457
|
-
var headers = _objectSpread2({
|
|
13458
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
13459
|
-
}, language && {
|
|
13460
|
-
'Accept-Language': language
|
|
13461
|
-
});
|
|
13459
|
+
var headers = buildHeaders(publicKey);
|
|
13462
13460
|
return axiosInstance.post(url, null, {
|
|
13463
13461
|
headers: headers
|
|
13464
13462
|
}).then(function (response) {
|
|
@@ -13469,12 +13467,7 @@ var PayPalAPI = {
|
|
|
13469
13467
|
var publicKey = _ref3.publicKey,
|
|
13470
13468
|
transactionId = _ref3.transactionId;
|
|
13471
13469
|
var url = new URL("paypal/config?transaction=".concat(transactionId), configToUse.paystackApiUrl).toString();
|
|
13472
|
-
var
|
|
13473
|
-
var headers = _objectSpread2({
|
|
13474
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
13475
|
-
}, language && {
|
|
13476
|
-
'Accept-Language': language
|
|
13477
|
-
});
|
|
13470
|
+
var headers = buildHeaders(publicKey);
|
|
13478
13471
|
return axiosInstance.get(url, {
|
|
13479
13472
|
headers: headers
|
|
13480
13473
|
}).then(function (response) {
|
|
@@ -22636,7 +22629,9 @@ var TransactionInstance = /*#__PURE__*/function () {
|
|
|
22636
22629
|
this.qr = {};
|
|
22637
22630
|
this.directDebit = {};
|
|
22638
22631
|
this.deviceFingerprint = data.deviceFingerprint || null;
|
|
22632
|
+
// TODO: remove this.customer
|
|
22639
22633
|
this.customer = data.customer;
|
|
22634
|
+
this.customerCode = data.customer_code;
|
|
22640
22635
|
this.custom_filters = data.custom_filters || null;
|
|
22641
22636
|
this.isCharging = false;
|
|
22642
22637
|
this.isListening = false;
|