@paystack/checkout-js 1.57.0-beta.1 → 1.57.0-beta.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
@@ -6385,7 +6385,7 @@ var Paystack = (function (exports) {
6385
6385
  _excluded2 = ["message", "status", "errors"],
6386
6386
  _excluded3 = ["message", "status", "errors"],
6387
6387
  _excluded4 = ["message", "status", "errors"],
6388
- _excluded5 = ["status", "message", "otpmessage"];
6388
+ _excluded5 = ["status", "message", "otpmessage", "redirectUrl"];
6389
6389
  var PREAUTHORIZATION_STATE_AUTHORIZED = 'authorized';
6390
6390
  var ChargeResponses = {
6391
6391
  authorized: function authorized(response) {
@@ -6436,8 +6436,9 @@ var Paystack = (function (exports) {
6436
6436
  response.status;
6437
6437
  var message = response.message,
6438
6438
  otpmessage = response.otpmessage,
6439
+ redirectUrl = response.redirectUrl,
6439
6440
  cleanResponse = _objectWithoutProperties(response, _excluded5);
6440
- var authMessage = otpmessage || message;
6441
+ var authMessage = redirectUrl || otpmessage || message;
6441
6442
  return {
6442
6443
  status: 'auth',
6443
6444
  message: authMessage || 'Authentication required',
@@ -12393,20 +12394,7 @@ var Paystack = (function (exports) {
12393
12394
  return axiosInstance.post(url, urlEncodedParams, {
12394
12395
  headers: headers
12395
12396
  }).then(function (response) {
12396
- var _raw$data;
12397
- var raw = response.data;
12398
- /*
12399
- * A googlepay step-up is always 3DS, but the charge response can omit
12400
- * the `auth` field the shared parser routes on — without it an auth
12401
- * response falls through to error(). Default it so the response
12402
- * normalizes through auth() exactly like card's.
12403
- */
12404
- if ((raw === null || raw === void 0 ? void 0 : raw.status) === 'auth' && !raw.auth && !((_raw$data = raw.data) !== null && _raw$data !== void 0 && _raw$data.auth)) {
12405
- return ChargeResponses.parse(_objectSpread2(_objectSpread2({}, raw), {}, {
12406
- auth: '3DS'
12407
- }));
12408
- }
12409
- return ChargeResponses.parse(raw);
12397
+ return ChargeResponses.parse(response.data);
12410
12398
  });
12411
12399
  }
12412
12400
  };
package/es/checkout.js CHANGED
@@ -6382,7 +6382,7 @@ var _excluded = ["message", "status", "errors"],
6382
6382
  _excluded2 = ["message", "status", "errors"],
6383
6383
  _excluded3 = ["message", "status", "errors"],
6384
6384
  _excluded4 = ["message", "status", "errors"],
6385
- _excluded5 = ["status", "message", "otpmessage"];
6385
+ _excluded5 = ["status", "message", "otpmessage", "redirectUrl"];
6386
6386
  var PREAUTHORIZATION_STATE_AUTHORIZED = 'authorized';
6387
6387
  var ChargeResponses = {
6388
6388
  authorized: function authorized(response) {
@@ -6433,8 +6433,9 @@ var ChargeResponses = {
6433
6433
  response.status;
6434
6434
  var message = response.message,
6435
6435
  otpmessage = response.otpmessage,
6436
+ redirectUrl = response.redirectUrl,
6436
6437
  cleanResponse = _objectWithoutProperties(response, _excluded5);
6437
- var authMessage = otpmessage || message;
6438
+ var authMessage = redirectUrl || otpmessage || message;
6438
6439
  return {
6439
6440
  status: 'auth',
6440
6441
  message: authMessage || 'Authentication required',
@@ -12390,20 +12391,7 @@ var GooglePayAPI = {
12390
12391
  return axiosInstance.post(url, urlEncodedParams, {
12391
12392
  headers: headers
12392
12393
  }).then(function (response) {
12393
- var _raw$data;
12394
- var raw = response.data;
12395
- /*
12396
- * A googlepay step-up is always 3DS, but the charge response can omit
12397
- * the `auth` field the shared parser routes on — without it an auth
12398
- * response falls through to error(). Default it so the response
12399
- * normalizes through auth() exactly like card's.
12400
- */
12401
- if ((raw === null || raw === void 0 ? void 0 : raw.status) === 'auth' && !raw.auth && !((_raw$data = raw.data) !== null && _raw$data !== void 0 && _raw$data.auth)) {
12402
- return ChargeResponses.parse(_objectSpread2(_objectSpread2({}, raw), {}, {
12403
- auth: '3DS'
12404
- }));
12405
- }
12406
- return ChargeResponses.parse(raw);
12394
+ return ChargeResponses.parse(response.data);
12407
12395
  });
12408
12396
  }
12409
12397
  };
package/lib/checkout.js CHANGED
@@ -6386,7 +6386,7 @@ var _excluded = ["message", "status", "errors"],
6386
6386
  _excluded2 = ["message", "status", "errors"],
6387
6387
  _excluded3 = ["message", "status", "errors"],
6388
6388
  _excluded4 = ["message", "status", "errors"],
6389
- _excluded5 = ["status", "message", "otpmessage"];
6389
+ _excluded5 = ["status", "message", "otpmessage", "redirectUrl"];
6390
6390
  var PREAUTHORIZATION_STATE_AUTHORIZED = 'authorized';
6391
6391
  var ChargeResponses = {
6392
6392
  authorized: function authorized(response) {
@@ -6437,8 +6437,9 @@ var ChargeResponses = {
6437
6437
  response.status;
6438
6438
  var message = response.message,
6439
6439
  otpmessage = response.otpmessage,
6440
+ redirectUrl = response.redirectUrl,
6440
6441
  cleanResponse = _objectWithoutProperties(response, _excluded5);
6441
- var authMessage = otpmessage || message;
6442
+ var authMessage = redirectUrl || otpmessage || message;
6442
6443
  return {
6443
6444
  status: 'auth',
6444
6445
  message: authMessage || 'Authentication required',
@@ -12394,20 +12395,7 @@ var GooglePayAPI = {
12394
12395
  return axiosInstance.post(url, urlEncodedParams, {
12395
12396
  headers: headers
12396
12397
  }).then(function (response) {
12397
- var _raw$data;
12398
- var raw = response.data;
12399
- /*
12400
- * A googlepay step-up is always 3DS, but the charge response can omit
12401
- * the `auth` field the shared parser routes on — without it an auth
12402
- * response falls through to error(). Default it so the response
12403
- * normalizes through auth() exactly like card's.
12404
- */
12405
- if ((raw === null || raw === void 0 ? void 0 : raw.status) === 'auth' && !raw.auth && !((_raw$data = raw.data) !== null && _raw$data !== void 0 && _raw$data.auth)) {
12406
- return ChargeResponses.parse(_objectSpread2(_objectSpread2({}, raw), {}, {
12407
- auth: '3DS'
12408
- }));
12409
- }
12410
- return ChargeResponses.parse(raw);
12398
+ return ChargeResponses.parse(response.data);
12411
12399
  });
12412
12400
  }
12413
12401
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/checkout-js",
3
- "version": "1.57.0-beta.1",
3
+ "version": "1.57.0-beta.2",
4
4
  "description": "Client-side JS library for billing on Paystack",
5
5
  "main": "lib/checkout.js",
6
6
  "module": "es/checkout.js",