@paystack/checkout-js 1.23.0-dev.2 → 1.23.1

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/es/checkout.js CHANGED
@@ -18665,30 +18665,34 @@ var CardAPI$1 = {
18665
18665
  return ChargeResponses.parse(response.data);
18666
18666
  });
18667
18667
  },
18668
- sendSavedCardsOTP: function sendSavedCardsOTP(transaction) {
18668
+ sendSavedCardsOTP: function sendSavedCardsOTP(_ref6) {
18669
18669
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
18670
- var url, language, headers, response;
18670
+ var transaction, phone, url, language, headers, data, response;
18671
18671
  return regeneratorRuntime.wrap(function _callee$(_context) {
18672
18672
  while (1) {
18673
18673
  switch (_context.prev = _context.next) {
18674
18674
  case 0:
18675
+ transaction = _ref6.transaction, phone = _ref6.phone;
18675
18676
  url = new URL('/saved_cards/authorize', configToUse.paystackApiUrl).toString();
18676
18677
  language = getLanguage();
18677
18678
  headers = _objectSpread2({}, language && {
18678
18679
  'Accept-Language': language
18679
18680
  });
18680
- _context.next = 5;
18681
- return axiosInstance.post(url, {
18681
+ data = _objectSpread2(_objectSpread2({}, phone && {
18682
+ phone: phone
18683
+ }), {}, {
18682
18684
  transaction: transaction
18683
- }, {
18685
+ });
18686
+ _context.next = 7;
18687
+ return axiosInstance.post(url, data, {
18684
18688
  headers: headers
18685
18689
  });
18686
18690
 
18687
- case 5:
18691
+ case 7:
18688
18692
  response = _context.sent;
18689
18693
  return _context.abrupt("return", response.data);
18690
18694
 
18691
- case 7:
18695
+ case 9:
18692
18696
  case "end":
18693
18697
  return _context.stop();
18694
18698
  }
@@ -18696,21 +18700,23 @@ var CardAPI$1 = {
18696
18700
  }, _callee);
18697
18701
  }))();
18698
18702
  },
18699
- addUserToSavedCards: function addUserToSavedCards(_ref6) {
18703
+ verifySavedCardsOtp: function verifySavedCardsOtp(_ref7) {
18700
18704
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
18701
- var phone, transaction, url, language, headers, data, response;
18705
+ var code, transaction, token, url, language, headers, data, response;
18702
18706
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
18703
18707
  while (1) {
18704
18708
  switch (_context2.prev = _context2.next) {
18705
18709
  case 0:
18706
- phone = _ref6.phone, transaction = _ref6.transaction;
18707
- url = new URL('/saved_cards/user', configToUse.paystackApiUrl).toString();
18710
+ code = _ref7.code, transaction = _ref7.transaction, token = _ref7.token;
18711
+ url = new URL('/saved_cards/authorize/verify', configToUse.paystackApiUrl).toString();
18708
18712
  language = getLanguage();
18709
- headers = _objectSpread2({}, language && {
18713
+ headers = _objectSpread2({
18714
+ Authorization: "Bearer ".concat(token)
18715
+ }, language && {
18710
18716
  'Accept-Language': language
18711
18717
  });
18712
18718
  data = {
18713
- phone: phone,
18719
+ code: code,
18714
18720
  transaction: transaction
18715
18721
  };
18716
18722
  _context2.next = 7;
@@ -18730,46 +18736,12 @@ var CardAPI$1 = {
18730
18736
  }, _callee2);
18731
18737
  }))();
18732
18738
  },
18733
- verifySavedCardsOtp: function verifySavedCardsOtp(_ref7) {
18739
+ getSavedCards: function getSavedCards(_ref8) {
18734
18740
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
18735
- var code, transaction, url, language, headers, data, response;
18741
+ var token, url, language, headers, response;
18736
18742
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
18737
18743
  while (1) {
18738
18744
  switch (_context3.prev = _context3.next) {
18739
- case 0:
18740
- code = _ref7.code, transaction = _ref7.transaction;
18741
- url = new URL('/saved_cards/authorize/verify', configToUse.paystackApiUrl).toString();
18742
- language = getLanguage();
18743
- headers = _objectSpread2({}, language && {
18744
- 'Accept-Language': language
18745
- });
18746
- data = {
18747
- code: code,
18748
- transaction: transaction
18749
- };
18750
- _context3.next = 7;
18751
- return axiosInstance.post(url, data, {
18752
- headers: headers
18753
- });
18754
-
18755
- case 7:
18756
- response = _context3.sent;
18757
- return _context3.abrupt("return", response.data);
18758
-
18759
- case 9:
18760
- case "end":
18761
- return _context3.stop();
18762
- }
18763
- }
18764
- }, _callee3);
18765
- }))();
18766
- },
18767
- getSavedCards: function getSavedCards(_ref8) {
18768
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
18769
- var token, url, language, headers, response;
18770
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
18771
- while (1) {
18772
- switch (_context4.prev = _context4.next) {
18773
18745
  case 0:
18774
18746
  token = _ref8.token;
18775
18747
  url = new URL('/saved_cards/cards', configToUse.paystackApiUrl).toString();
@@ -18780,29 +18752,29 @@ var CardAPI$1 = {
18780
18752
  }, language && {
18781
18753
  'Accept-Language': language
18782
18754
  });
18783
- _context4.next = 6;
18755
+ _context3.next = 6;
18784
18756
  return axiosInstance.get(url, {
18785
18757
  headers: headers
18786
18758
  });
18787
18759
 
18788
18760
  case 6:
18789
- response = _context4.sent;
18790
- return _context4.abrupt("return", response.data);
18761
+ response = _context3.sent;
18762
+ return _context3.abrupt("return", response.data);
18791
18763
 
18792
18764
  case 8:
18793
18765
  case "end":
18794
- return _context4.stop();
18766
+ return _context3.stop();
18795
18767
  }
18796
18768
  }
18797
- }, _callee4);
18769
+ }, _callee3);
18798
18770
  }))();
18799
18771
  },
18800
18772
  deleteSavedCard: function deleteSavedCard(_ref9) {
18801
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
18773
+ return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
18802
18774
  var cardCode, token, url, language, headers, response;
18803
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
18775
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
18804
18776
  while (1) {
18805
- switch (_context5.prev = _context5.next) {
18777
+ switch (_context4.prev = _context4.next) {
18806
18778
  case 0:
18807
18779
  cardCode = _ref9.cardCode, token = _ref9.token;
18808
18780
  url = new URL("/saved_cards/cards/".concat(cardCode), configToUse.paystackApiUrl).toString();
@@ -18813,29 +18785,29 @@ var CardAPI$1 = {
18813
18785
  }, language && {
18814
18786
  'Accept-Language': language
18815
18787
  });
18816
- _context5.next = 6;
18788
+ _context4.next = 6;
18817
18789
  return axiosInstance.delete(url, {
18818
18790
  headers: headers
18819
18791
  });
18820
18792
 
18821
18793
  case 6:
18822
- response = _context5.sent;
18823
- return _context5.abrupt("return", response.data);
18794
+ response = _context4.sent;
18795
+ return _context4.abrupt("return", response.data);
18824
18796
 
18825
18797
  case 8:
18826
18798
  case "end":
18827
- return _context5.stop();
18799
+ return _context4.stop();
18828
18800
  }
18829
18801
  }
18830
- }, _callee5);
18802
+ }, _callee4);
18831
18803
  }))();
18832
18804
  },
18833
18805
  chargeSavedCard: function chargeSavedCard(_ref10) {
18834
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
18806
+ return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
18835
18807
  var token, device, cardCode, transaction, selectedCurrency, url, language, headers, data, response;
18836
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
18808
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
18837
18809
  while (1) {
18838
- switch (_context6.prev = _context6.next) {
18810
+ switch (_context5.prev = _context5.next) {
18839
18811
  case 0:
18840
18812
  token = _ref10.token, device = _ref10.device, cardCode = _ref10.cardCode, transaction = _ref10.transaction, selectedCurrency = _ref10.selectedCurrency;
18841
18813
  url = new URL("/saved_cards/cards/".concat(cardCode, "/charge"), configToUse.paystackApiUrl).toString();
@@ -18851,21 +18823,21 @@ var CardAPI$1 = {
18851
18823
  transaction: transaction,
18852
18824
  selected_currency: selectedCurrency
18853
18825
  };
18854
- _context6.next = 7;
18826
+ _context5.next = 7;
18855
18827
  return axiosInstance.post(url, data, {
18856
18828
  headers: headers
18857
18829
  });
18858
18830
 
18859
18831
  case 7:
18860
- response = _context6.sent;
18861
- return _context6.abrupt("return", ChargeResponses.parse(response.data));
18832
+ response = _context5.sent;
18833
+ return _context5.abrupt("return", ChargeResponses.parse(response.data));
18862
18834
 
18863
18835
  case 9:
18864
18836
  case "end":
18865
- return _context6.stop();
18837
+ return _context5.stop();
18866
18838
  }
18867
18839
  }
18868
- }, _callee6);
18840
+ }, _callee5);
18869
18841
  }))();
18870
18842
  }
18871
18843
  };
@@ -19048,28 +19020,25 @@ var CardCharge = {
19048
19020
  };
19049
19021
  return this.listenForCharge(listenerOptions, callback);
19050
19022
  },
19051
- sendSavedCardsOTP: function sendSavedCardsOTP() {
19052
- return CardAPI$1.sendSavedCardsOTP(this.id);
19053
- },
19054
- addUserToSavedCards: function addUserToSavedCards(_ref4) {
19055
- var phone = _ref4.phone;
19056
- return CardAPI$1.addUserToSavedCards({
19023
+ sendSavedCardsOTP: function sendSavedCardsOTP(phone) {
19024
+ return CardAPI$1.sendSavedCardsOTP({
19057
19025
  phone: phone,
19058
19026
  transaction: this.id
19059
19027
  });
19060
19028
  },
19061
- verifySavedCardsOtp: function verifySavedCardsOtp(_ref5) {
19029
+ verifySavedCardsOtp: function verifySavedCardsOtp(_ref4) {
19062
19030
  var _this9 = this;
19063
19031
 
19064
19032
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
19065
- var code, payload, response;
19033
+ var code, token, payload, response;
19066
19034
  return regeneratorRuntime.wrap(function _callee$(_context) {
19067
19035
  while (1) {
19068
19036
  switch (_context.prev = _context.next) {
19069
19037
  case 0:
19070
- code = _ref5.code;
19038
+ code = _ref4.code, token = _ref4.token;
19071
19039
  payload = {
19072
19040
  code: code,
19041
+ token: token,
19073
19042
  transaction: _this9.id
19074
19043
  };
19075
19044
  _context.prev = 2;
@@ -19106,8 +19075,8 @@ var CardCharge = {
19106
19075
  token: this.savedCardsToken
19107
19076
  });
19108
19077
  },
19109
- chargeSavedCard: function chargeSavedCard(_ref6) {
19110
- var cardCode = _ref6.cardCode;
19078
+ chargeSavedCard: function chargeSavedCard(_ref5) {
19079
+ var cardCode = _ref5.cardCode;
19111
19080
  return CardAPI$1.chargeSavedCard({
19112
19081
  cardCode: cardCode,
19113
19082
  transaction: this.id,
@@ -20764,21 +20733,6 @@ var ToolkitAPI = {
20764
20733
  resolvedCardBins[bin] = data;
20765
20734
  return data;
20766
20735
  });
20767
- },
20768
- resolveIPAddress: function resolveIPAddress(ipAddress) {
20769
- var url = new URL("decision/resolve_ip/".concat(ipAddress), configToUse.paystackApiUrl).toString();
20770
- var language = getLanguage();
20771
-
20772
- var headers = _objectSpread2({}, language && {
20773
- 'Accept-Language': language
20774
- });
20775
-
20776
- return axiosInstance.get(url, {
20777
- headers: headers
20778
- }).then(function (_ref2) {
20779
- var data = _ref2.data;
20780
- return data;
20781
- });
20782
20736
  }
20783
20737
  };
20784
20738
 
@@ -20844,11 +20798,6 @@ var Toolkit = /*#__PURE__*/function () {
20844
20798
  value: function resolveCardBin(bin) {
20845
20799
  return ToolkitAPI.resolveCardBin(bin);
20846
20800
  }
20847
- }, {
20848
- key: "resolveIPAddress",
20849
- value: function resolveIPAddress(ipAddress) {
20850
- return ToolkitAPI.resolveIPAddress(ipAddress);
20851
- }
20852
20801
  }]);
20853
20802
 
20854
20803
  return Toolkit;
package/lib/checkout.js CHANGED
@@ -18669,30 +18669,34 @@ var CardAPI$1 = {
18669
18669
  return ChargeResponses.parse(response.data);
18670
18670
  });
18671
18671
  },
18672
- sendSavedCardsOTP: function sendSavedCardsOTP(transaction) {
18672
+ sendSavedCardsOTP: function sendSavedCardsOTP(_ref6) {
18673
18673
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
18674
- var url, language, headers, response;
18674
+ var transaction, phone, url, language, headers, data, response;
18675
18675
  return regeneratorRuntime.wrap(function _callee$(_context) {
18676
18676
  while (1) {
18677
18677
  switch (_context.prev = _context.next) {
18678
18678
  case 0:
18679
+ transaction = _ref6.transaction, phone = _ref6.phone;
18679
18680
  url = new URL('/saved_cards/authorize', configToUse.paystackApiUrl).toString();
18680
18681
  language = getLanguage();
18681
18682
  headers = _objectSpread2({}, language && {
18682
18683
  'Accept-Language': language
18683
18684
  });
18684
- _context.next = 5;
18685
- return axiosInstance.post(url, {
18685
+ data = _objectSpread2(_objectSpread2({}, phone && {
18686
+ phone: phone
18687
+ }), {}, {
18686
18688
  transaction: transaction
18687
- }, {
18689
+ });
18690
+ _context.next = 7;
18691
+ return axiosInstance.post(url, data, {
18688
18692
  headers: headers
18689
18693
  });
18690
18694
 
18691
- case 5:
18695
+ case 7:
18692
18696
  response = _context.sent;
18693
18697
  return _context.abrupt("return", response.data);
18694
18698
 
18695
- case 7:
18699
+ case 9:
18696
18700
  case "end":
18697
18701
  return _context.stop();
18698
18702
  }
@@ -18700,21 +18704,23 @@ var CardAPI$1 = {
18700
18704
  }, _callee);
18701
18705
  }))();
18702
18706
  },
18703
- addUserToSavedCards: function addUserToSavedCards(_ref6) {
18707
+ verifySavedCardsOtp: function verifySavedCardsOtp(_ref7) {
18704
18708
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
18705
- var phone, transaction, url, language, headers, data, response;
18709
+ var code, transaction, token, url, language, headers, data, response;
18706
18710
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
18707
18711
  while (1) {
18708
18712
  switch (_context2.prev = _context2.next) {
18709
18713
  case 0:
18710
- phone = _ref6.phone, transaction = _ref6.transaction;
18711
- url = new URL('/saved_cards/user', configToUse.paystackApiUrl).toString();
18714
+ code = _ref7.code, transaction = _ref7.transaction, token = _ref7.token;
18715
+ url = new URL('/saved_cards/authorize/verify', configToUse.paystackApiUrl).toString();
18712
18716
  language = getLanguage();
18713
- headers = _objectSpread2({}, language && {
18717
+ headers = _objectSpread2({
18718
+ Authorization: "Bearer ".concat(token)
18719
+ }, language && {
18714
18720
  'Accept-Language': language
18715
18721
  });
18716
18722
  data = {
18717
- phone: phone,
18723
+ code: code,
18718
18724
  transaction: transaction
18719
18725
  };
18720
18726
  _context2.next = 7;
@@ -18734,46 +18740,12 @@ var CardAPI$1 = {
18734
18740
  }, _callee2);
18735
18741
  }))();
18736
18742
  },
18737
- verifySavedCardsOtp: function verifySavedCardsOtp(_ref7) {
18743
+ getSavedCards: function getSavedCards(_ref8) {
18738
18744
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
18739
- var code, transaction, url, language, headers, data, response;
18745
+ var token, url, language, headers, response;
18740
18746
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
18741
18747
  while (1) {
18742
18748
  switch (_context3.prev = _context3.next) {
18743
- case 0:
18744
- code = _ref7.code, transaction = _ref7.transaction;
18745
- url = new URL('/saved_cards/authorize/verify', configToUse.paystackApiUrl).toString();
18746
- language = getLanguage();
18747
- headers = _objectSpread2({}, language && {
18748
- 'Accept-Language': language
18749
- });
18750
- data = {
18751
- code: code,
18752
- transaction: transaction
18753
- };
18754
- _context3.next = 7;
18755
- return axiosInstance.post(url, data, {
18756
- headers: headers
18757
- });
18758
-
18759
- case 7:
18760
- response = _context3.sent;
18761
- return _context3.abrupt("return", response.data);
18762
-
18763
- case 9:
18764
- case "end":
18765
- return _context3.stop();
18766
- }
18767
- }
18768
- }, _callee3);
18769
- }))();
18770
- },
18771
- getSavedCards: function getSavedCards(_ref8) {
18772
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
18773
- var token, url, language, headers, response;
18774
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
18775
- while (1) {
18776
- switch (_context4.prev = _context4.next) {
18777
18749
  case 0:
18778
18750
  token = _ref8.token;
18779
18751
  url = new URL('/saved_cards/cards', configToUse.paystackApiUrl).toString();
@@ -18784,29 +18756,29 @@ var CardAPI$1 = {
18784
18756
  }, language && {
18785
18757
  'Accept-Language': language
18786
18758
  });
18787
- _context4.next = 6;
18759
+ _context3.next = 6;
18788
18760
  return axiosInstance.get(url, {
18789
18761
  headers: headers
18790
18762
  });
18791
18763
 
18792
18764
  case 6:
18793
- response = _context4.sent;
18794
- return _context4.abrupt("return", response.data);
18765
+ response = _context3.sent;
18766
+ return _context3.abrupt("return", response.data);
18795
18767
 
18796
18768
  case 8:
18797
18769
  case "end":
18798
- return _context4.stop();
18770
+ return _context3.stop();
18799
18771
  }
18800
18772
  }
18801
- }, _callee4);
18773
+ }, _callee3);
18802
18774
  }))();
18803
18775
  },
18804
18776
  deleteSavedCard: function deleteSavedCard(_ref9) {
18805
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
18777
+ return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
18806
18778
  var cardCode, token, url, language, headers, response;
18807
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
18779
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
18808
18780
  while (1) {
18809
- switch (_context5.prev = _context5.next) {
18781
+ switch (_context4.prev = _context4.next) {
18810
18782
  case 0:
18811
18783
  cardCode = _ref9.cardCode, token = _ref9.token;
18812
18784
  url = new URL("/saved_cards/cards/".concat(cardCode), configToUse.paystackApiUrl).toString();
@@ -18817,29 +18789,29 @@ var CardAPI$1 = {
18817
18789
  }, language && {
18818
18790
  'Accept-Language': language
18819
18791
  });
18820
- _context5.next = 6;
18792
+ _context4.next = 6;
18821
18793
  return axiosInstance.delete(url, {
18822
18794
  headers: headers
18823
18795
  });
18824
18796
 
18825
18797
  case 6:
18826
- response = _context5.sent;
18827
- return _context5.abrupt("return", response.data);
18798
+ response = _context4.sent;
18799
+ return _context4.abrupt("return", response.data);
18828
18800
 
18829
18801
  case 8:
18830
18802
  case "end":
18831
- return _context5.stop();
18803
+ return _context4.stop();
18832
18804
  }
18833
18805
  }
18834
- }, _callee5);
18806
+ }, _callee4);
18835
18807
  }))();
18836
18808
  },
18837
18809
  chargeSavedCard: function chargeSavedCard(_ref10) {
18838
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
18810
+ return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
18839
18811
  var token, device, cardCode, transaction, selectedCurrency, url, language, headers, data, response;
18840
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
18812
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
18841
18813
  while (1) {
18842
- switch (_context6.prev = _context6.next) {
18814
+ switch (_context5.prev = _context5.next) {
18843
18815
  case 0:
18844
18816
  token = _ref10.token, device = _ref10.device, cardCode = _ref10.cardCode, transaction = _ref10.transaction, selectedCurrency = _ref10.selectedCurrency;
18845
18817
  url = new URL("/saved_cards/cards/".concat(cardCode, "/charge"), configToUse.paystackApiUrl).toString();
@@ -18855,21 +18827,21 @@ var CardAPI$1 = {
18855
18827
  transaction: transaction,
18856
18828
  selected_currency: selectedCurrency
18857
18829
  };
18858
- _context6.next = 7;
18830
+ _context5.next = 7;
18859
18831
  return axiosInstance.post(url, data, {
18860
18832
  headers: headers
18861
18833
  });
18862
18834
 
18863
18835
  case 7:
18864
- response = _context6.sent;
18865
- return _context6.abrupt("return", ChargeResponses.parse(response.data));
18836
+ response = _context5.sent;
18837
+ return _context5.abrupt("return", ChargeResponses.parse(response.data));
18866
18838
 
18867
18839
  case 9:
18868
18840
  case "end":
18869
- return _context6.stop();
18841
+ return _context5.stop();
18870
18842
  }
18871
18843
  }
18872
- }, _callee6);
18844
+ }, _callee5);
18873
18845
  }))();
18874
18846
  }
18875
18847
  };
@@ -19052,28 +19024,25 @@ var CardCharge = {
19052
19024
  };
19053
19025
  return this.listenForCharge(listenerOptions, callback);
19054
19026
  },
19055
- sendSavedCardsOTP: function sendSavedCardsOTP() {
19056
- return CardAPI$1.sendSavedCardsOTP(this.id);
19057
- },
19058
- addUserToSavedCards: function addUserToSavedCards(_ref4) {
19059
- var phone = _ref4.phone;
19060
- return CardAPI$1.addUserToSavedCards({
19027
+ sendSavedCardsOTP: function sendSavedCardsOTP(phone) {
19028
+ return CardAPI$1.sendSavedCardsOTP({
19061
19029
  phone: phone,
19062
19030
  transaction: this.id
19063
19031
  });
19064
19032
  },
19065
- verifySavedCardsOtp: function verifySavedCardsOtp(_ref5) {
19033
+ verifySavedCardsOtp: function verifySavedCardsOtp(_ref4) {
19066
19034
  var _this9 = this;
19067
19035
 
19068
19036
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
19069
- var code, payload, response;
19037
+ var code, token, payload, response;
19070
19038
  return regeneratorRuntime.wrap(function _callee$(_context) {
19071
19039
  while (1) {
19072
19040
  switch (_context.prev = _context.next) {
19073
19041
  case 0:
19074
- code = _ref5.code;
19042
+ code = _ref4.code, token = _ref4.token;
19075
19043
  payload = {
19076
19044
  code: code,
19045
+ token: token,
19077
19046
  transaction: _this9.id
19078
19047
  };
19079
19048
  _context.prev = 2;
@@ -19110,8 +19079,8 @@ var CardCharge = {
19110
19079
  token: this.savedCardsToken
19111
19080
  });
19112
19081
  },
19113
- chargeSavedCard: function chargeSavedCard(_ref6) {
19114
- var cardCode = _ref6.cardCode;
19082
+ chargeSavedCard: function chargeSavedCard(_ref5) {
19083
+ var cardCode = _ref5.cardCode;
19115
19084
  return CardAPI$1.chargeSavedCard({
19116
19085
  cardCode: cardCode,
19117
19086
  transaction: this.id,
@@ -20768,21 +20737,6 @@ var ToolkitAPI = {
20768
20737
  resolvedCardBins[bin] = data;
20769
20738
  return data;
20770
20739
  });
20771
- },
20772
- resolveIPAddress: function resolveIPAddress(ipAddress) {
20773
- var url = new URL("decision/resolve_ip/".concat(ipAddress), configToUse.paystackApiUrl).toString();
20774
- var language = getLanguage();
20775
-
20776
- var headers = _objectSpread2({}, language && {
20777
- 'Accept-Language': language
20778
- });
20779
-
20780
- return axiosInstance.get(url, {
20781
- headers: headers
20782
- }).then(function (_ref2) {
20783
- var data = _ref2.data;
20784
- return data;
20785
- });
20786
20740
  }
20787
20741
  };
20788
20742
 
@@ -20848,11 +20802,6 @@ var Toolkit = /*#__PURE__*/function () {
20848
20802
  value: function resolveCardBin(bin) {
20849
20803
  return ToolkitAPI.resolveCardBin(bin);
20850
20804
  }
20851
- }, {
20852
- key: "resolveIPAddress",
20853
- value: function resolveIPAddress(ipAddress) {
20854
- return ToolkitAPI.resolveIPAddress(ipAddress);
20855
- }
20856
20805
  }]);
20857
20806
 
20858
20807
  return Toolkit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/checkout-js",
3
- "version": "1.23.0-dev.2",
3
+ "version": "1.23.1",
4
4
  "description": "Client-side JS library for billing on Paystack",
5
5
  "main": "lib/checkout.js",
6
6
  "module": "es/checkout.js",