@paystack/checkout-js 1.18.0-dev.4 → 1.18.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 +2 -2
- package/es/checkout.js +28 -0
- package/lib/checkout.js +28 -0
- package/package.json +1 -1
package/es/checkout.js
CHANGED
|
@@ -3571,6 +3571,10 @@ var fields = {
|
|
|
3571
3571
|
subscription: {
|
|
3572
3572
|
required: false,
|
|
3573
3573
|
isValid: isInteger
|
|
3574
|
+
},
|
|
3575
|
+
selected_currency: {
|
|
3576
|
+
required: false,
|
|
3577
|
+
isValid: isString$1
|
|
3574
3578
|
}
|
|
3575
3579
|
};
|
|
3576
3580
|
function ValidateTransactionParameters(data) {
|
|
@@ -18564,6 +18568,20 @@ var CardAPI = {
|
|
|
18564
18568
|
}).then(function (response) {
|
|
18565
18569
|
return ChargeResponses.parse(response.data);
|
|
18566
18570
|
});
|
|
18571
|
+
},
|
|
18572
|
+
resolveBin: function resolveBin(first6) {
|
|
18573
|
+
var language = getLanguage();
|
|
18574
|
+
|
|
18575
|
+
var headers = _objectSpread2({}, language && {
|
|
18576
|
+
'Accept-Language': language
|
|
18577
|
+
});
|
|
18578
|
+
|
|
18579
|
+
var url = "".concat(configToUse.paystackApiUrl, "decision/bin/").concat(first6);
|
|
18580
|
+
return axiosInstance.get(url, {
|
|
18581
|
+
headers: headers
|
|
18582
|
+
}).then(function (response) {
|
|
18583
|
+
return response.data;
|
|
18584
|
+
});
|
|
18567
18585
|
}
|
|
18568
18586
|
};
|
|
18569
18587
|
|
|
@@ -18618,6 +18636,7 @@ var CardCharge = {
|
|
|
18618
18636
|
rememberCard: _this2.remember_card,
|
|
18619
18637
|
transactionType: _this2.transactionType,
|
|
18620
18638
|
subscription: _this2.subscription,
|
|
18639
|
+
selectedCurrency: _this2.selected_currency,
|
|
18621
18640
|
customFields: customFields
|
|
18622
18641
|
};
|
|
18623
18642
|
return CardAPI.charge(chargeParams).then(function (response) {
|
|
@@ -18744,6 +18763,15 @@ var CardCharge = {
|
|
|
18744
18763
|
paymentMethod: paymentMethod$3
|
|
18745
18764
|
};
|
|
18746
18765
|
return this.listenForCharge(listenerOptions, callback);
|
|
18766
|
+
},
|
|
18767
|
+
resolveBin: function resolveBin(first6) {
|
|
18768
|
+
var _this9 = this;
|
|
18769
|
+
|
|
18770
|
+
return CardAPI.resolveBin(first6).then(function (response) {
|
|
18771
|
+
_this9.logAPIResponse(response, paymentMethod$3);
|
|
18772
|
+
|
|
18773
|
+
return response;
|
|
18774
|
+
});
|
|
18747
18775
|
}
|
|
18748
18776
|
};
|
|
18749
18777
|
|
package/lib/checkout.js
CHANGED
|
@@ -3575,6 +3575,10 @@ var fields = {
|
|
|
3575
3575
|
subscription: {
|
|
3576
3576
|
required: false,
|
|
3577
3577
|
isValid: isInteger
|
|
3578
|
+
},
|
|
3579
|
+
selected_currency: {
|
|
3580
|
+
required: false,
|
|
3581
|
+
isValid: isString$1
|
|
3578
3582
|
}
|
|
3579
3583
|
};
|
|
3580
3584
|
function ValidateTransactionParameters(data) {
|
|
@@ -18568,6 +18572,20 @@ var CardAPI = {
|
|
|
18568
18572
|
}).then(function (response) {
|
|
18569
18573
|
return ChargeResponses.parse(response.data);
|
|
18570
18574
|
});
|
|
18575
|
+
},
|
|
18576
|
+
resolveBin: function resolveBin(first6) {
|
|
18577
|
+
var language = getLanguage();
|
|
18578
|
+
|
|
18579
|
+
var headers = _objectSpread2({}, language && {
|
|
18580
|
+
'Accept-Language': language
|
|
18581
|
+
});
|
|
18582
|
+
|
|
18583
|
+
var url = "".concat(configToUse.paystackApiUrl, "decision/bin/").concat(first6);
|
|
18584
|
+
return axiosInstance.get(url, {
|
|
18585
|
+
headers: headers
|
|
18586
|
+
}).then(function (response) {
|
|
18587
|
+
return response.data;
|
|
18588
|
+
});
|
|
18571
18589
|
}
|
|
18572
18590
|
};
|
|
18573
18591
|
|
|
@@ -18622,6 +18640,7 @@ var CardCharge = {
|
|
|
18622
18640
|
rememberCard: _this2.remember_card,
|
|
18623
18641
|
transactionType: _this2.transactionType,
|
|
18624
18642
|
subscription: _this2.subscription,
|
|
18643
|
+
selectedCurrency: _this2.selected_currency,
|
|
18625
18644
|
customFields: customFields
|
|
18626
18645
|
};
|
|
18627
18646
|
return CardAPI.charge(chargeParams).then(function (response) {
|
|
@@ -18748,6 +18767,15 @@ var CardCharge = {
|
|
|
18748
18767
|
paymentMethod: paymentMethod$3
|
|
18749
18768
|
};
|
|
18750
18769
|
return this.listenForCharge(listenerOptions, callback);
|
|
18770
|
+
},
|
|
18771
|
+
resolveBin: function resolveBin(first6) {
|
|
18772
|
+
var _this9 = this;
|
|
18773
|
+
|
|
18774
|
+
return CardAPI.resolveBin(first6).then(function (response) {
|
|
18775
|
+
_this9.logAPIResponse(response, paymentMethod$3);
|
|
18776
|
+
|
|
18777
|
+
return response;
|
|
18778
|
+
});
|
|
18751
18779
|
}
|
|
18752
18780
|
};
|
|
18753
18781
|
|