@paystack/checkout-js 1.28.0-dev.8 → 1.28.0
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/README.md +1 -1
- package/dist/checkout.js +29 -21511
- package/es/checkout.js +26 -96
- package/lib/checkout.js +26 -96
- package/package.json +1 -1
package/es/checkout.js
CHANGED
|
@@ -11568,38 +11568,6 @@ var PayWithTransferAPI = {
|
|
|
11568
11568
|
}).then(function (response) {
|
|
11569
11569
|
return ChargeResponses.parse(response.data);
|
|
11570
11570
|
});
|
|
11571
|
-
},
|
|
11572
|
-
incorrectAmountDecision: function incorrectAmountDecision(params, publicKey) {
|
|
11573
|
-
var language = getLanguage();
|
|
11574
|
-
|
|
11575
|
-
var headers = _objectSpread2({
|
|
11576
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
11577
|
-
}, language && {
|
|
11578
|
-
'Accept-Language': language
|
|
11579
|
-
});
|
|
11580
|
-
|
|
11581
|
-
var url = new URL('pay-with-transfer/incorrect-amount/decision', configToUse.paystackApiUrl).toString();
|
|
11582
|
-
return axiosInstance.post(url, params, {
|
|
11583
|
-
headers: headers
|
|
11584
|
-
}).then(function (response) {
|
|
11585
|
-
return ChargeResponses.parse(response.data);
|
|
11586
|
-
});
|
|
11587
|
-
},
|
|
11588
|
-
authenticatePayer: function authenticatePayer(params, publicKey) {
|
|
11589
|
-
var language = getLanguage();
|
|
11590
|
-
|
|
11591
|
-
var headers = _objectSpread2({
|
|
11592
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
11593
|
-
}, language && {
|
|
11594
|
-
'Accept-Language': language
|
|
11595
|
-
});
|
|
11596
|
-
|
|
11597
|
-
var url = new URL('pay-with-transfer/authenticate-payer', configToUse.paystackApiUrl).toString();
|
|
11598
|
-
return axiosInstance.post(url, params, {
|
|
11599
|
-
headers: headers
|
|
11600
|
-
}).then(function (response) {
|
|
11601
|
-
return ChargeResponses.parse(response.data);
|
|
11602
|
-
});
|
|
11603
11571
|
}
|
|
11604
11572
|
};
|
|
11605
11573
|
|
|
@@ -11630,25 +11598,6 @@ var PayWithTransferCharge = {
|
|
|
11630
11598
|
paymentMethod: 'bank_transfer'
|
|
11631
11599
|
};
|
|
11632
11600
|
return this.listenForCharge(listenerOptions, callback);
|
|
11633
|
-
},
|
|
11634
|
-
sendIncorrectAmountDecision: function sendIncorrectAmountDecision(decisionMade) {
|
|
11635
|
-
var params = {
|
|
11636
|
-
transaction_id: this.id,
|
|
11637
|
-
decision: decisionMade
|
|
11638
|
-
};
|
|
11639
|
-
return PayWithTransferAPI.incorrectAmountDecision(params, this.merchant.key);
|
|
11640
|
-
},
|
|
11641
|
-
sendAuthenticatePayer: function sendAuthenticatePayer(_ref2) {
|
|
11642
|
-
var amountPaid = _ref2.amountPaid,
|
|
11643
|
-
payerAccountNumber = _ref2.payerAccountNumber,
|
|
11644
|
-
payerBankSlug = _ref2.payerBankSlug;
|
|
11645
|
-
var params = {
|
|
11646
|
-
transaction_id: this.id,
|
|
11647
|
-
amount: amountPaid,
|
|
11648
|
-
payer_account_number: payerAccountNumber,
|
|
11649
|
-
payer_bank_slug: payerBankSlug
|
|
11650
|
-
};
|
|
11651
|
-
return PayWithTransferAPI.authenticatePayer(params, this.merchant.key);
|
|
11652
11601
|
}
|
|
11653
11602
|
};
|
|
11654
11603
|
|
|
@@ -18754,21 +18703,23 @@ var CardAPI$1 = {
|
|
|
18754
18703
|
},
|
|
18755
18704
|
sendSavedCardsOTP: function sendSavedCardsOTP(_ref6) {
|
|
18756
18705
|
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
18757
|
-
var transaction, phone, channels, url, language, headers, data, response;
|
|
18706
|
+
var transaction, phone, channels, email, url, language, headers, data, response;
|
|
18758
18707
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
18759
18708
|
while (1) {
|
|
18760
18709
|
switch (_context.prev = _context.next) {
|
|
18761
18710
|
case 0:
|
|
18762
|
-
transaction = _ref6.transaction, phone = _ref6.phone, channels = _ref6.channels;
|
|
18711
|
+
transaction = _ref6.transaction, phone = _ref6.phone, channels = _ref6.channels, email = _ref6.email;
|
|
18763
18712
|
url = new URL('/saved_cards/authorize', configToUse.paystackApiUrl).toString();
|
|
18764
18713
|
language = getLanguage();
|
|
18765
18714
|
headers = _objectSpread2({}, language && {
|
|
18766
18715
|
'Accept-Language': language
|
|
18767
18716
|
});
|
|
18768
|
-
data = _objectSpread2(_objectSpread2(_objectSpread2({}, phone && {
|
|
18717
|
+
data = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, phone && {
|
|
18769
18718
|
phone: phone
|
|
18770
18719
|
}), channels && {
|
|
18771
18720
|
channels: channels
|
|
18721
|
+
}), email && {
|
|
18722
|
+
email: email
|
|
18772
18723
|
}), {}, {
|
|
18773
18724
|
transaction: transaction
|
|
18774
18725
|
});
|
|
@@ -19113,46 +19064,48 @@ var CardCharge = {
|
|
|
19113
19064
|
};
|
|
19114
19065
|
return this.listenForCharge(listenerOptions, callback);
|
|
19115
19066
|
},
|
|
19116
|
-
sendSavedCardsOTP: function sendSavedCardsOTP(
|
|
19067
|
+
sendSavedCardsOTP: function sendSavedCardsOTP(_ref4) {
|
|
19117
19068
|
var _this9 = this;
|
|
19118
19069
|
|
|
19119
19070
|
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
19120
|
-
var response;
|
|
19071
|
+
var phone, channels, email, response;
|
|
19121
19072
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
19122
19073
|
while (1) {
|
|
19123
19074
|
switch (_context.prev = _context.next) {
|
|
19124
19075
|
case 0:
|
|
19125
|
-
|
|
19076
|
+
phone = _ref4.phone, channels = _ref4.channels, email = _ref4.email;
|
|
19077
|
+
_context.prev = 1;
|
|
19126
19078
|
|
|
19127
19079
|
_this9.logAuth(savedCardMethods.authentication);
|
|
19128
19080
|
|
|
19129
|
-
_context.next =
|
|
19081
|
+
_context.next = 5;
|
|
19130
19082
|
return CardAPI$1.sendSavedCardsOTP({
|
|
19131
19083
|
phone: phone,
|
|
19132
19084
|
transaction: _this9.id,
|
|
19133
|
-
channels: channels
|
|
19085
|
+
channels: channels,
|
|
19086
|
+
email: email
|
|
19134
19087
|
});
|
|
19135
19088
|
|
|
19136
|
-
case
|
|
19089
|
+
case 5:
|
|
19137
19090
|
response = _context.sent;
|
|
19138
19091
|
_this9.savedCardsTempAuthToken = response.data.token;
|
|
19139
19092
|
return _context.abrupt("return", response);
|
|
19140
19093
|
|
|
19141
|
-
case
|
|
19142
|
-
_context.prev =
|
|
19143
|
-
_context.t0 = _context["catch"](
|
|
19094
|
+
case 10:
|
|
19095
|
+
_context.prev = 10;
|
|
19096
|
+
_context.t0 = _context["catch"](1);
|
|
19144
19097
|
_this9.savedCardsTempAuthToken = null;
|
|
19145
19098
|
throw _context.t0;
|
|
19146
19099
|
|
|
19147
|
-
case
|
|
19100
|
+
case 14:
|
|
19148
19101
|
case "end":
|
|
19149
19102
|
return _context.stop();
|
|
19150
19103
|
}
|
|
19151
19104
|
}
|
|
19152
|
-
}, _callee, null, [[
|
|
19105
|
+
}, _callee, null, [[1, 10]]);
|
|
19153
19106
|
}))();
|
|
19154
19107
|
},
|
|
19155
|
-
verifySavedCardsOtp: function verifySavedCardsOtp(
|
|
19108
|
+
verifySavedCardsOtp: function verifySavedCardsOtp(_ref5) {
|
|
19156
19109
|
var _this10 = this;
|
|
19157
19110
|
|
|
19158
19111
|
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
@@ -19161,7 +19114,7 @@ var CardCharge = {
|
|
|
19161
19114
|
while (1) {
|
|
19162
19115
|
switch (_context2.prev = _context2.next) {
|
|
19163
19116
|
case 0:
|
|
19164
|
-
code =
|
|
19117
|
+
code = _ref5.code;
|
|
19165
19118
|
payload = {
|
|
19166
19119
|
code: code,
|
|
19167
19120
|
transaction: _this10.id,
|
|
@@ -19201,10 +19154,10 @@ var CardCharge = {
|
|
|
19201
19154
|
token: this.savedCardsToken
|
|
19202
19155
|
});
|
|
19203
19156
|
},
|
|
19204
|
-
chargeSavedCard: function chargeSavedCard(
|
|
19205
|
-
var cardCode =
|
|
19206
|
-
|
|
19207
|
-
selectedCurrency =
|
|
19157
|
+
chargeSavedCard: function chargeSavedCard(_ref6) {
|
|
19158
|
+
var cardCode = _ref6.cardCode,
|
|
19159
|
+
_ref6$selectedCurrenc = _ref6.selectedCurrency,
|
|
19160
|
+
selectedCurrency = _ref6$selectedCurrenc === void 0 ? this.currency : _ref6$selectedCurrenc;
|
|
19208
19161
|
this.logAttempt(savedCardMethods.payment);
|
|
19209
19162
|
return CardAPI$1.chargeSavedCard({
|
|
19210
19163
|
cardCode: cardCode,
|
|
@@ -19485,13 +19438,12 @@ var DigitalBankMandateAPI = {
|
|
|
19485
19438
|
'Accept-Language': language
|
|
19486
19439
|
});
|
|
19487
19440
|
|
|
19488
|
-
var params =
|
|
19441
|
+
var params = walletId ? {
|
|
19489
19442
|
wallet_id: walletId
|
|
19490
19443
|
} : {
|
|
19491
19444
|
phone_number: phoneNumber,
|
|
19492
19445
|
token: payId
|
|
19493
|
-
}
|
|
19494
|
-
|
|
19446
|
+
};
|
|
19495
19447
|
var urlEncodedParams = formUrlencoded(params);
|
|
19496
19448
|
return axiosInstance.post(url, urlEncodedParams, {
|
|
19497
19449
|
headers: headers
|
|
@@ -20913,21 +20865,6 @@ var ToolkitAPI = {
|
|
|
20913
20865
|
resolvedCardBins[bin] = data;
|
|
20914
20866
|
return data;
|
|
20915
20867
|
});
|
|
20916
|
-
},
|
|
20917
|
-
resolveIPAddress: function resolveIPAddress(ipAddress) {
|
|
20918
|
-
var url = new URL("decision/resolve_ip/".concat(ipAddress), configToUse.paystackApiUrl).toString();
|
|
20919
|
-
var language = getLanguage();
|
|
20920
|
-
|
|
20921
|
-
var headers = _objectSpread2({}, language && {
|
|
20922
|
-
'Accept-Language': language
|
|
20923
|
-
});
|
|
20924
|
-
|
|
20925
|
-
return axiosInstance.get(url, {
|
|
20926
|
-
headers: headers
|
|
20927
|
-
}).then(function (_ref2) {
|
|
20928
|
-
var data = _ref2.data;
|
|
20929
|
-
return data;
|
|
20930
|
-
});
|
|
20931
20868
|
}
|
|
20932
20869
|
};
|
|
20933
20870
|
|
|
@@ -20993,11 +20930,6 @@ var Toolkit = /*#__PURE__*/function () {
|
|
|
20993
20930
|
value: function resolveCardBin(bin) {
|
|
20994
20931
|
return ToolkitAPI.resolveCardBin(bin);
|
|
20995
20932
|
}
|
|
20996
|
-
}, {
|
|
20997
|
-
key: "resolveIPAddress",
|
|
20998
|
-
value: function resolveIPAddress(ipAddress) {
|
|
20999
|
-
return ToolkitAPI.resolveIPAddress(ipAddress);
|
|
21000
|
-
}
|
|
21001
20933
|
}]);
|
|
21002
20934
|
|
|
21003
20935
|
return Toolkit;
|
|
@@ -21305,8 +21237,6 @@ var AnalyticsFunctions = {
|
|
|
21305
21237
|
return this.saveLog();
|
|
21306
21238
|
},
|
|
21307
21239
|
logAPIResponse: function logAPIResponse(response, channel) {
|
|
21308
|
-
console.log('api response', response);
|
|
21309
|
-
|
|
21310
21240
|
switch (response.status) {
|
|
21311
21241
|
case 'authorized':
|
|
21312
21242
|
return this.logAuthorized(channel);
|
package/lib/checkout.js
CHANGED
|
@@ -11572,38 +11572,6 @@ var PayWithTransferAPI = {
|
|
|
11572
11572
|
}).then(function (response) {
|
|
11573
11573
|
return ChargeResponses.parse(response.data);
|
|
11574
11574
|
});
|
|
11575
|
-
},
|
|
11576
|
-
incorrectAmountDecision: function incorrectAmountDecision(params, publicKey) {
|
|
11577
|
-
var language = getLanguage();
|
|
11578
|
-
|
|
11579
|
-
var headers = _objectSpread2({
|
|
11580
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
11581
|
-
}, language && {
|
|
11582
|
-
'Accept-Language': language
|
|
11583
|
-
});
|
|
11584
|
-
|
|
11585
|
-
var url = new URL('pay-with-transfer/incorrect-amount/decision', configToUse.paystackApiUrl).toString();
|
|
11586
|
-
return axiosInstance.post(url, params, {
|
|
11587
|
-
headers: headers
|
|
11588
|
-
}).then(function (response) {
|
|
11589
|
-
return ChargeResponses.parse(response.data);
|
|
11590
|
-
});
|
|
11591
|
-
},
|
|
11592
|
-
authenticatePayer: function authenticatePayer(params, publicKey) {
|
|
11593
|
-
var language = getLanguage();
|
|
11594
|
-
|
|
11595
|
-
var headers = _objectSpread2({
|
|
11596
|
-
Authorization: "Bearer ".concat(publicKey)
|
|
11597
|
-
}, language && {
|
|
11598
|
-
'Accept-Language': language
|
|
11599
|
-
});
|
|
11600
|
-
|
|
11601
|
-
var url = new URL('pay-with-transfer/authenticate-payer', configToUse.paystackApiUrl).toString();
|
|
11602
|
-
return axiosInstance.post(url, params, {
|
|
11603
|
-
headers: headers
|
|
11604
|
-
}).then(function (response) {
|
|
11605
|
-
return ChargeResponses.parse(response.data);
|
|
11606
|
-
});
|
|
11607
11575
|
}
|
|
11608
11576
|
};
|
|
11609
11577
|
|
|
@@ -11634,25 +11602,6 @@ var PayWithTransferCharge = {
|
|
|
11634
11602
|
paymentMethod: 'bank_transfer'
|
|
11635
11603
|
};
|
|
11636
11604
|
return this.listenForCharge(listenerOptions, callback);
|
|
11637
|
-
},
|
|
11638
|
-
sendIncorrectAmountDecision: function sendIncorrectAmountDecision(decisionMade) {
|
|
11639
|
-
var params = {
|
|
11640
|
-
transaction_id: this.id,
|
|
11641
|
-
decision: decisionMade
|
|
11642
|
-
};
|
|
11643
|
-
return PayWithTransferAPI.incorrectAmountDecision(params, this.merchant.key);
|
|
11644
|
-
},
|
|
11645
|
-
sendAuthenticatePayer: function sendAuthenticatePayer(_ref2) {
|
|
11646
|
-
var amountPaid = _ref2.amountPaid,
|
|
11647
|
-
payerAccountNumber = _ref2.payerAccountNumber,
|
|
11648
|
-
payerBankSlug = _ref2.payerBankSlug;
|
|
11649
|
-
var params = {
|
|
11650
|
-
transaction_id: this.id,
|
|
11651
|
-
amount: amountPaid,
|
|
11652
|
-
payer_account_number: payerAccountNumber,
|
|
11653
|
-
payer_bank_slug: payerBankSlug
|
|
11654
|
-
};
|
|
11655
|
-
return PayWithTransferAPI.authenticatePayer(params, this.merchant.key);
|
|
11656
11605
|
}
|
|
11657
11606
|
};
|
|
11658
11607
|
|
|
@@ -18758,21 +18707,23 @@ var CardAPI$1 = {
|
|
|
18758
18707
|
},
|
|
18759
18708
|
sendSavedCardsOTP: function sendSavedCardsOTP(_ref6) {
|
|
18760
18709
|
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
18761
|
-
var transaction, phone, channels, url, language, headers, data, response;
|
|
18710
|
+
var transaction, phone, channels, email, url, language, headers, data, response;
|
|
18762
18711
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
18763
18712
|
while (1) {
|
|
18764
18713
|
switch (_context.prev = _context.next) {
|
|
18765
18714
|
case 0:
|
|
18766
|
-
transaction = _ref6.transaction, phone = _ref6.phone, channels = _ref6.channels;
|
|
18715
|
+
transaction = _ref6.transaction, phone = _ref6.phone, channels = _ref6.channels, email = _ref6.email;
|
|
18767
18716
|
url = new URL('/saved_cards/authorize', configToUse.paystackApiUrl).toString();
|
|
18768
18717
|
language = getLanguage();
|
|
18769
18718
|
headers = _objectSpread2({}, language && {
|
|
18770
18719
|
'Accept-Language': language
|
|
18771
18720
|
});
|
|
18772
|
-
data = _objectSpread2(_objectSpread2(_objectSpread2({}, phone && {
|
|
18721
|
+
data = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, phone && {
|
|
18773
18722
|
phone: phone
|
|
18774
18723
|
}), channels && {
|
|
18775
18724
|
channels: channels
|
|
18725
|
+
}), email && {
|
|
18726
|
+
email: email
|
|
18776
18727
|
}), {}, {
|
|
18777
18728
|
transaction: transaction
|
|
18778
18729
|
});
|
|
@@ -19117,46 +19068,48 @@ var CardCharge = {
|
|
|
19117
19068
|
};
|
|
19118
19069
|
return this.listenForCharge(listenerOptions, callback);
|
|
19119
19070
|
},
|
|
19120
|
-
sendSavedCardsOTP: function sendSavedCardsOTP(
|
|
19071
|
+
sendSavedCardsOTP: function sendSavedCardsOTP(_ref4) {
|
|
19121
19072
|
var _this9 = this;
|
|
19122
19073
|
|
|
19123
19074
|
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
19124
|
-
var response;
|
|
19075
|
+
var phone, channels, email, response;
|
|
19125
19076
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
19126
19077
|
while (1) {
|
|
19127
19078
|
switch (_context.prev = _context.next) {
|
|
19128
19079
|
case 0:
|
|
19129
|
-
|
|
19080
|
+
phone = _ref4.phone, channels = _ref4.channels, email = _ref4.email;
|
|
19081
|
+
_context.prev = 1;
|
|
19130
19082
|
|
|
19131
19083
|
_this9.logAuth(savedCardMethods.authentication);
|
|
19132
19084
|
|
|
19133
|
-
_context.next =
|
|
19085
|
+
_context.next = 5;
|
|
19134
19086
|
return CardAPI$1.sendSavedCardsOTP({
|
|
19135
19087
|
phone: phone,
|
|
19136
19088
|
transaction: _this9.id,
|
|
19137
|
-
channels: channels
|
|
19089
|
+
channels: channels,
|
|
19090
|
+
email: email
|
|
19138
19091
|
});
|
|
19139
19092
|
|
|
19140
|
-
case
|
|
19093
|
+
case 5:
|
|
19141
19094
|
response = _context.sent;
|
|
19142
19095
|
_this9.savedCardsTempAuthToken = response.data.token;
|
|
19143
19096
|
return _context.abrupt("return", response);
|
|
19144
19097
|
|
|
19145
|
-
case
|
|
19146
|
-
_context.prev =
|
|
19147
|
-
_context.t0 = _context["catch"](
|
|
19098
|
+
case 10:
|
|
19099
|
+
_context.prev = 10;
|
|
19100
|
+
_context.t0 = _context["catch"](1);
|
|
19148
19101
|
_this9.savedCardsTempAuthToken = null;
|
|
19149
19102
|
throw _context.t0;
|
|
19150
19103
|
|
|
19151
|
-
case
|
|
19104
|
+
case 14:
|
|
19152
19105
|
case "end":
|
|
19153
19106
|
return _context.stop();
|
|
19154
19107
|
}
|
|
19155
19108
|
}
|
|
19156
|
-
}, _callee, null, [[
|
|
19109
|
+
}, _callee, null, [[1, 10]]);
|
|
19157
19110
|
}))();
|
|
19158
19111
|
},
|
|
19159
|
-
verifySavedCardsOtp: function verifySavedCardsOtp(
|
|
19112
|
+
verifySavedCardsOtp: function verifySavedCardsOtp(_ref5) {
|
|
19160
19113
|
var _this10 = this;
|
|
19161
19114
|
|
|
19162
19115
|
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
@@ -19165,7 +19118,7 @@ var CardCharge = {
|
|
|
19165
19118
|
while (1) {
|
|
19166
19119
|
switch (_context2.prev = _context2.next) {
|
|
19167
19120
|
case 0:
|
|
19168
|
-
code =
|
|
19121
|
+
code = _ref5.code;
|
|
19169
19122
|
payload = {
|
|
19170
19123
|
code: code,
|
|
19171
19124
|
transaction: _this10.id,
|
|
@@ -19205,10 +19158,10 @@ var CardCharge = {
|
|
|
19205
19158
|
token: this.savedCardsToken
|
|
19206
19159
|
});
|
|
19207
19160
|
},
|
|
19208
|
-
chargeSavedCard: function chargeSavedCard(
|
|
19209
|
-
var cardCode =
|
|
19210
|
-
|
|
19211
|
-
selectedCurrency =
|
|
19161
|
+
chargeSavedCard: function chargeSavedCard(_ref6) {
|
|
19162
|
+
var cardCode = _ref6.cardCode,
|
|
19163
|
+
_ref6$selectedCurrenc = _ref6.selectedCurrency,
|
|
19164
|
+
selectedCurrency = _ref6$selectedCurrenc === void 0 ? this.currency : _ref6$selectedCurrenc;
|
|
19212
19165
|
this.logAttempt(savedCardMethods.payment);
|
|
19213
19166
|
return CardAPI$1.chargeSavedCard({
|
|
19214
19167
|
cardCode: cardCode,
|
|
@@ -19489,13 +19442,12 @@ var DigitalBankMandateAPI = {
|
|
|
19489
19442
|
'Accept-Language': language
|
|
19490
19443
|
});
|
|
19491
19444
|
|
|
19492
|
-
var params =
|
|
19445
|
+
var params = walletId ? {
|
|
19493
19446
|
wallet_id: walletId
|
|
19494
19447
|
} : {
|
|
19495
19448
|
phone_number: phoneNumber,
|
|
19496
19449
|
token: payId
|
|
19497
|
-
}
|
|
19498
|
-
|
|
19450
|
+
};
|
|
19499
19451
|
var urlEncodedParams = formUrlencoded(params);
|
|
19500
19452
|
return axiosInstance.post(url, urlEncodedParams, {
|
|
19501
19453
|
headers: headers
|
|
@@ -20917,21 +20869,6 @@ var ToolkitAPI = {
|
|
|
20917
20869
|
resolvedCardBins[bin] = data;
|
|
20918
20870
|
return data;
|
|
20919
20871
|
});
|
|
20920
|
-
},
|
|
20921
|
-
resolveIPAddress: function resolveIPAddress(ipAddress) {
|
|
20922
|
-
var url = new URL("decision/resolve_ip/".concat(ipAddress), configToUse.paystackApiUrl).toString();
|
|
20923
|
-
var language = getLanguage();
|
|
20924
|
-
|
|
20925
|
-
var headers = _objectSpread2({}, language && {
|
|
20926
|
-
'Accept-Language': language
|
|
20927
|
-
});
|
|
20928
|
-
|
|
20929
|
-
return axiosInstance.get(url, {
|
|
20930
|
-
headers: headers
|
|
20931
|
-
}).then(function (_ref2) {
|
|
20932
|
-
var data = _ref2.data;
|
|
20933
|
-
return data;
|
|
20934
|
-
});
|
|
20935
20872
|
}
|
|
20936
20873
|
};
|
|
20937
20874
|
|
|
@@ -20997,11 +20934,6 @@ var Toolkit = /*#__PURE__*/function () {
|
|
|
20997
20934
|
value: function resolveCardBin(bin) {
|
|
20998
20935
|
return ToolkitAPI.resolveCardBin(bin);
|
|
20999
20936
|
}
|
|
21000
|
-
}, {
|
|
21001
|
-
key: "resolveIPAddress",
|
|
21002
|
-
value: function resolveIPAddress(ipAddress) {
|
|
21003
|
-
return ToolkitAPI.resolveIPAddress(ipAddress);
|
|
21004
|
-
}
|
|
21005
20937
|
}]);
|
|
21006
20938
|
|
|
21007
20939
|
return Toolkit;
|
|
@@ -21309,8 +21241,6 @@ var AnalyticsFunctions = {
|
|
|
21309
21241
|
return this.saveLog();
|
|
21310
21242
|
},
|
|
21311
21243
|
logAPIResponse: function logAPIResponse(response, channel) {
|
|
21312
|
-
console.log('api response', response);
|
|
21313
|
-
|
|
21314
21244
|
switch (response.status) {
|
|
21315
21245
|
case 'authorized':
|
|
21316
21246
|
return this.logAuthorized(channel);
|