@paystack/checkout-js 1.28.0-dev.5 → 1.28.0-dev.7

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
@@ -21190,7 +21190,7 @@ var Paystack = (function (exports) {
21190
21190
  }
21191
21191
  };
21192
21192
 
21193
- var PreauthorisationAPI = {
21193
+ var PreauthorizationAPI = {
21194
21194
  getByAccessCode: function getByAccessCode(accessCode) {
21195
21195
  var language = getLanguage();
21196
21196
 
@@ -21357,7 +21357,7 @@ var Paystack = (function (exports) {
21357
21357
  return this.saveLog();
21358
21358
  },
21359
21359
  logAuthorized: function logAuthorized(channel) {
21360
- var message = 'Successfully preauthorised funds';
21360
+ var message = 'Successfully preauthorized funds';
21361
21361
 
21362
21362
  if (channel) {
21363
21363
  message += " with ".concat(channel);
@@ -21402,6 +21402,8 @@ var Paystack = (function (exports) {
21402
21402
  }
21403
21403
  };
21404
21404
 
21405
+ var PAYMENT_METHOD = 'card';
21406
+
21405
21407
  var PreauthorizationInstance = /*#__PURE__*/function () {
21406
21408
  function PreauthorizationInstance(data) {
21407
21409
  _classCallCheck(this, PreauthorizationInstance);
@@ -21440,12 +21442,37 @@ var Paystack = (function (exports) {
21440
21442
  }
21441
21443
  }, {
21442
21444
  key: "requery",
21443
- value: function requery() {
21444
- return PreauthorisationAPI.requery({
21445
- reference: this.reference,
21446
- publicKey: this.merchant.key
21447
- });
21448
- }
21445
+ value: function () {
21446
+ var _requery = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
21447
+ var _this = this;
21448
+
21449
+ return regeneratorRuntime.wrap(function _callee$(_context) {
21450
+ while (1) {
21451
+ switch (_context.prev = _context.next) {
21452
+ case 0:
21453
+ return _context.abrupt("return", PreauthorizationAPI.requery({
21454
+ reference: this.reference,
21455
+ publicKey: this.merchant.key
21456
+ }).then(function (response) {
21457
+ _this.logAPIResponse(response, PAYMENT_METHOD);
21458
+
21459
+ return response;
21460
+ }));
21461
+
21462
+ case 1:
21463
+ case "end":
21464
+ return _context.stop();
21465
+ }
21466
+ }
21467
+ }, _callee, this);
21468
+ }));
21469
+
21470
+ function requery() {
21471
+ return _requery.apply(this, arguments);
21472
+ }
21473
+
21474
+ return requery;
21475
+ }()
21449
21476
  }, {
21450
21477
  key: "listenForCharge",
21451
21478
  value: function listenForCharge(options, callback) {
@@ -21473,7 +21500,7 @@ var Paystack = (function (exports) {
21473
21500
  case 2:
21474
21501
  deviceFingerprint = _context.sent;
21475
21502
  _context.next = 5;
21476
- return PreauthorisationAPI.getByAccessCode(accessCode);
21503
+ return PreauthorizationAPI.getByAccessCode(accessCode);
21477
21504
 
21478
21505
  case 5:
21479
21506
  response = _context.sent;
package/es/checkout.js CHANGED
@@ -21187,7 +21187,7 @@ var CardPreauthorization = {
21187
21187
  }
21188
21188
  };
21189
21189
 
21190
- var PreauthorisationAPI = {
21190
+ var PreauthorizationAPI = {
21191
21191
  getByAccessCode: function getByAccessCode(accessCode) {
21192
21192
  var language = getLanguage();
21193
21193
 
@@ -21354,7 +21354,7 @@ var AnalyticsFunctions = {
21354
21354
  return this.saveLog();
21355
21355
  },
21356
21356
  logAuthorized: function logAuthorized(channel) {
21357
- var message = 'Successfully preauthorised funds';
21357
+ var message = 'Successfully preauthorized funds';
21358
21358
 
21359
21359
  if (channel) {
21360
21360
  message += " with ".concat(channel);
@@ -21399,6 +21399,8 @@ var AnalyticsFunctions = {
21399
21399
  }
21400
21400
  };
21401
21401
 
21402
+ var PAYMENT_METHOD = 'card';
21403
+
21402
21404
  var PreauthorizationInstance = /*#__PURE__*/function () {
21403
21405
  function PreauthorizationInstance(data) {
21404
21406
  _classCallCheck(this, PreauthorizationInstance);
@@ -21437,12 +21439,37 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
21437
21439
  }
21438
21440
  }, {
21439
21441
  key: "requery",
21440
- value: function requery() {
21441
- return PreauthorisationAPI.requery({
21442
- reference: this.reference,
21443
- publicKey: this.merchant.key
21444
- });
21445
- }
21442
+ value: function () {
21443
+ var _requery = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
21444
+ var _this = this;
21445
+
21446
+ return regeneratorRuntime.wrap(function _callee$(_context) {
21447
+ while (1) {
21448
+ switch (_context.prev = _context.next) {
21449
+ case 0:
21450
+ return _context.abrupt("return", PreauthorizationAPI.requery({
21451
+ reference: this.reference,
21452
+ publicKey: this.merchant.key
21453
+ }).then(function (response) {
21454
+ _this.logAPIResponse(response, PAYMENT_METHOD);
21455
+
21456
+ return response;
21457
+ }));
21458
+
21459
+ case 1:
21460
+ case "end":
21461
+ return _context.stop();
21462
+ }
21463
+ }
21464
+ }, _callee, this);
21465
+ }));
21466
+
21467
+ function requery() {
21468
+ return _requery.apply(this, arguments);
21469
+ }
21470
+
21471
+ return requery;
21472
+ }()
21446
21473
  }, {
21447
21474
  key: "listenForCharge",
21448
21475
  value: function listenForCharge(options, callback) {
@@ -21470,7 +21497,7 @@ var Preauthorization = {
21470
21497
  case 2:
21471
21498
  deviceFingerprint = _context.sent;
21472
21499
  _context.next = 5;
21473
- return PreauthorisationAPI.getByAccessCode(accessCode);
21500
+ return PreauthorizationAPI.getByAccessCode(accessCode);
21474
21501
 
21475
21502
  case 5:
21476
21503
  response = _context.sent;
package/lib/checkout.js CHANGED
@@ -21191,7 +21191,7 @@ var CardPreauthorization = {
21191
21191
  }
21192
21192
  };
21193
21193
 
21194
- var PreauthorisationAPI = {
21194
+ var PreauthorizationAPI = {
21195
21195
  getByAccessCode: function getByAccessCode(accessCode) {
21196
21196
  var language = getLanguage();
21197
21197
 
@@ -21358,7 +21358,7 @@ var AnalyticsFunctions = {
21358
21358
  return this.saveLog();
21359
21359
  },
21360
21360
  logAuthorized: function logAuthorized(channel) {
21361
- var message = 'Successfully preauthorised funds';
21361
+ var message = 'Successfully preauthorized funds';
21362
21362
 
21363
21363
  if (channel) {
21364
21364
  message += " with ".concat(channel);
@@ -21403,6 +21403,8 @@ var AnalyticsFunctions = {
21403
21403
  }
21404
21404
  };
21405
21405
 
21406
+ var PAYMENT_METHOD = 'card';
21407
+
21406
21408
  var PreauthorizationInstance = /*#__PURE__*/function () {
21407
21409
  function PreauthorizationInstance(data) {
21408
21410
  _classCallCheck(this, PreauthorizationInstance);
@@ -21441,12 +21443,37 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
21441
21443
  }
21442
21444
  }, {
21443
21445
  key: "requery",
21444
- value: function requery() {
21445
- return PreauthorisationAPI.requery({
21446
- reference: this.reference,
21447
- publicKey: this.merchant.key
21448
- });
21449
- }
21446
+ value: function () {
21447
+ var _requery = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
21448
+ var _this = this;
21449
+
21450
+ return regeneratorRuntime.wrap(function _callee$(_context) {
21451
+ while (1) {
21452
+ switch (_context.prev = _context.next) {
21453
+ case 0:
21454
+ return _context.abrupt("return", PreauthorizationAPI.requery({
21455
+ reference: this.reference,
21456
+ publicKey: this.merchant.key
21457
+ }).then(function (response) {
21458
+ _this.logAPIResponse(response, PAYMENT_METHOD);
21459
+
21460
+ return response;
21461
+ }));
21462
+
21463
+ case 1:
21464
+ case "end":
21465
+ return _context.stop();
21466
+ }
21467
+ }
21468
+ }, _callee, this);
21469
+ }));
21470
+
21471
+ function requery() {
21472
+ return _requery.apply(this, arguments);
21473
+ }
21474
+
21475
+ return requery;
21476
+ }()
21450
21477
  }, {
21451
21478
  key: "listenForCharge",
21452
21479
  value: function listenForCharge(options, callback) {
@@ -21474,7 +21501,7 @@ var Preauthorization = {
21474
21501
  case 2:
21475
21502
  deviceFingerprint = _context.sent;
21476
21503
  _context.next = 5;
21477
- return PreauthorisationAPI.getByAccessCode(accessCode);
21504
+ return PreauthorizationAPI.getByAccessCode(accessCode);
21478
21505
 
21479
21506
  case 5:
21480
21507
  response = _context.sent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/checkout-js",
3
- "version": "1.28.0-dev.5",
3
+ "version": "1.28.0-dev.7",
4
4
  "description": "Client-side JS library for billing on Paystack",
5
5
  "main": "lib/checkout.js",
6
6
  "module": "es/checkout.js",