@paystack/checkout-js 1.28.0-dev.10 → 1.28.0-dev.11

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 CHANGED
@@ -48,6 +48,6 @@ Checkout JS is deployed to three environments:
48
48
 
49
49
  Checkout JS is automatically packaged and published to the NPM registry on every push to the `master` and `dev` branches.
50
50
 
51
- The `master` branch is publised under the `latest` tag that can be installed by running `npm i @paystack/checkout-js@latest` while the `dev` branch is published under the `dev` tag so it can be installed using `npm i @paystack/checkout-js@dev`
51
+ The `master` branch is publised under the `latest` tag and can be installed by running `npm i @paystack/checkout-js@latest` while the `dev` branch is published under the `dev` tag and can be installed using `npm i @paystack/checkout-js@dev`
52
52
 
53
53
  All published versions are listed here on NPM https://www.npmjs.com/package/@paystack/checkout-js
package/dist/checkout.js CHANGED
@@ -18768,21 +18768,23 @@ var Paystack = (function (exports) {
18768
18768
  },
18769
18769
  sendSavedCardsOTP: function sendSavedCardsOTP(_ref6) {
18770
18770
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
18771
- var transaction, phone, channels, url, language, headers, data, response;
18771
+ var transaction, phone, channels, email, url, language, headers, data, response;
18772
18772
  return regeneratorRuntime.wrap(function _callee$(_context) {
18773
18773
  while (1) {
18774
18774
  switch (_context.prev = _context.next) {
18775
18775
  case 0:
18776
- transaction = _ref6.transaction, phone = _ref6.phone, channels = _ref6.channels;
18776
+ transaction = _ref6.transaction, phone = _ref6.phone, channels = _ref6.channels, email = _ref6.email;
18777
18777
  url = new URL('/saved_cards/authorize', configToUse.paystackApiUrl).toString();
18778
18778
  language = getLanguage();
18779
18779
  headers = _objectSpread2({}, language && {
18780
18780
  'Accept-Language': language
18781
18781
  });
18782
- data = _objectSpread2(_objectSpread2(_objectSpread2({}, phone && {
18782
+ data = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, phone && {
18783
18783
  phone: phone
18784
18784
  }), channels && {
18785
18785
  channels: channels
18786
+ }), email && {
18787
+ email: email
18786
18788
  }), {}, {
18787
18789
  transaction: transaction
18788
18790
  });
@@ -19127,46 +19129,48 @@ var Paystack = (function (exports) {
19127
19129
  };
19128
19130
  return this.listenForCharge(listenerOptions, callback);
19129
19131
  },
19130
- sendSavedCardsOTP: function sendSavedCardsOTP(phone, channels) {
19132
+ sendSavedCardsOTP: function sendSavedCardsOTP(_ref4) {
19131
19133
  var _this9 = this;
19132
19134
 
19133
19135
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
19134
- var response;
19136
+ var phone, channels, email, response;
19135
19137
  return regeneratorRuntime.wrap(function _callee$(_context) {
19136
19138
  while (1) {
19137
19139
  switch (_context.prev = _context.next) {
19138
19140
  case 0:
19139
- _context.prev = 0;
19141
+ phone = _ref4.phone, channels = _ref4.channels, email = _ref4.email;
19142
+ _context.prev = 1;
19140
19143
 
19141
19144
  _this9.logAuth(savedCardMethods.authentication);
19142
19145
 
19143
- _context.next = 4;
19146
+ _context.next = 5;
19144
19147
  return CardAPI$1.sendSavedCardsOTP({
19145
19148
  phone: phone,
19146
19149
  transaction: _this9.id,
19147
- channels: channels
19150
+ channels: channels,
19151
+ email: email
19148
19152
  });
19149
19153
 
19150
- case 4:
19154
+ case 5:
19151
19155
  response = _context.sent;
19152
19156
  _this9.savedCardsTempAuthToken = response.data.token;
19153
19157
  return _context.abrupt("return", response);
19154
19158
 
19155
- case 9:
19156
- _context.prev = 9;
19157
- _context.t0 = _context["catch"](0);
19159
+ case 10:
19160
+ _context.prev = 10;
19161
+ _context.t0 = _context["catch"](1);
19158
19162
  _this9.savedCardsTempAuthToken = null;
19159
19163
  throw _context.t0;
19160
19164
 
19161
- case 13:
19165
+ case 14:
19162
19166
  case "end":
19163
19167
  return _context.stop();
19164
19168
  }
19165
19169
  }
19166
- }, _callee, null, [[0, 9]]);
19170
+ }, _callee, null, [[1, 10]]);
19167
19171
  }))();
19168
19172
  },
19169
- verifySavedCardsOtp: function verifySavedCardsOtp(_ref4) {
19173
+ verifySavedCardsOtp: function verifySavedCardsOtp(_ref5) {
19170
19174
  var _this10 = this;
19171
19175
 
19172
19176
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
@@ -19175,7 +19179,7 @@ var Paystack = (function (exports) {
19175
19179
  while (1) {
19176
19180
  switch (_context2.prev = _context2.next) {
19177
19181
  case 0:
19178
- code = _ref4.code;
19182
+ code = _ref5.code;
19179
19183
  payload = {
19180
19184
  code: code,
19181
19185
  transaction: _this10.id,
@@ -19215,10 +19219,10 @@ var Paystack = (function (exports) {
19215
19219
  token: this.savedCardsToken
19216
19220
  });
19217
19221
  },
19218
- chargeSavedCard: function chargeSavedCard(_ref5) {
19219
- var cardCode = _ref5.cardCode,
19220
- _ref5$selectedCurrenc = _ref5.selectedCurrency,
19221
- selectedCurrency = _ref5$selectedCurrenc === void 0 ? this.currency : _ref5$selectedCurrenc;
19222
+ chargeSavedCard: function chargeSavedCard(_ref6) {
19223
+ var cardCode = _ref6.cardCode,
19224
+ _ref6$selectedCurrenc = _ref6.selectedCurrency,
19225
+ selectedCurrency = _ref6$selectedCurrenc === void 0 ? this.currency : _ref6$selectedCurrenc;
19222
19226
  this.logAttempt(savedCardMethods.payment);
19223
19227
  return CardAPI$1.chargeSavedCard({
19224
19228
  cardCode: cardCode,
package/es/checkout.js CHANGED
@@ -18765,21 +18765,23 @@ var CardAPI$1 = {
18765
18765
  },
18766
18766
  sendSavedCardsOTP: function sendSavedCardsOTP(_ref6) {
18767
18767
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
18768
- var transaction, phone, channels, url, language, headers, data, response;
18768
+ var transaction, phone, channels, email, url, language, headers, data, response;
18769
18769
  return regeneratorRuntime.wrap(function _callee$(_context) {
18770
18770
  while (1) {
18771
18771
  switch (_context.prev = _context.next) {
18772
18772
  case 0:
18773
- transaction = _ref6.transaction, phone = _ref6.phone, channels = _ref6.channels;
18773
+ transaction = _ref6.transaction, phone = _ref6.phone, channels = _ref6.channels, email = _ref6.email;
18774
18774
  url = new URL('/saved_cards/authorize', configToUse.paystackApiUrl).toString();
18775
18775
  language = getLanguage();
18776
18776
  headers = _objectSpread2({}, language && {
18777
18777
  'Accept-Language': language
18778
18778
  });
18779
- data = _objectSpread2(_objectSpread2(_objectSpread2({}, phone && {
18779
+ data = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, phone && {
18780
18780
  phone: phone
18781
18781
  }), channels && {
18782
18782
  channels: channels
18783
+ }), email && {
18784
+ email: email
18783
18785
  }), {}, {
18784
18786
  transaction: transaction
18785
18787
  });
@@ -19124,46 +19126,48 @@ var CardCharge = {
19124
19126
  };
19125
19127
  return this.listenForCharge(listenerOptions, callback);
19126
19128
  },
19127
- sendSavedCardsOTP: function sendSavedCardsOTP(phone, channels) {
19129
+ sendSavedCardsOTP: function sendSavedCardsOTP(_ref4) {
19128
19130
  var _this9 = this;
19129
19131
 
19130
19132
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
19131
- var response;
19133
+ var phone, channels, email, response;
19132
19134
  return regeneratorRuntime.wrap(function _callee$(_context) {
19133
19135
  while (1) {
19134
19136
  switch (_context.prev = _context.next) {
19135
19137
  case 0:
19136
- _context.prev = 0;
19138
+ phone = _ref4.phone, channels = _ref4.channels, email = _ref4.email;
19139
+ _context.prev = 1;
19137
19140
 
19138
19141
  _this9.logAuth(savedCardMethods.authentication);
19139
19142
 
19140
- _context.next = 4;
19143
+ _context.next = 5;
19141
19144
  return CardAPI$1.sendSavedCardsOTP({
19142
19145
  phone: phone,
19143
19146
  transaction: _this9.id,
19144
- channels: channels
19147
+ channels: channels,
19148
+ email: email
19145
19149
  });
19146
19150
 
19147
- case 4:
19151
+ case 5:
19148
19152
  response = _context.sent;
19149
19153
  _this9.savedCardsTempAuthToken = response.data.token;
19150
19154
  return _context.abrupt("return", response);
19151
19155
 
19152
- case 9:
19153
- _context.prev = 9;
19154
- _context.t0 = _context["catch"](0);
19156
+ case 10:
19157
+ _context.prev = 10;
19158
+ _context.t0 = _context["catch"](1);
19155
19159
  _this9.savedCardsTempAuthToken = null;
19156
19160
  throw _context.t0;
19157
19161
 
19158
- case 13:
19162
+ case 14:
19159
19163
  case "end":
19160
19164
  return _context.stop();
19161
19165
  }
19162
19166
  }
19163
- }, _callee, null, [[0, 9]]);
19167
+ }, _callee, null, [[1, 10]]);
19164
19168
  }))();
19165
19169
  },
19166
- verifySavedCardsOtp: function verifySavedCardsOtp(_ref4) {
19170
+ verifySavedCardsOtp: function verifySavedCardsOtp(_ref5) {
19167
19171
  var _this10 = this;
19168
19172
 
19169
19173
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
@@ -19172,7 +19176,7 @@ var CardCharge = {
19172
19176
  while (1) {
19173
19177
  switch (_context2.prev = _context2.next) {
19174
19178
  case 0:
19175
- code = _ref4.code;
19179
+ code = _ref5.code;
19176
19180
  payload = {
19177
19181
  code: code,
19178
19182
  transaction: _this10.id,
@@ -19212,10 +19216,10 @@ var CardCharge = {
19212
19216
  token: this.savedCardsToken
19213
19217
  });
19214
19218
  },
19215
- chargeSavedCard: function chargeSavedCard(_ref5) {
19216
- var cardCode = _ref5.cardCode,
19217
- _ref5$selectedCurrenc = _ref5.selectedCurrency,
19218
- selectedCurrency = _ref5$selectedCurrenc === void 0 ? this.currency : _ref5$selectedCurrenc;
19219
+ chargeSavedCard: function chargeSavedCard(_ref6) {
19220
+ var cardCode = _ref6.cardCode,
19221
+ _ref6$selectedCurrenc = _ref6.selectedCurrency,
19222
+ selectedCurrency = _ref6$selectedCurrenc === void 0 ? this.currency : _ref6$selectedCurrenc;
19219
19223
  this.logAttempt(savedCardMethods.payment);
19220
19224
  return CardAPI$1.chargeSavedCard({
19221
19225
  cardCode: cardCode,
package/lib/checkout.js CHANGED
@@ -18769,21 +18769,23 @@ var CardAPI$1 = {
18769
18769
  },
18770
18770
  sendSavedCardsOTP: function sendSavedCardsOTP(_ref6) {
18771
18771
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
18772
- var transaction, phone, channels, url, language, headers, data, response;
18772
+ var transaction, phone, channels, email, url, language, headers, data, response;
18773
18773
  return regeneratorRuntime.wrap(function _callee$(_context) {
18774
18774
  while (1) {
18775
18775
  switch (_context.prev = _context.next) {
18776
18776
  case 0:
18777
- transaction = _ref6.transaction, phone = _ref6.phone, channels = _ref6.channels;
18777
+ transaction = _ref6.transaction, phone = _ref6.phone, channels = _ref6.channels, email = _ref6.email;
18778
18778
  url = new URL('/saved_cards/authorize', configToUse.paystackApiUrl).toString();
18779
18779
  language = getLanguage();
18780
18780
  headers = _objectSpread2({}, language && {
18781
18781
  'Accept-Language': language
18782
18782
  });
18783
- data = _objectSpread2(_objectSpread2(_objectSpread2({}, phone && {
18783
+ data = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, phone && {
18784
18784
  phone: phone
18785
18785
  }), channels && {
18786
18786
  channels: channels
18787
+ }), email && {
18788
+ email: email
18787
18789
  }), {}, {
18788
18790
  transaction: transaction
18789
18791
  });
@@ -19128,46 +19130,48 @@ var CardCharge = {
19128
19130
  };
19129
19131
  return this.listenForCharge(listenerOptions, callback);
19130
19132
  },
19131
- sendSavedCardsOTP: function sendSavedCardsOTP(phone, channels) {
19133
+ sendSavedCardsOTP: function sendSavedCardsOTP(_ref4) {
19132
19134
  var _this9 = this;
19133
19135
 
19134
19136
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
19135
- var response;
19137
+ var phone, channels, email, response;
19136
19138
  return regeneratorRuntime.wrap(function _callee$(_context) {
19137
19139
  while (1) {
19138
19140
  switch (_context.prev = _context.next) {
19139
19141
  case 0:
19140
- _context.prev = 0;
19142
+ phone = _ref4.phone, channels = _ref4.channels, email = _ref4.email;
19143
+ _context.prev = 1;
19141
19144
 
19142
19145
  _this9.logAuth(savedCardMethods.authentication);
19143
19146
 
19144
- _context.next = 4;
19147
+ _context.next = 5;
19145
19148
  return CardAPI$1.sendSavedCardsOTP({
19146
19149
  phone: phone,
19147
19150
  transaction: _this9.id,
19148
- channels: channels
19151
+ channels: channels,
19152
+ email: email
19149
19153
  });
19150
19154
 
19151
- case 4:
19155
+ case 5:
19152
19156
  response = _context.sent;
19153
19157
  _this9.savedCardsTempAuthToken = response.data.token;
19154
19158
  return _context.abrupt("return", response);
19155
19159
 
19156
- case 9:
19157
- _context.prev = 9;
19158
- _context.t0 = _context["catch"](0);
19160
+ case 10:
19161
+ _context.prev = 10;
19162
+ _context.t0 = _context["catch"](1);
19159
19163
  _this9.savedCardsTempAuthToken = null;
19160
19164
  throw _context.t0;
19161
19165
 
19162
- case 13:
19166
+ case 14:
19163
19167
  case "end":
19164
19168
  return _context.stop();
19165
19169
  }
19166
19170
  }
19167
- }, _callee, null, [[0, 9]]);
19171
+ }, _callee, null, [[1, 10]]);
19168
19172
  }))();
19169
19173
  },
19170
- verifySavedCardsOtp: function verifySavedCardsOtp(_ref4) {
19174
+ verifySavedCardsOtp: function verifySavedCardsOtp(_ref5) {
19171
19175
  var _this10 = this;
19172
19176
 
19173
19177
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
@@ -19176,7 +19180,7 @@ var CardCharge = {
19176
19180
  while (1) {
19177
19181
  switch (_context2.prev = _context2.next) {
19178
19182
  case 0:
19179
- code = _ref4.code;
19183
+ code = _ref5.code;
19180
19184
  payload = {
19181
19185
  code: code,
19182
19186
  transaction: _this10.id,
@@ -19216,10 +19220,10 @@ var CardCharge = {
19216
19220
  token: this.savedCardsToken
19217
19221
  });
19218
19222
  },
19219
- chargeSavedCard: function chargeSavedCard(_ref5) {
19220
- var cardCode = _ref5.cardCode,
19221
- _ref5$selectedCurrenc = _ref5.selectedCurrency,
19222
- selectedCurrency = _ref5$selectedCurrenc === void 0 ? this.currency : _ref5$selectedCurrenc;
19223
+ chargeSavedCard: function chargeSavedCard(_ref6) {
19224
+ var cardCode = _ref6.cardCode,
19225
+ _ref6$selectedCurrenc = _ref6.selectedCurrency,
19226
+ selectedCurrency = _ref6$selectedCurrenc === void 0 ? this.currency : _ref6$selectedCurrenc;
19223
19227
  this.logAttempt(savedCardMethods.payment);
19224
19228
  return CardAPI$1.chargeSavedCard({
19225
19229
  cardCode: cardCode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/checkout-js",
3
- "version": "1.28.0-dev.10",
3
+ "version": "1.28.0-dev.11",
4
4
  "description": "Client-side JS library for billing on Paystack",
5
5
  "main": "lib/checkout.js",
6
6
  "module": "es/checkout.js",