@pelcro/react-pelcro-js 3.26.0-beta.62 → 3.26.0-beta.64

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/index.cjs.js CHANGED
@@ -19489,20 +19489,20 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19489
19489
  }
19490
19490
  });
19491
19491
  }
19492
- if (type == "createPaymentSource" || type == "updatePaymentSource" || type == "deletePaymentSource") {
19493
- handleBraintreePayment(payload, state);
19492
+ if (type == "updatePaymentSource" || type == "deletePaymentSource") {
19493
+ handleBraintreePayment(payload, state.couponCode);
19494
19494
  } else {
19495
19495
  braintree3DSecureInstanceRef.current.then(threeDSecureInstance => {
19496
19496
  threeDSecureInstance.verifyCard({
19497
19497
  onLookupComplete: function (data, next) {
19498
19498
  next();
19499
19499
  },
19500
- amount: totalAmount,
19500
+ amount: totalAmount !== null && totalAmount !== void 0 ? totalAmount : "0.00",
19501
19501
  nonce: payload.nonce,
19502
19502
  bin: payload.details.bin
19503
19503
  }).then(payload => {
19504
19504
  if (payload.liabilityShifted) {
19505
- handleBraintreePayment(payload, state);
19505
+ handleBraintreePayment(payload, state.couponCode);
19506
19506
  } else if (payload.liabilityShiftPossible) {
19507
19507
  dispatch({
19508
19508
  type: DISABLE_SUBMIT,
@@ -19565,7 +19565,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19565
19565
  }
19566
19566
  });
19567
19567
  };
19568
- const handleBraintreePayment = (braintreePaymentRequest, state) => {
19568
+ const handleBraintreePayment = (braintreePaymentRequest, couponCode) => {
19569
19569
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
19570
19570
  const braintreeNonce = braintreePaymentRequest === null || braintreePaymentRequest === void 0 ? void 0 : braintreePaymentRequest.nonce;
19571
19571
  if (type === "createPayment") {
package/dist/index.esm.js CHANGED
@@ -19459,20 +19459,20 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19459
19459
  }
19460
19460
  });
19461
19461
  }
19462
- if (type == "createPaymentSource" || type == "updatePaymentSource" || type == "deletePaymentSource") {
19463
- handleBraintreePayment(payload, state);
19462
+ if (type == "updatePaymentSource" || type == "deletePaymentSource") {
19463
+ handleBraintreePayment(payload, state.couponCode);
19464
19464
  } else {
19465
19465
  braintree3DSecureInstanceRef.current.then(threeDSecureInstance => {
19466
19466
  threeDSecureInstance.verifyCard({
19467
19467
  onLookupComplete: function (data, next) {
19468
19468
  next();
19469
19469
  },
19470
- amount: totalAmount,
19470
+ amount: totalAmount !== null && totalAmount !== void 0 ? totalAmount : "0.00",
19471
19471
  nonce: payload.nonce,
19472
19472
  bin: payload.details.bin
19473
19473
  }).then(payload => {
19474
19474
  if (payload.liabilityShifted) {
19475
- handleBraintreePayment(payload, state);
19475
+ handleBraintreePayment(payload, state.couponCode);
19476
19476
  } else if (payload.liabilityShiftPossible) {
19477
19477
  dispatch({
19478
19478
  type: DISABLE_SUBMIT,
@@ -19535,7 +19535,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19535
19535
  }
19536
19536
  });
19537
19537
  };
19538
- const handleBraintreePayment = (braintreePaymentRequest, state) => {
19538
+ const handleBraintreePayment = (braintreePaymentRequest, couponCode) => {
19539
19539
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
19540
19540
  const braintreeNonce = braintreePaymentRequest === null || braintreePaymentRequest === void 0 ? void 0 : braintreePaymentRequest.nonce;
19541
19541
  if (type === "createPayment") {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "3.26.0-beta.62",
4
+ "version": "3.26.0-beta.64",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",