@paystack/checkout-js 1.25.0-dev.12 → 1.25.0-dev.14
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 +69 -1
- package/es/checkout.js +69 -1
- package/lib/checkout.js +69 -1
- package/package.json +1 -1
package/dist/checkout.js
CHANGED
|
@@ -6485,7 +6485,7 @@ var Paystack = (function (exports) {
|
|
|
6485
6485
|
var cleanResponse = _objectWithoutProperties(response, _excluded);
|
|
6486
6486
|
|
|
6487
6487
|
return {
|
|
6488
|
-
status:
|
|
6488
|
+
status: PREAUTHORIZATION_STATE_AUTHORIZED,
|
|
6489
6489
|
message: message || 'Payment authorized successfully',
|
|
6490
6490
|
data: cleanResponse
|
|
6491
6491
|
};
|
|
@@ -11571,6 +11571,38 @@ var Paystack = (function (exports) {
|
|
|
11571
11571
|
}).then(function (response) {
|
|
11572
11572
|
return ChargeResponses.parse(response.data);
|
|
11573
11573
|
});
|
|
11574
|
+
},
|
|
11575
|
+
incorrectAmountDecision: function incorrectAmountDecision(params, publicKey) {
|
|
11576
|
+
var language = getLanguage();
|
|
11577
|
+
|
|
11578
|
+
var headers = _objectSpread2({
|
|
11579
|
+
Authorization: "Bearer ".concat(publicKey)
|
|
11580
|
+
}, language && {
|
|
11581
|
+
'Accept-Language': language
|
|
11582
|
+
});
|
|
11583
|
+
|
|
11584
|
+
var url = new URL('checkout/pay-with-transfer/incorrect-amount/decision', configToUse.paystackApiUrl).toString();
|
|
11585
|
+
return axiosInstance.post(url, params, {
|
|
11586
|
+
headers: headers
|
|
11587
|
+
}).then(function (response) {
|
|
11588
|
+
return ChargeResponses.parse(response.data);
|
|
11589
|
+
});
|
|
11590
|
+
},
|
|
11591
|
+
authenticatePayer: function authenticatePayer(params, publicKey) {
|
|
11592
|
+
var language = getLanguage();
|
|
11593
|
+
|
|
11594
|
+
var headers = _objectSpread2({
|
|
11595
|
+
Authorization: "Bearer ".concat(publicKey)
|
|
11596
|
+
}, language && {
|
|
11597
|
+
'Accept-Language': language
|
|
11598
|
+
});
|
|
11599
|
+
|
|
11600
|
+
var url = new URL('checkout/pay-with-transfer/authenticate_payer', configToUse.paystackApiUrl).toString();
|
|
11601
|
+
return axiosInstance.post(url, params, {
|
|
11602
|
+
headers: headers
|
|
11603
|
+
}).then(function (response) {
|
|
11604
|
+
return ChargeResponses.parse(response.data);
|
|
11605
|
+
});
|
|
11574
11606
|
}
|
|
11575
11607
|
};
|
|
11576
11608
|
|
|
@@ -11601,6 +11633,42 @@ var Paystack = (function (exports) {
|
|
|
11601
11633
|
paymentMethod: 'bank_transfer'
|
|
11602
11634
|
};
|
|
11603
11635
|
return this.listenForCharge(listenerOptions, callback);
|
|
11636
|
+
},
|
|
11637
|
+
postIncorrectAmountDecision: function postIncorrectAmountDecision(_ref2) {
|
|
11638
|
+
var _this2 = this;
|
|
11639
|
+
|
|
11640
|
+
var decisionMade = _ref2.decisionMade;
|
|
11641
|
+
var params = {
|
|
11642
|
+
transaction_id: this.id,
|
|
11643
|
+
decision: decisionMade
|
|
11644
|
+
};
|
|
11645
|
+
return PayWithTransferAPI.incorrectAmountDecision(params, this.merchant.key).then(function (response) {
|
|
11646
|
+
if (response.status === 'success') {
|
|
11647
|
+
_this2.bankTransfer = response;
|
|
11648
|
+
}
|
|
11649
|
+
|
|
11650
|
+
return response;
|
|
11651
|
+
});
|
|
11652
|
+
},
|
|
11653
|
+
postAuthenticatePayer: function postAuthenticatePayer(_ref3) {
|
|
11654
|
+
var _this3 = this;
|
|
11655
|
+
|
|
11656
|
+
var amountPaid = _ref3.amountPaid,
|
|
11657
|
+
payerAccountNumber = _ref3.payerAccountNumber,
|
|
11658
|
+
payerBankSlug = _ref3.payerBankSlug;
|
|
11659
|
+
var params = {
|
|
11660
|
+
transaction_id: this.id,
|
|
11661
|
+
amount: amountPaid,
|
|
11662
|
+
payer_account_number: payerAccountNumber,
|
|
11663
|
+
payer_bank_slug: payerBankSlug
|
|
11664
|
+
};
|
|
11665
|
+
return PayWithTransferAPI.authenticatePayer(params, this.merchant.key).then(function (response) {
|
|
11666
|
+
if (response.status === 'success') {
|
|
11667
|
+
_this3.bankTransfer = response;
|
|
11668
|
+
}
|
|
11669
|
+
|
|
11670
|
+
return response;
|
|
11671
|
+
});
|
|
11604
11672
|
}
|
|
11605
11673
|
};
|
|
11606
11674
|
|
package/es/checkout.js
CHANGED
|
@@ -6482,7 +6482,7 @@ var ChargeResponses = {
|
|
|
6482
6482
|
var cleanResponse = _objectWithoutProperties(response, _excluded);
|
|
6483
6483
|
|
|
6484
6484
|
return {
|
|
6485
|
-
status:
|
|
6485
|
+
status: PREAUTHORIZATION_STATE_AUTHORIZED,
|
|
6486
6486
|
message: message || 'Payment authorized successfully',
|
|
6487
6487
|
data: cleanResponse
|
|
6488
6488
|
};
|
|
@@ -11568,6 +11568,38 @@ 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('checkout/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('checkout/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
|
+
});
|
|
11571
11603
|
}
|
|
11572
11604
|
};
|
|
11573
11605
|
|
|
@@ -11598,6 +11630,42 @@ var PayWithTransferCharge = {
|
|
|
11598
11630
|
paymentMethod: 'bank_transfer'
|
|
11599
11631
|
};
|
|
11600
11632
|
return this.listenForCharge(listenerOptions, callback);
|
|
11633
|
+
},
|
|
11634
|
+
postIncorrectAmountDecision: function postIncorrectAmountDecision(_ref2) {
|
|
11635
|
+
var _this2 = this;
|
|
11636
|
+
|
|
11637
|
+
var decisionMade = _ref2.decisionMade;
|
|
11638
|
+
var params = {
|
|
11639
|
+
transaction_id: this.id,
|
|
11640
|
+
decision: decisionMade
|
|
11641
|
+
};
|
|
11642
|
+
return PayWithTransferAPI.incorrectAmountDecision(params, this.merchant.key).then(function (response) {
|
|
11643
|
+
if (response.status === 'success') {
|
|
11644
|
+
_this2.bankTransfer = response;
|
|
11645
|
+
}
|
|
11646
|
+
|
|
11647
|
+
return response;
|
|
11648
|
+
});
|
|
11649
|
+
},
|
|
11650
|
+
postAuthenticatePayer: function postAuthenticatePayer(_ref3) {
|
|
11651
|
+
var _this3 = this;
|
|
11652
|
+
|
|
11653
|
+
var amountPaid = _ref3.amountPaid,
|
|
11654
|
+
payerAccountNumber = _ref3.payerAccountNumber,
|
|
11655
|
+
payerBankSlug = _ref3.payerBankSlug;
|
|
11656
|
+
var params = {
|
|
11657
|
+
transaction_id: this.id,
|
|
11658
|
+
amount: amountPaid,
|
|
11659
|
+
payer_account_number: payerAccountNumber,
|
|
11660
|
+
payer_bank_slug: payerBankSlug
|
|
11661
|
+
};
|
|
11662
|
+
return PayWithTransferAPI.authenticatePayer(params, this.merchant.key).then(function (response) {
|
|
11663
|
+
if (response.status === 'success') {
|
|
11664
|
+
_this3.bankTransfer = response;
|
|
11665
|
+
}
|
|
11666
|
+
|
|
11667
|
+
return response;
|
|
11668
|
+
});
|
|
11601
11669
|
}
|
|
11602
11670
|
};
|
|
11603
11671
|
|
package/lib/checkout.js
CHANGED
|
@@ -6486,7 +6486,7 @@ var ChargeResponses = {
|
|
|
6486
6486
|
var cleanResponse = _objectWithoutProperties(response, _excluded);
|
|
6487
6487
|
|
|
6488
6488
|
return {
|
|
6489
|
-
status:
|
|
6489
|
+
status: PREAUTHORIZATION_STATE_AUTHORIZED,
|
|
6490
6490
|
message: message || 'Payment authorized successfully',
|
|
6491
6491
|
data: cleanResponse
|
|
6492
6492
|
};
|
|
@@ -11572,6 +11572,38 @@ 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('checkout/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('checkout/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
|
+
});
|
|
11575
11607
|
}
|
|
11576
11608
|
};
|
|
11577
11609
|
|
|
@@ -11602,6 +11634,42 @@ var PayWithTransferCharge = {
|
|
|
11602
11634
|
paymentMethod: 'bank_transfer'
|
|
11603
11635
|
};
|
|
11604
11636
|
return this.listenForCharge(listenerOptions, callback);
|
|
11637
|
+
},
|
|
11638
|
+
postIncorrectAmountDecision: function postIncorrectAmountDecision(_ref2) {
|
|
11639
|
+
var _this2 = this;
|
|
11640
|
+
|
|
11641
|
+
var decisionMade = _ref2.decisionMade;
|
|
11642
|
+
var params = {
|
|
11643
|
+
transaction_id: this.id,
|
|
11644
|
+
decision: decisionMade
|
|
11645
|
+
};
|
|
11646
|
+
return PayWithTransferAPI.incorrectAmountDecision(params, this.merchant.key).then(function (response) {
|
|
11647
|
+
if (response.status === 'success') {
|
|
11648
|
+
_this2.bankTransfer = response;
|
|
11649
|
+
}
|
|
11650
|
+
|
|
11651
|
+
return response;
|
|
11652
|
+
});
|
|
11653
|
+
},
|
|
11654
|
+
postAuthenticatePayer: function postAuthenticatePayer(_ref3) {
|
|
11655
|
+
var _this3 = this;
|
|
11656
|
+
|
|
11657
|
+
var amountPaid = _ref3.amountPaid,
|
|
11658
|
+
payerAccountNumber = _ref3.payerAccountNumber,
|
|
11659
|
+
payerBankSlug = _ref3.payerBankSlug;
|
|
11660
|
+
var params = {
|
|
11661
|
+
transaction_id: this.id,
|
|
11662
|
+
amount: amountPaid,
|
|
11663
|
+
payer_account_number: payerAccountNumber,
|
|
11664
|
+
payer_bank_slug: payerBankSlug
|
|
11665
|
+
};
|
|
11666
|
+
return PayWithTransferAPI.authenticatePayer(params, this.merchant.key).then(function (response) {
|
|
11667
|
+
if (response.status === 'success') {
|
|
11668
|
+
_this3.bankTransfer = response;
|
|
11669
|
+
}
|
|
11670
|
+
|
|
11671
|
+
return response;
|
|
11672
|
+
});
|
|
11605
11673
|
}
|
|
11606
11674
|
};
|
|
11607
11675
|
|