swell-js 5.1.2 → 5.1.3

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/api.mjs CHANGED
@@ -157,7 +157,7 @@ function swell(initStore = undefined, initKey, initOptions = {}) {
157
157
  const api = {};
158
158
 
159
159
  Object.assign(api, {
160
- version: '5.1.2',
160
+ version: '5.1.3',
161
161
  options,
162
162
  request,
163
163
 
package/dist/payment.mjs CHANGED
@@ -441,8 +441,8 @@ class Payment {
441
441
  /**
442
442
  * Calls the onSuccess handler.
443
443
  *
444
- * @param {object | undefined} data
445
- * @returns {any}
444
+ * @param {unknown} [data]
445
+ * @returns {unknown}
446
446
  */
447
447
  onSuccess(data) {
448
448
  const successHandler = get(this.params, 'onSuccess');
@@ -455,7 +455,7 @@ class Payment {
455
455
  /**
456
456
  * Calls the onCancel handler.
457
457
  *
458
- * @returns {any}
458
+ * @returns {unknown}
459
459
  */
460
460
  onCancel() {
461
461
  const cancelHandler = get(this.params, 'onCancel');
@@ -469,7 +469,7 @@ class Payment {
469
469
  * Calls the onError handler.
470
470
  *
471
471
  * @param {Error} error
472
- * @returns {any}
472
+ * @returns {unknown}
473
473
  */
474
474
  onError(error) {
475
475
  const errorHandler = get(this.params, 'onError');
@@ -3240,7 +3240,7 @@ class AuthorizeNetGooglePayment extends Payment {
3240
3240
  throw new Error('Payment token is missing');
3241
3241
  }
3242
3242
 
3243
- const cart = await this.updateCart({
3243
+ await this.updateCart({
3244
3244
  account: {
3245
3245
  email,
3246
3246
  },
@@ -3259,7 +3259,7 @@ class AuthorizeNetGooglePayment extends Payment {
3259
3259
  }),
3260
3260
  });
3261
3261
 
3262
- this.onSuccess(cart);
3262
+ this.onSuccess();
3263
3263
  }
3264
3264
 
3265
3265
  /**
@@ -3541,7 +3541,7 @@ class AuthorizeNetApplePayment extends Payment {
3541
3541
  //
3542
3542
  // We store the payment token but DO NOT process the order yet.
3543
3543
  // The user must manually click "Place Order" to complete the transaction.
3544
- const cart = await this.updateCart({
3544
+ await this.updateCart({
3545
3545
  account: {
3546
3546
  email: shippingContact.emailAddress,
3547
3547
  },
@@ -3569,7 +3569,7 @@ class AuthorizeNetApplePayment extends Payment {
3569
3569
  // Notify that Apple Pay authorization is complete
3570
3570
  // The cart now has the payment token and is ready for submission
3571
3571
  // NOTE: This does NOT submit the order - user must click "Place Order"
3572
- this.onSuccess(cart);
3572
+ this.onSuccess();
3573
3573
  } catch (err) {
3574
3574
  session.completePayment({
3575
3575
  status: this.ApplePaySession.STATUS_FAILURE,
package/dist/swell.cjs CHANGED
@@ -6732,8 +6732,8 @@ class Payment {
6732
6732
  /**
6733
6733
  * Calls the onSuccess handler.
6734
6734
  *
6735
- * @param {object | undefined} data
6736
- * @returns {any}
6735
+ * @param {unknown} [data]
6736
+ * @returns {unknown}
6737
6737
  */
6738
6738
  onSuccess(data) {
6739
6739
  const successHandler = get(this.params, 'onSuccess');
@@ -6746,7 +6746,7 @@ class Payment {
6746
6746
  /**
6747
6747
  * Calls the onCancel handler.
6748
6748
  *
6749
- * @returns {any}
6749
+ * @returns {unknown}
6750
6750
  */
6751
6751
  onCancel() {
6752
6752
  const cancelHandler = get(this.params, 'onCancel');
@@ -6760,7 +6760,7 @@ class Payment {
6760
6760
  * Calls the onError handler.
6761
6761
  *
6762
6762
  * @param {Error} error
6763
- * @returns {any}
6763
+ * @returns {unknown}
6764
6764
  */
6765
6765
  onError(error) {
6766
6766
  const errorHandler = get(this.params, 'onError');
@@ -9531,7 +9531,7 @@ class AuthorizeNetGooglePayment extends Payment {
9531
9531
  throw new Error('Payment token is missing');
9532
9532
  }
9533
9533
 
9534
- const cart = await this.updateCart({
9534
+ await this.updateCart({
9535
9535
  account: {
9536
9536
  email,
9537
9537
  },
@@ -9550,7 +9550,7 @@ class AuthorizeNetGooglePayment extends Payment {
9550
9550
  }),
9551
9551
  });
9552
9552
 
9553
- this.onSuccess(cart);
9553
+ this.onSuccess();
9554
9554
  }
9555
9555
 
9556
9556
  /**
@@ -9832,7 +9832,7 @@ class AuthorizeNetApplePayment extends Payment {
9832
9832
  //
9833
9833
  // We store the payment token but DO NOT process the order yet.
9834
9834
  // The user must manually click "Place Order" to complete the transaction.
9835
- const cart = await this.updateCart({
9835
+ await this.updateCart({
9836
9836
  account: {
9837
9837
  email: shippingContact.emailAddress,
9838
9838
  },
@@ -9860,7 +9860,7 @@ class AuthorizeNetApplePayment extends Payment {
9860
9860
  // Notify that Apple Pay authorization is complete
9861
9861
  // The cart now has the payment token and is ready for submission
9862
9862
  // NOTE: This does NOT submit the order - user must click "Place Order"
9863
- this.onSuccess(cart);
9863
+ this.onSuccess();
9864
9864
  } catch (err) {
9865
9865
  session.completePayment({
9866
9866
  status: this.ApplePaySession.STATUS_FAILURE,
@@ -11437,7 +11437,7 @@ function swell(initStore = undefined, initKey, initOptions = {}) {
11437
11437
  const api = {};
11438
11438
 
11439
11439
  Object.assign(api, {
11440
- version: '5.1.2',
11440
+ version: '5.1.3',
11441
11441
  options,
11442
11442
  request,
11443
11443