swell-js 5.6.1 → 5.7.0

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.
@@ -12741,6 +12741,7 @@
12741
12741
  return error
12742
12742
  ? { error }
12743
12743
  : {
12744
+ gateway: 'stripe',
12744
12745
  token: paymentMethod.id,
12745
12746
  last4: paymentMethod.card.last4,
12746
12747
  exp_month: paymentMethod.card.exp_month,
@@ -13011,6 +13012,10 @@
13011
13012
  throw new Error(paymentMethod.error.message);
13012
13013
  }
13013
13014
 
13015
+ if (!isLiveMode(this.method.mode)) {
13016
+ paymentMethod.test = true;
13017
+ }
13018
+
13014
13019
  // should save payment method data when payment amount is not chargeable
13015
13020
  if (!isStripeChargeableAmount(cart.capture_total, cart.currency)) {
13016
13021
  await this.updateCart({
@@ -15946,7 +15951,7 @@
15946
15951
  }
15947
15952
 
15948
15953
  get orderId() {
15949
- return Math.random().toString(36).substr(2, 9);
15954
+ return Math.random().toString(36).slice(2, 11);
15950
15955
  }
15951
15956
 
15952
15957
  async tokenize() {
@@ -16008,6 +16013,12 @@
16008
16013
  throw new Error(card.error.message);
16009
16014
  }
16010
16015
 
16016
+ card.gateway = 'quickpay';
16017
+
16018
+ if (!isLiveMode(this.method.mode)) {
16019
+ card.test = true;
16020
+ }
16021
+
16011
16022
  await this.updateCart({
16012
16023
  billing: {
16013
16024
  method: 'card',
@@ -18389,7 +18400,7 @@
18389
18400
  const api = {};
18390
18401
 
18391
18402
  Object.assign(api, {
18392
- version: '5.6.1',
18403
+ version: '5.7.0',
18393
18404
  options,
18394
18405
  request,
18395
18406