@paystack/checkout-js 1.20.0-dev.5 → 1.20.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/checkout.js +13 -5
- package/es/checkout.js +13 -5
- package/lib/checkout.js +13 -5
- package/package.json +1 -1
package/dist/checkout.js
CHANGED
|
@@ -20905,11 +20905,14 @@ var Paystack = (function (exports) {
|
|
|
20905
20905
|
reserve: function reserve(_ref) {
|
|
20906
20906
|
var clientdata = _ref.clientdata,
|
|
20907
20907
|
last4 = _ref.last4,
|
|
20908
|
-
preauthorizationId = _ref.preauthorizationId
|
|
20908
|
+
preauthorizationId = _ref.preauthorizationId,
|
|
20909
|
+
publicKey = _ref.publicKey;
|
|
20909
20910
|
var url = "".concat(configToUse.paystackApiUrl, "preauthorization/reserve");
|
|
20910
20911
|
var language = getLanguage();
|
|
20911
20912
|
|
|
20912
|
-
var headers = _objectSpread2({
|
|
20913
|
+
var headers = _objectSpread2({
|
|
20914
|
+
Authorization: "Bearer ".concat(publicKey)
|
|
20915
|
+
}, language && {
|
|
20913
20916
|
'Accept-Language': language
|
|
20914
20917
|
});
|
|
20915
20918
|
|
|
@@ -21065,17 +21068,21 @@ var Paystack = (function (exports) {
|
|
|
21065
21068
|
_this.card = new Card(params);
|
|
21066
21069
|
});
|
|
21067
21070
|
},
|
|
21068
|
-
reserve: function reserve(
|
|
21071
|
+
reserve: function reserve(_ref) {
|
|
21069
21072
|
var _this2 = this;
|
|
21070
21073
|
|
|
21071
|
-
var
|
|
21074
|
+
var preauthorizationId = _ref.preauthorizationId,
|
|
21075
|
+
publicKey = _ref.publicKey,
|
|
21076
|
+
_ref$customFields = _ref.customFields,
|
|
21077
|
+
customFields = _ref$customFields === void 0 ? {} : _ref$customFields;
|
|
21072
21078
|
// TODO: Log payment method
|
|
21073
21079
|
// https://paystack.atlassian.net/browse/RAILS-3070
|
|
21074
21080
|
return validate(this.card).then(function () {
|
|
21075
21081
|
var chargeParams = {
|
|
21076
21082
|
clientdata: _this2.card.tokenize(),
|
|
21077
21083
|
last4: _this2.card.getLast4(),
|
|
21078
|
-
|
|
21084
|
+
preauthorizationId: preauthorizationId,
|
|
21085
|
+
publicKey: publicKey,
|
|
21079
21086
|
customFields: customFields
|
|
21080
21087
|
};
|
|
21081
21088
|
return CardAPI.reserve(chargeParams).then(function (response) {
|
|
@@ -21203,6 +21210,7 @@ var Paystack = (function (exports) {
|
|
|
21203
21210
|
function PreauthorizationInstance(data) {
|
|
21204
21211
|
_classCallCheck(this, PreauthorizationInstance);
|
|
21205
21212
|
|
|
21213
|
+
this.id = data.id;
|
|
21206
21214
|
this.email = data.email;
|
|
21207
21215
|
this.status = data.status;
|
|
21208
21216
|
this.reference = data.reference;
|
package/es/checkout.js
CHANGED
|
@@ -20902,11 +20902,14 @@ var CardAPI = {
|
|
|
20902
20902
|
reserve: function reserve(_ref) {
|
|
20903
20903
|
var clientdata = _ref.clientdata,
|
|
20904
20904
|
last4 = _ref.last4,
|
|
20905
|
-
preauthorizationId = _ref.preauthorizationId
|
|
20905
|
+
preauthorizationId = _ref.preauthorizationId,
|
|
20906
|
+
publicKey = _ref.publicKey;
|
|
20906
20907
|
var url = "".concat(configToUse.paystackApiUrl, "preauthorization/reserve");
|
|
20907
20908
|
var language = getLanguage();
|
|
20908
20909
|
|
|
20909
|
-
var headers = _objectSpread2({
|
|
20910
|
+
var headers = _objectSpread2({
|
|
20911
|
+
Authorization: "Bearer ".concat(publicKey)
|
|
20912
|
+
}, language && {
|
|
20910
20913
|
'Accept-Language': language
|
|
20911
20914
|
});
|
|
20912
20915
|
|
|
@@ -21062,17 +21065,21 @@ var ReserveCardFunds = {
|
|
|
21062
21065
|
_this.card = new Card(params);
|
|
21063
21066
|
});
|
|
21064
21067
|
},
|
|
21065
|
-
reserve: function reserve(
|
|
21068
|
+
reserve: function reserve(_ref) {
|
|
21066
21069
|
var _this2 = this;
|
|
21067
21070
|
|
|
21068
|
-
var
|
|
21071
|
+
var preauthorizationId = _ref.preauthorizationId,
|
|
21072
|
+
publicKey = _ref.publicKey,
|
|
21073
|
+
_ref$customFields = _ref.customFields,
|
|
21074
|
+
customFields = _ref$customFields === void 0 ? {} : _ref$customFields;
|
|
21069
21075
|
// TODO: Log payment method
|
|
21070
21076
|
// https://paystack.atlassian.net/browse/RAILS-3070
|
|
21071
21077
|
return validate(this.card).then(function () {
|
|
21072
21078
|
var chargeParams = {
|
|
21073
21079
|
clientdata: _this2.card.tokenize(),
|
|
21074
21080
|
last4: _this2.card.getLast4(),
|
|
21075
|
-
|
|
21081
|
+
preauthorizationId: preauthorizationId,
|
|
21082
|
+
publicKey: publicKey,
|
|
21076
21083
|
customFields: customFields
|
|
21077
21084
|
};
|
|
21078
21085
|
return CardAPI.reserve(chargeParams).then(function (response) {
|
|
@@ -21200,6 +21207,7 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
|
|
|
21200
21207
|
function PreauthorizationInstance(data) {
|
|
21201
21208
|
_classCallCheck(this, PreauthorizationInstance);
|
|
21202
21209
|
|
|
21210
|
+
this.id = data.id;
|
|
21203
21211
|
this.email = data.email;
|
|
21204
21212
|
this.status = data.status;
|
|
21205
21213
|
this.reference = data.reference;
|
package/lib/checkout.js
CHANGED
|
@@ -20906,11 +20906,14 @@ var CardAPI = {
|
|
|
20906
20906
|
reserve: function reserve(_ref) {
|
|
20907
20907
|
var clientdata = _ref.clientdata,
|
|
20908
20908
|
last4 = _ref.last4,
|
|
20909
|
-
preauthorizationId = _ref.preauthorizationId
|
|
20909
|
+
preauthorizationId = _ref.preauthorizationId,
|
|
20910
|
+
publicKey = _ref.publicKey;
|
|
20910
20911
|
var url = "".concat(configToUse.paystackApiUrl, "preauthorization/reserve");
|
|
20911
20912
|
var language = getLanguage();
|
|
20912
20913
|
|
|
20913
|
-
var headers = _objectSpread2({
|
|
20914
|
+
var headers = _objectSpread2({
|
|
20915
|
+
Authorization: "Bearer ".concat(publicKey)
|
|
20916
|
+
}, language && {
|
|
20914
20917
|
'Accept-Language': language
|
|
20915
20918
|
});
|
|
20916
20919
|
|
|
@@ -21066,17 +21069,21 @@ var ReserveCardFunds = {
|
|
|
21066
21069
|
_this.card = new Card(params);
|
|
21067
21070
|
});
|
|
21068
21071
|
},
|
|
21069
|
-
reserve: function reserve(
|
|
21072
|
+
reserve: function reserve(_ref) {
|
|
21070
21073
|
var _this2 = this;
|
|
21071
21074
|
|
|
21072
|
-
var
|
|
21075
|
+
var preauthorizationId = _ref.preauthorizationId,
|
|
21076
|
+
publicKey = _ref.publicKey,
|
|
21077
|
+
_ref$customFields = _ref.customFields,
|
|
21078
|
+
customFields = _ref$customFields === void 0 ? {} : _ref$customFields;
|
|
21073
21079
|
// TODO: Log payment method
|
|
21074
21080
|
// https://paystack.atlassian.net/browse/RAILS-3070
|
|
21075
21081
|
return validate(this.card).then(function () {
|
|
21076
21082
|
var chargeParams = {
|
|
21077
21083
|
clientdata: _this2.card.tokenize(),
|
|
21078
21084
|
last4: _this2.card.getLast4(),
|
|
21079
|
-
|
|
21085
|
+
preauthorizationId: preauthorizationId,
|
|
21086
|
+
publicKey: publicKey,
|
|
21080
21087
|
customFields: customFields
|
|
21081
21088
|
};
|
|
21082
21089
|
return CardAPI.reserve(chargeParams).then(function (response) {
|
|
@@ -21204,6 +21211,7 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
|
|
|
21204
21211
|
function PreauthorizationInstance(data) {
|
|
21205
21212
|
_classCallCheck(this, PreauthorizationInstance);
|
|
21206
21213
|
|
|
21214
|
+
this.id = data.id;
|
|
21207
21215
|
this.email = data.email;
|
|
21208
21216
|
this.status = data.status;
|
|
21209
21217
|
this.reference = data.reference;
|