@paystack/checkout-js 1.28.0-dev.4 → 1.28.0-dev.6

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
@@ -21308,6 +21308,8 @@ var Paystack = (function (exports) {
21308
21308
  return this.saveLog();
21309
21309
  },
21310
21310
  logAPIResponse: function logAPIResponse(response, channel) {
21311
+ console.log('api response', response);
21312
+
21311
21313
  switch (response.status) {
21312
21314
  case 'authorized':
21313
21315
  return this.logAuthorized(channel);
@@ -21400,6 +21402,8 @@ var Paystack = (function (exports) {
21400
21402
  }
21401
21403
  };
21402
21404
 
21405
+ var PAYMENT_METHOD = 'card';
21406
+
21403
21407
  var PreauthorizationInstance = /*#__PURE__*/function () {
21404
21408
  function PreauthorizationInstance(data) {
21405
21409
  _classCallCheck(this, PreauthorizationInstance);
@@ -21438,12 +21442,37 @@ var Paystack = (function (exports) {
21438
21442
  }
21439
21443
  }, {
21440
21444
  key: "requery",
21441
- value: function requery() {
21442
- return PreauthorisationAPI.requery({
21443
- reference: this.reference,
21444
- publicKey: this.merchant.key
21445
- });
21446
- }
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", PreauthorisationAPI.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
+ }()
21447
21476
  }, {
21448
21477
  key: "listenForCharge",
21449
21478
  value: function listenForCharge(options, callback) {
package/es/checkout.js CHANGED
@@ -21305,6 +21305,8 @@ var AnalyticsFunctions = {
21305
21305
  return this.saveLog();
21306
21306
  },
21307
21307
  logAPIResponse: function logAPIResponse(response, channel) {
21308
+ console.log('api response', response);
21309
+
21308
21310
  switch (response.status) {
21309
21311
  case 'authorized':
21310
21312
  return this.logAuthorized(channel);
@@ -21397,6 +21399,8 @@ var AnalyticsFunctions = {
21397
21399
  }
21398
21400
  };
21399
21401
 
21402
+ var PAYMENT_METHOD = 'card';
21403
+
21400
21404
  var PreauthorizationInstance = /*#__PURE__*/function () {
21401
21405
  function PreauthorizationInstance(data) {
21402
21406
  _classCallCheck(this, PreauthorizationInstance);
@@ -21435,12 +21439,37 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
21435
21439
  }
21436
21440
  }, {
21437
21441
  key: "requery",
21438
- value: function requery() {
21439
- return PreauthorisationAPI.requery({
21440
- reference: this.reference,
21441
- publicKey: this.merchant.key
21442
- });
21443
- }
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", PreauthorisationAPI.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
+ }()
21444
21473
  }, {
21445
21474
  key: "listenForCharge",
21446
21475
  value: function listenForCharge(options, callback) {
package/lib/checkout.js CHANGED
@@ -21309,6 +21309,8 @@ var AnalyticsFunctions = {
21309
21309
  return this.saveLog();
21310
21310
  },
21311
21311
  logAPIResponse: function logAPIResponse(response, channel) {
21312
+ console.log('api response', response);
21313
+
21312
21314
  switch (response.status) {
21313
21315
  case 'authorized':
21314
21316
  return this.logAuthorized(channel);
@@ -21401,6 +21403,8 @@ var AnalyticsFunctions = {
21401
21403
  }
21402
21404
  };
21403
21405
 
21406
+ var PAYMENT_METHOD = 'card';
21407
+
21404
21408
  var PreauthorizationInstance = /*#__PURE__*/function () {
21405
21409
  function PreauthorizationInstance(data) {
21406
21410
  _classCallCheck(this, PreauthorizationInstance);
@@ -21439,12 +21443,37 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
21439
21443
  }
21440
21444
  }, {
21441
21445
  key: "requery",
21442
- value: function requery() {
21443
- return PreauthorisationAPI.requery({
21444
- reference: this.reference,
21445
- publicKey: this.merchant.key
21446
- });
21447
- }
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", PreauthorisationAPI.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
+ }()
21448
21477
  }, {
21449
21478
  key: "listenForCharge",
21450
21479
  value: function listenForCharge(options, callback) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/checkout-js",
3
- "version": "1.28.0-dev.4",
3
+ "version": "1.28.0-dev.6",
4
4
  "description": "Client-side JS library for billing on Paystack",
5
5
  "main": "lib/checkout.js",
6
6
  "module": "es/checkout.js",