@paystack/checkout-js 1.21.0-dev.1 → 1.21.0-dev.2

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
@@ -20390,6 +20390,17 @@ var Paystack = (function (exports) {
20390
20390
  });
20391
20391
  return this.saveLog();
20392
20392
  },
20393
+ logTransactionCurrencySwitch: function logTransactionCurrencySwitch(_ref3) {
20394
+ var currency = _ref3.currency,
20395
+ isUserAction = _ref3.isUserAction;
20396
+ var prefix = isUserAction ? 'User switched' : 'Switched';
20397
+ this.log.history.push({
20398
+ type: 'action',
20399
+ message: "".concat(prefix, " transaction currency to ").concat(currency),
20400
+ time: this.getTimeSpent()
20401
+ });
20402
+ return this.saveLog();
20403
+ },
20393
20404
  saveLog: function saveLog() {
20394
20405
  return AnalyticsAPI.saveLog(this.id, this.merchant.key, this.log);
20395
20406
  },
package/es/checkout.js CHANGED
@@ -20387,6 +20387,17 @@ var AnalyticsFunctions = {
20387
20387
  });
20388
20388
  return this.saveLog();
20389
20389
  },
20390
+ logTransactionCurrencySwitch: function logTransactionCurrencySwitch(_ref3) {
20391
+ var currency = _ref3.currency,
20392
+ isUserAction = _ref3.isUserAction;
20393
+ var prefix = isUserAction ? 'User switched' : 'Switched';
20394
+ this.log.history.push({
20395
+ type: 'action',
20396
+ message: "".concat(prefix, " transaction currency to ").concat(currency),
20397
+ time: this.getTimeSpent()
20398
+ });
20399
+ return this.saveLog();
20400
+ },
20390
20401
  saveLog: function saveLog() {
20391
20402
  return AnalyticsAPI.saveLog(this.id, this.merchant.key, this.log);
20392
20403
  },
package/lib/checkout.js CHANGED
@@ -20391,6 +20391,17 @@ var AnalyticsFunctions = {
20391
20391
  });
20392
20392
  return this.saveLog();
20393
20393
  },
20394
+ logTransactionCurrencySwitch: function logTransactionCurrencySwitch(_ref3) {
20395
+ var currency = _ref3.currency,
20396
+ isUserAction = _ref3.isUserAction;
20397
+ var prefix = isUserAction ? 'User switched' : 'Switched';
20398
+ this.log.history.push({
20399
+ type: 'action',
20400
+ message: "".concat(prefix, " transaction currency to ").concat(currency),
20401
+ time: this.getTimeSpent()
20402
+ });
20403
+ return this.saveLog();
20404
+ },
20394
20405
  saveLog: function saveLog() {
20395
20406
  return AnalyticsAPI.saveLog(this.id, this.merchant.key, this.log);
20396
20407
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/checkout-js",
3
- "version": "1.21.0-dev.1",
3
+ "version": "1.21.0-dev.2",
4
4
  "description": "Client-side JS library for billing on Paystack",
5
5
  "main": "lib/checkout.js",
6
6
  "module": "es/checkout.js",