@paystack/checkout-js 1.19.0-dev.20 → 1.19.0-dev.21

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
@@ -20705,7 +20705,6 @@ var Paystack = (function (exports) {
20705
20705
  this.metadata = data.metadata || {};
20706
20706
  this.customer = data.customer;
20707
20707
  this.channels = data.channels || ['card'];
20708
- this.deviceFingerprint = data.deviceFingerprint || null;
20709
20708
  this.isListening = false;
20710
20709
  this.merchant = {
20711
20710
  id: data.merchant_id,
@@ -20713,13 +20712,7 @@ var Paystack = (function (exports) {
20713
20712
  name: data.merchant_name,
20714
20713
  key: data.merchant_key
20715
20714
  };
20716
- loadPusher();
20717
- /**
20718
- * We initialize parameters we send to the API as empty strings
20719
- * when we don't have them instead of null because the API expects
20720
- * these parameters as URL params which means parameters are eventually converted to strings
20721
- */
20722
- // TODO: Bind charge function to card channel
20715
+ loadPusher(); // TODO: Bind charge function to card channel
20723
20716
  // https://paystack.atlassian.net/browse/RAILS-2887
20724
20717
  }
20725
20718
 
@@ -20728,16 +20721,6 @@ var Paystack = (function (exports) {
20728
20721
  value: function setMetadata(key, value) {
20729
20722
  this.metadata[key] = value;
20730
20723
  }
20731
- }, {
20732
- key: "setDevice",
20733
- value: function setDevice(uuid) {
20734
- if (this.deviceFingerprint) {
20735
- logMessage("Device ID has already been set by Checkout JS so there's no need to set this again");
20736
- } else {
20737
- this.deviceFingerprint = uuid;
20738
- }
20739
- } // eslint-disable-next-line consistent-return
20740
-
20741
20724
  }, {
20742
20725
  key: "listenForCharge",
20743
20726
  value: function listenForCharge(options, callback) {
@@ -20775,26 +20758,19 @@ var Paystack = (function (exports) {
20775
20758
  },
20776
20759
  getByAccessCode: function getByAccessCode(accessCode) {
20777
20760
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
20778
- var deviceFingerprint, response;
20761
+ var response;
20779
20762
  return regeneratorRuntime.wrap(function _callee$(_context) {
20780
20763
  while (1) {
20781
20764
  switch (_context.prev = _context.next) {
20782
20765
  case 0:
20783
20766
  _context.next = 2;
20784
- return getDeviceFingerprint();
20785
-
20786
- case 2:
20787
- deviceFingerprint = _context.sent;
20788
- _context.next = 5;
20789
20767
  return PreauthorisationAPI.getByAccessCode(accessCode);
20790
20768
 
20791
- case 5:
20769
+ case 2:
20792
20770
  response = _context.sent;
20793
- return _context.abrupt("return", response && Object.seal(new PreauthorizationInstance(_objectSpread2(_objectSpread2({}, response.data), {
20794
- deviceFingerprint: deviceFingerprint
20795
- }))));
20771
+ return _context.abrupt("return", response && Object.seal(new PreauthorizationInstance(_objectSpread2({}, response.data))));
20796
20772
 
20797
- case 7:
20773
+ case 4:
20798
20774
  case "end":
20799
20775
  return _context.stop();
20800
20776
  }
package/es/checkout.js CHANGED
@@ -20702,7 +20702,6 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
20702
20702
  this.metadata = data.metadata || {};
20703
20703
  this.customer = data.customer;
20704
20704
  this.channels = data.channels || ['card'];
20705
- this.deviceFingerprint = data.deviceFingerprint || null;
20706
20705
  this.isListening = false;
20707
20706
  this.merchant = {
20708
20707
  id: data.merchant_id,
@@ -20710,13 +20709,7 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
20710
20709
  name: data.merchant_name,
20711
20710
  key: data.merchant_key
20712
20711
  };
20713
- loadPusher();
20714
- /**
20715
- * We initialize parameters we send to the API as empty strings
20716
- * when we don't have them instead of null because the API expects
20717
- * these parameters as URL params which means parameters are eventually converted to strings
20718
- */
20719
- // TODO: Bind charge function to card channel
20712
+ loadPusher(); // TODO: Bind charge function to card channel
20720
20713
  // https://paystack.atlassian.net/browse/RAILS-2887
20721
20714
  }
20722
20715
 
@@ -20725,16 +20718,6 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
20725
20718
  value: function setMetadata(key, value) {
20726
20719
  this.metadata[key] = value;
20727
20720
  }
20728
- }, {
20729
- key: "setDevice",
20730
- value: function setDevice(uuid) {
20731
- if (this.deviceFingerprint) {
20732
- logMessage("Device ID has already been set by Checkout JS so there's no need to set this again");
20733
- } else {
20734
- this.deviceFingerprint = uuid;
20735
- }
20736
- } // eslint-disable-next-line consistent-return
20737
-
20738
20721
  }, {
20739
20722
  key: "listenForCharge",
20740
20723
  value: function listenForCharge(options, callback) {
@@ -20772,26 +20755,19 @@ var Preauthorization = {
20772
20755
  },
20773
20756
  getByAccessCode: function getByAccessCode(accessCode) {
20774
20757
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
20775
- var deviceFingerprint, response;
20758
+ var response;
20776
20759
  return regeneratorRuntime.wrap(function _callee$(_context) {
20777
20760
  while (1) {
20778
20761
  switch (_context.prev = _context.next) {
20779
20762
  case 0:
20780
20763
  _context.next = 2;
20781
- return getDeviceFingerprint();
20782
-
20783
- case 2:
20784
- deviceFingerprint = _context.sent;
20785
- _context.next = 5;
20786
20764
  return PreauthorisationAPI.getByAccessCode(accessCode);
20787
20765
 
20788
- case 5:
20766
+ case 2:
20789
20767
  response = _context.sent;
20790
- return _context.abrupt("return", response && Object.seal(new PreauthorizationInstance(_objectSpread2(_objectSpread2({}, response.data), {
20791
- deviceFingerprint: deviceFingerprint
20792
- }))));
20768
+ return _context.abrupt("return", response && Object.seal(new PreauthorizationInstance(_objectSpread2({}, response.data))));
20793
20769
 
20794
- case 7:
20770
+ case 4:
20795
20771
  case "end":
20796
20772
  return _context.stop();
20797
20773
  }
package/lib/checkout.js CHANGED
@@ -20706,7 +20706,6 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
20706
20706
  this.metadata = data.metadata || {};
20707
20707
  this.customer = data.customer;
20708
20708
  this.channels = data.channels || ['card'];
20709
- this.deviceFingerprint = data.deviceFingerprint || null;
20710
20709
  this.isListening = false;
20711
20710
  this.merchant = {
20712
20711
  id: data.merchant_id,
@@ -20714,13 +20713,7 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
20714
20713
  name: data.merchant_name,
20715
20714
  key: data.merchant_key
20716
20715
  };
20717
- loadPusher();
20718
- /**
20719
- * We initialize parameters we send to the API as empty strings
20720
- * when we don't have them instead of null because the API expects
20721
- * these parameters as URL params which means parameters are eventually converted to strings
20722
- */
20723
- // TODO: Bind charge function to card channel
20716
+ loadPusher(); // TODO: Bind charge function to card channel
20724
20717
  // https://paystack.atlassian.net/browse/RAILS-2887
20725
20718
  }
20726
20719
 
@@ -20729,16 +20722,6 @@ var PreauthorizationInstance = /*#__PURE__*/function () {
20729
20722
  value: function setMetadata(key, value) {
20730
20723
  this.metadata[key] = value;
20731
20724
  }
20732
- }, {
20733
- key: "setDevice",
20734
- value: function setDevice(uuid) {
20735
- if (this.deviceFingerprint) {
20736
- logMessage("Device ID has already been set by Checkout JS so there's no need to set this again");
20737
- } else {
20738
- this.deviceFingerprint = uuid;
20739
- }
20740
- } // eslint-disable-next-line consistent-return
20741
-
20742
20725
  }, {
20743
20726
  key: "listenForCharge",
20744
20727
  value: function listenForCharge(options, callback) {
@@ -20776,26 +20759,19 @@ var Preauthorization = {
20776
20759
  },
20777
20760
  getByAccessCode: function getByAccessCode(accessCode) {
20778
20761
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
20779
- var deviceFingerprint, response;
20762
+ var response;
20780
20763
  return regeneratorRuntime.wrap(function _callee$(_context) {
20781
20764
  while (1) {
20782
20765
  switch (_context.prev = _context.next) {
20783
20766
  case 0:
20784
20767
  _context.next = 2;
20785
- return getDeviceFingerprint();
20786
-
20787
- case 2:
20788
- deviceFingerprint = _context.sent;
20789
- _context.next = 5;
20790
20768
  return PreauthorisationAPI.getByAccessCode(accessCode);
20791
20769
 
20792
- case 5:
20770
+ case 2:
20793
20771
  response = _context.sent;
20794
- return _context.abrupt("return", response && Object.seal(new PreauthorizationInstance(_objectSpread2(_objectSpread2({}, response.data), {
20795
- deviceFingerprint: deviceFingerprint
20796
- }))));
20772
+ return _context.abrupt("return", response && Object.seal(new PreauthorizationInstance(_objectSpread2({}, response.data))));
20797
20773
 
20798
- case 7:
20774
+ case 4:
20799
20775
  case "end":
20800
20776
  return _context.stop();
20801
20777
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/checkout-js",
3
- "version": "1.19.0-dev.20",
3
+ "version": "1.19.0-dev.21",
4
4
  "description": "Client-side JS library for billing on Paystack",
5
5
  "main": "lib/checkout.js",
6
6
  "module": "es/checkout.js",