@paystack/checkout-js 1.20.0-dev.1 → 1.20.0-dev.3

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
@@ -18328,6 +18328,57 @@ var Paystack = (function (exports) {
18328
18328
  }
18329
18329
  };
18330
18330
 
18331
+ var testCards = [{
18332
+ type: 'bank_auth',
18333
+ name: 'Bank authorization',
18334
+ number: '4084080000000409',
18335
+ cvv: '000',
18336
+ month: '01',
18337
+ year: '30'
18338
+ }, {
18339
+ type: 'success',
18340
+ name: 'Success',
18341
+ number: '4084084084084081',
18342
+ cvv: '408',
18343
+ month: '12',
18344
+ year: '30'
18345
+ }, {
18346
+ type: 'declined',
18347
+ name: 'Declined',
18348
+ number: '4084080000005408',
18349
+ cvv: '001',
18350
+ month: '12',
18351
+ year: '30'
18352
+ }, {
18353
+ type: 'pin',
18354
+ name: 'Pin only validation',
18355
+ number: '507850785078507812',
18356
+ cvv: '884',
18357
+ month: '01',
18358
+ year: '30'
18359
+ }, {
18360
+ type: 'pin+otp',
18361
+ name: 'Pin and OTP validation',
18362
+ number: '5060666666666666666',
18363
+ cvv: '123',
18364
+ month: '01',
18365
+ year: '30'
18366
+ }, {
18367
+ type: 'pin+phone+otp',
18368
+ name: 'Pin, phone and OTP validation',
18369
+ number: '507850785078507812',
18370
+ cvv: '884',
18371
+ month: '01',
18372
+ year: '30'
18373
+ }, {
18374
+ type: 'default',
18375
+ name: 'No validation',
18376
+ number: '4084084084084081',
18377
+ cvv: '408',
18378
+ month: '01',
18379
+ year: '30'
18380
+ }];
18381
+
18331
18382
  cardValidator.creditCardType.addCard({
18332
18383
  niceType: 'Verve',
18333
18384
  type: 'verve',
@@ -18685,12 +18736,12 @@ var Paystack = (function (exports) {
18685
18736
  },
18686
18737
  verifySavedCardsOtp: function verifySavedCardsOtp(_ref7) {
18687
18738
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
18688
- var code, phone, transaction, url, language, headers, data, response;
18739
+ var code, email, transaction, url, language, headers, data, response;
18689
18740
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
18690
18741
  while (1) {
18691
18742
  switch (_context3.prev = _context3.next) {
18692
18743
  case 0:
18693
- code = _ref7.code, phone = _ref7.phone, transaction = _ref7.transaction;
18744
+ code = _ref7.code, email = _ref7.email, transaction = _ref7.transaction;
18694
18745
  url = new URL('/authorize/verify', configToUse.savedCardsApiUrl).toString();
18695
18746
  language = getLanguage();
18696
18747
  headers = _objectSpread2({}, language && {
@@ -18698,7 +18749,7 @@ var Paystack = (function (exports) {
18698
18749
  });
18699
18750
  data = {
18700
18751
  code: code,
18701
- phone: phone,
18752
+ email: email,
18702
18753
  transaction: transaction
18703
18754
  };
18704
18755
  _context3.next = 7;
@@ -19013,15 +19064,15 @@ var Paystack = (function (exports) {
19013
19064
  var _this9 = this;
19014
19065
 
19015
19066
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
19016
- var code, phone, payload, response;
19067
+ var code, payload, response;
19017
19068
  return regeneratorRuntime.wrap(function _callee$(_context) {
19018
19069
  while (1) {
19019
19070
  switch (_context.prev = _context.next) {
19020
19071
  case 0:
19021
- code = _ref5.code, phone = _ref5.phone;
19072
+ code = _ref5.code;
19022
19073
  payload = {
19023
19074
  code: code,
19024
- phone: phone,
19075
+ email: _this9.email,
19025
19076
  transaction: _this9.id
19026
19077
  };
19027
19078
  _context.prev = 2;
package/es/checkout.js CHANGED
@@ -18325,6 +18325,57 @@ var Card$2 = {
18325
18325
  }
18326
18326
  };
18327
18327
 
18328
+ var testCards = [{
18329
+ type: 'bank_auth',
18330
+ name: 'Bank authorization',
18331
+ number: '4084080000000409',
18332
+ cvv: '000',
18333
+ month: '01',
18334
+ year: '30'
18335
+ }, {
18336
+ type: 'success',
18337
+ name: 'Success',
18338
+ number: '4084084084084081',
18339
+ cvv: '408',
18340
+ month: '12',
18341
+ year: '30'
18342
+ }, {
18343
+ type: 'declined',
18344
+ name: 'Declined',
18345
+ number: '4084080000005408',
18346
+ cvv: '001',
18347
+ month: '12',
18348
+ year: '30'
18349
+ }, {
18350
+ type: 'pin',
18351
+ name: 'Pin only validation',
18352
+ number: '507850785078507812',
18353
+ cvv: '884',
18354
+ month: '01',
18355
+ year: '30'
18356
+ }, {
18357
+ type: 'pin+otp',
18358
+ name: 'Pin and OTP validation',
18359
+ number: '5060666666666666666',
18360
+ cvv: '123',
18361
+ month: '01',
18362
+ year: '30'
18363
+ }, {
18364
+ type: 'pin+phone+otp',
18365
+ name: 'Pin, phone and OTP validation',
18366
+ number: '507850785078507812',
18367
+ cvv: '884',
18368
+ month: '01',
18369
+ year: '30'
18370
+ }, {
18371
+ type: 'default',
18372
+ name: 'No validation',
18373
+ number: '4084084084084081',
18374
+ cvv: '408',
18375
+ month: '01',
18376
+ year: '30'
18377
+ }];
18378
+
18328
18379
  cardValidator.creditCardType.addCard({
18329
18380
  niceType: 'Verve',
18330
18381
  type: 'verve',
@@ -18682,12 +18733,12 @@ var CardAPI$1 = {
18682
18733
  },
18683
18734
  verifySavedCardsOtp: function verifySavedCardsOtp(_ref7) {
18684
18735
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
18685
- var code, phone, transaction, url, language, headers, data, response;
18736
+ var code, email, transaction, url, language, headers, data, response;
18686
18737
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
18687
18738
  while (1) {
18688
18739
  switch (_context3.prev = _context3.next) {
18689
18740
  case 0:
18690
- code = _ref7.code, phone = _ref7.phone, transaction = _ref7.transaction;
18741
+ code = _ref7.code, email = _ref7.email, transaction = _ref7.transaction;
18691
18742
  url = new URL('/authorize/verify', configToUse.savedCardsApiUrl).toString();
18692
18743
  language = getLanguage();
18693
18744
  headers = _objectSpread2({}, language && {
@@ -18695,7 +18746,7 @@ var CardAPI$1 = {
18695
18746
  });
18696
18747
  data = {
18697
18748
  code: code,
18698
- phone: phone,
18749
+ email: email,
18699
18750
  transaction: transaction
18700
18751
  };
18701
18752
  _context3.next = 7;
@@ -19010,15 +19061,15 @@ var CardCharge = {
19010
19061
  var _this9 = this;
19011
19062
 
19012
19063
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
19013
- var code, phone, payload, response;
19064
+ var code, payload, response;
19014
19065
  return regeneratorRuntime.wrap(function _callee$(_context) {
19015
19066
  while (1) {
19016
19067
  switch (_context.prev = _context.next) {
19017
19068
  case 0:
19018
- code = _ref5.code, phone = _ref5.phone;
19069
+ code = _ref5.code;
19019
19070
  payload = {
19020
19071
  code: code,
19021
- phone: phone,
19072
+ email: _this9.email,
19022
19073
  transaction: _this9.id
19023
19074
  };
19024
19075
  _context.prev = 2;
package/lib/checkout.js CHANGED
@@ -18329,6 +18329,57 @@ var Card$2 = {
18329
18329
  }
18330
18330
  };
18331
18331
 
18332
+ var testCards = [{
18333
+ type: 'bank_auth',
18334
+ name: 'Bank authorization',
18335
+ number: '4084080000000409',
18336
+ cvv: '000',
18337
+ month: '01',
18338
+ year: '30'
18339
+ }, {
18340
+ type: 'success',
18341
+ name: 'Success',
18342
+ number: '4084084084084081',
18343
+ cvv: '408',
18344
+ month: '12',
18345
+ year: '30'
18346
+ }, {
18347
+ type: 'declined',
18348
+ name: 'Declined',
18349
+ number: '4084080000005408',
18350
+ cvv: '001',
18351
+ month: '12',
18352
+ year: '30'
18353
+ }, {
18354
+ type: 'pin',
18355
+ name: 'Pin only validation',
18356
+ number: '507850785078507812',
18357
+ cvv: '884',
18358
+ month: '01',
18359
+ year: '30'
18360
+ }, {
18361
+ type: 'pin+otp',
18362
+ name: 'Pin and OTP validation',
18363
+ number: '5060666666666666666',
18364
+ cvv: '123',
18365
+ month: '01',
18366
+ year: '30'
18367
+ }, {
18368
+ type: 'pin+phone+otp',
18369
+ name: 'Pin, phone and OTP validation',
18370
+ number: '507850785078507812',
18371
+ cvv: '884',
18372
+ month: '01',
18373
+ year: '30'
18374
+ }, {
18375
+ type: 'default',
18376
+ name: 'No validation',
18377
+ number: '4084084084084081',
18378
+ cvv: '408',
18379
+ month: '01',
18380
+ year: '30'
18381
+ }];
18382
+
18332
18383
  cardValidator.creditCardType.addCard({
18333
18384
  niceType: 'Verve',
18334
18385
  type: 'verve',
@@ -18686,12 +18737,12 @@ var CardAPI$1 = {
18686
18737
  },
18687
18738
  verifySavedCardsOtp: function verifySavedCardsOtp(_ref7) {
18688
18739
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
18689
- var code, phone, transaction, url, language, headers, data, response;
18740
+ var code, email, transaction, url, language, headers, data, response;
18690
18741
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
18691
18742
  while (1) {
18692
18743
  switch (_context3.prev = _context3.next) {
18693
18744
  case 0:
18694
- code = _ref7.code, phone = _ref7.phone, transaction = _ref7.transaction;
18745
+ code = _ref7.code, email = _ref7.email, transaction = _ref7.transaction;
18695
18746
  url = new URL('/authorize/verify', configToUse.savedCardsApiUrl).toString();
18696
18747
  language = getLanguage();
18697
18748
  headers = _objectSpread2({}, language && {
@@ -18699,7 +18750,7 @@ var CardAPI$1 = {
18699
18750
  });
18700
18751
  data = {
18701
18752
  code: code,
18702
- phone: phone,
18753
+ email: email,
18703
18754
  transaction: transaction
18704
18755
  };
18705
18756
  _context3.next = 7;
@@ -19014,15 +19065,15 @@ var CardCharge = {
19014
19065
  var _this9 = this;
19015
19066
 
19016
19067
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
19017
- var code, phone, payload, response;
19068
+ var code, payload, response;
19018
19069
  return regeneratorRuntime.wrap(function _callee$(_context) {
19019
19070
  while (1) {
19020
19071
  switch (_context.prev = _context.next) {
19021
19072
  case 0:
19022
- code = _ref5.code, phone = _ref5.phone;
19073
+ code = _ref5.code;
19023
19074
  payload = {
19024
19075
  code: code,
19025
- phone: phone,
19076
+ email: _this9.email,
19026
19077
  transaction: _this9.id
19027
19078
  };
19028
19079
  _context.prev = 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/checkout-js",
3
- "version": "1.20.0-dev.1",
3
+ "version": "1.20.0-dev.3",
4
4
  "description": "Client-side JS library for billing on Paystack",
5
5
  "main": "lib/checkout.js",
6
6
  "module": "es/checkout.js",