@paystack/checkout-js 1.26.0-dev.3 → 1.26.0-dev.5

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 CHANGED
@@ -19834,41 +19834,45 @@ var Paystack = (function (exports) {
19834
19834
  }
19835
19835
 
19836
19836
  var MobileMoneyCharge = {
19837
- chargeMobileMoney: function chargeMobileMoney(_ref) {
19837
+ mobileMoneyChargeAPI: function mobileMoneyChargeAPI(params) {
19838
19838
  var _this = this;
19839
19839
 
19840
+ return MobileMoneyAPI.charge(params).then(function (response) {
19841
+ if (response.status === 'success') {
19842
+ _this.mobileMoney = response;
19843
+
19844
+ if (response.data && response.data.display && response.data.display.otpSentCount === 1) {
19845
+ _this.logTokenRequest('mobile money');
19846
+ }
19847
+ }
19848
+
19849
+ return response;
19850
+ });
19851
+ },
19852
+ chargeMobileMoney: function chargeMobileMoney(_ref) {
19853
+ var _this2 = this;
19854
+
19840
19855
  var phoneNumber = _ref.phoneNumber,
19841
19856
  provider = _ref.provider,
19842
19857
  voucher = _ref.voucher,
19843
19858
  registrationToken = _ref.registrationToken;
19844
19859
  return validate$1(phoneNumber).then(function () {
19845
- _this.logAttempt('mobile money');
19860
+ _this2.logAttempt('mobile money');
19846
19861
 
19847
19862
  var params = {
19848
19863
  provider: provider,
19849
19864
  voucher: voucher,
19850
19865
  registrationToken: registrationToken,
19851
- transaction: _this.id,
19866
+ transaction: _this2.id,
19852
19867
  phone: phoneNumber,
19853
- device: _this.deviceFingerprint,
19854
- channel_name: "MOBILE_MONEY_".concat(_this.id)
19868
+ device: _this2.deviceFingerprint,
19869
+ channel_name: "MOBILE_MONEY_".concat(_this2.id)
19855
19870
  };
19856
- return MobileMoneyAPI.charge(params).then(function (response) {
19857
- if (response.status === 'success') {
19858
- _this.mobileMoney = response;
19859
19871
 
19860
- if (response.data && response.data.display && response.data.display.otpSentCount === 1) {
19861
- _this.logTokenRequest('mobile money');
19862
- }
19863
- }
19864
-
19865
- return response;
19866
- });
19872
+ _this2.mobileMoneyChargeAPI(params);
19867
19873
  });
19868
19874
  },
19869
19875
  chargeMpesaOffline: function chargeMpesaOffline(_ref2) {
19870
- var _this2 = this;
19871
-
19872
19876
  var provider = _ref2.provider,
19873
19877
  voucher = _ref2.voucher,
19874
19878
  registrationToken = _ref2.registrationToken;
@@ -19881,17 +19885,7 @@ var Paystack = (function (exports) {
19881
19885
  device: this.deviceFingerprint,
19882
19886
  channel_name: "MOBILE_MONEY_".concat(this.id)
19883
19887
  };
19884
- return MobileMoneyAPI.charge(params).then(function (response) {
19885
- if (response.status === 'success') {
19886
- _this2.mobileMoney = response;
19887
-
19888
- if (response.data && response.data.display && response.data.display.otpSentCount === 1) {
19889
- _this2.logTokenRequest('mobile money');
19890
- }
19891
- }
19892
-
19893
- return response;
19894
- });
19888
+ this.mobileMoneyChargeAPI(params);
19895
19889
  },
19896
19890
  authenticateMobileMoney: function authenticateMobileMoney(payload) {
19897
19891
  var _this3 = this;
package/es/checkout.js CHANGED
@@ -19831,41 +19831,45 @@ function validate$1(phoneNumber) {
19831
19831
  }
19832
19832
 
19833
19833
  var MobileMoneyCharge = {
19834
- chargeMobileMoney: function chargeMobileMoney(_ref) {
19834
+ mobileMoneyChargeAPI: function mobileMoneyChargeAPI(params) {
19835
19835
  var _this = this;
19836
19836
 
19837
+ return MobileMoneyAPI.charge(params).then(function (response) {
19838
+ if (response.status === 'success') {
19839
+ _this.mobileMoney = response;
19840
+
19841
+ if (response.data && response.data.display && response.data.display.otpSentCount === 1) {
19842
+ _this.logTokenRequest('mobile money');
19843
+ }
19844
+ }
19845
+
19846
+ return response;
19847
+ });
19848
+ },
19849
+ chargeMobileMoney: function chargeMobileMoney(_ref) {
19850
+ var _this2 = this;
19851
+
19837
19852
  var phoneNumber = _ref.phoneNumber,
19838
19853
  provider = _ref.provider,
19839
19854
  voucher = _ref.voucher,
19840
19855
  registrationToken = _ref.registrationToken;
19841
19856
  return validate$1(phoneNumber).then(function () {
19842
- _this.logAttempt('mobile money');
19857
+ _this2.logAttempt('mobile money');
19843
19858
 
19844
19859
  var params = {
19845
19860
  provider: provider,
19846
19861
  voucher: voucher,
19847
19862
  registrationToken: registrationToken,
19848
- transaction: _this.id,
19863
+ transaction: _this2.id,
19849
19864
  phone: phoneNumber,
19850
- device: _this.deviceFingerprint,
19851
- channel_name: "MOBILE_MONEY_".concat(_this.id)
19865
+ device: _this2.deviceFingerprint,
19866
+ channel_name: "MOBILE_MONEY_".concat(_this2.id)
19852
19867
  };
19853
- return MobileMoneyAPI.charge(params).then(function (response) {
19854
- if (response.status === 'success') {
19855
- _this.mobileMoney = response;
19856
19868
 
19857
- if (response.data && response.data.display && response.data.display.otpSentCount === 1) {
19858
- _this.logTokenRequest('mobile money');
19859
- }
19860
- }
19861
-
19862
- return response;
19863
- });
19869
+ _this2.mobileMoneyChargeAPI(params);
19864
19870
  });
19865
19871
  },
19866
19872
  chargeMpesaOffline: function chargeMpesaOffline(_ref2) {
19867
- var _this2 = this;
19868
-
19869
19873
  var provider = _ref2.provider,
19870
19874
  voucher = _ref2.voucher,
19871
19875
  registrationToken = _ref2.registrationToken;
@@ -19878,17 +19882,7 @@ var MobileMoneyCharge = {
19878
19882
  device: this.deviceFingerprint,
19879
19883
  channel_name: "MOBILE_MONEY_".concat(this.id)
19880
19884
  };
19881
- return MobileMoneyAPI.charge(params).then(function (response) {
19882
- if (response.status === 'success') {
19883
- _this2.mobileMoney = response;
19884
-
19885
- if (response.data && response.data.display && response.data.display.otpSentCount === 1) {
19886
- _this2.logTokenRequest('mobile money');
19887
- }
19888
- }
19889
-
19890
- return response;
19891
- });
19885
+ this.mobileMoneyChargeAPI(params);
19892
19886
  },
19893
19887
  authenticateMobileMoney: function authenticateMobileMoney(payload) {
19894
19888
  var _this3 = this;
package/lib/checkout.js CHANGED
@@ -19835,41 +19835,45 @@ function validate$1(phoneNumber) {
19835
19835
  }
19836
19836
 
19837
19837
  var MobileMoneyCharge = {
19838
- chargeMobileMoney: function chargeMobileMoney(_ref) {
19838
+ mobileMoneyChargeAPI: function mobileMoneyChargeAPI(params) {
19839
19839
  var _this = this;
19840
19840
 
19841
+ return MobileMoneyAPI.charge(params).then(function (response) {
19842
+ if (response.status === 'success') {
19843
+ _this.mobileMoney = response;
19844
+
19845
+ if (response.data && response.data.display && response.data.display.otpSentCount === 1) {
19846
+ _this.logTokenRequest('mobile money');
19847
+ }
19848
+ }
19849
+
19850
+ return response;
19851
+ });
19852
+ },
19853
+ chargeMobileMoney: function chargeMobileMoney(_ref) {
19854
+ var _this2 = this;
19855
+
19841
19856
  var phoneNumber = _ref.phoneNumber,
19842
19857
  provider = _ref.provider,
19843
19858
  voucher = _ref.voucher,
19844
19859
  registrationToken = _ref.registrationToken;
19845
19860
  return validate$1(phoneNumber).then(function () {
19846
- _this.logAttempt('mobile money');
19861
+ _this2.logAttempt('mobile money');
19847
19862
 
19848
19863
  var params = {
19849
19864
  provider: provider,
19850
19865
  voucher: voucher,
19851
19866
  registrationToken: registrationToken,
19852
- transaction: _this.id,
19867
+ transaction: _this2.id,
19853
19868
  phone: phoneNumber,
19854
- device: _this.deviceFingerprint,
19855
- channel_name: "MOBILE_MONEY_".concat(_this.id)
19869
+ device: _this2.deviceFingerprint,
19870
+ channel_name: "MOBILE_MONEY_".concat(_this2.id)
19856
19871
  };
19857
- return MobileMoneyAPI.charge(params).then(function (response) {
19858
- if (response.status === 'success') {
19859
- _this.mobileMoney = response;
19860
19872
 
19861
- if (response.data && response.data.display && response.data.display.otpSentCount === 1) {
19862
- _this.logTokenRequest('mobile money');
19863
- }
19864
- }
19865
-
19866
- return response;
19867
- });
19873
+ _this2.mobileMoneyChargeAPI(params);
19868
19874
  });
19869
19875
  },
19870
19876
  chargeMpesaOffline: function chargeMpesaOffline(_ref2) {
19871
- var _this2 = this;
19872
-
19873
19877
  var provider = _ref2.provider,
19874
19878
  voucher = _ref2.voucher,
19875
19879
  registrationToken = _ref2.registrationToken;
@@ -19882,17 +19886,7 @@ var MobileMoneyCharge = {
19882
19886
  device: this.deviceFingerprint,
19883
19887
  channel_name: "MOBILE_MONEY_".concat(this.id)
19884
19888
  };
19885
- return MobileMoneyAPI.charge(params).then(function (response) {
19886
- if (response.status === 'success') {
19887
- _this2.mobileMoney = response;
19888
-
19889
- if (response.data && response.data.display && response.data.display.otpSentCount === 1) {
19890
- _this2.logTokenRequest('mobile money');
19891
- }
19892
- }
19893
-
19894
- return response;
19895
- });
19889
+ this.mobileMoneyChargeAPI(params);
19896
19890
  },
19897
19891
  authenticateMobileMoney: function authenticateMobileMoney(payload) {
19898
19892
  var _this3 = this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/checkout-js",
3
- "version": "1.26.0-dev.3",
3
+ "version": "1.26.0-dev.5",
4
4
  "description": "Client-side JS library for billing on Paystack",
5
5
  "main": "lib/checkout.js",
6
6
  "module": "es/checkout.js",