@pelcro/react-pelcro-js 3.2.0-beta.5 → 3.2.0-beta.8

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
@@ -8775,7 +8775,7 @@ const debounce = (func, waitTime) => {
8775
8775
  function getSiteCardProcessor() {
8776
8776
  var _window$Pelcro$site$r;
8777
8777
 
8778
- if ((_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.vantiv_pay_page_id) {
8778
+ if ((_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.vantiv_gateway_settings) {
8779
8779
  return "vantiv";
8780
8780
  }
8781
8781
 
@@ -8871,7 +8871,7 @@ const loadPaymentSDKs = () => {
8871
8871
  } // Load Vantiv SDKs
8872
8872
 
8873
8873
 
8874
- const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_pay_page_id);
8874
+ const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
8875
8875
 
8876
8876
  if (supportsVantiv) {
8877
8877
  if (!window.jQuery) {
@@ -8879,7 +8879,10 @@ const loadPaymentSDKs = () => {
8879
8879
  }
8880
8880
 
8881
8881
  if (!window.EprotectIframeClient) {
8882
- window.Pelcro.helpers.loadSDK("https://request.eprotect.vantivprelive.com/eProtect/js/eProtect-iframe-client.min.js", "vantiv-eprotect-sdk");
8882
+ const PRELIVE_URL = "https://request.eprotect.vantivprelive.com/eProtect/js/eProtect-iframe-client.min.js";
8883
+ const PRODUCTION_URL = "https://request.eprotect.vantivcnp.com/eProtect/js/eProtect-iframe-client4.min.js";
8884
+ const scriptUrlToUse = window.Pelcro.site.read().vantiv_gateway_settings.environment === "production" ? PRODUCTION_URL : PRELIVE_URL;
8885
+ window.Pelcro.helpers.loadSDK(scriptUrlToUse, "vantiv-eprotect-sdk");
8883
8886
  }
8884
8887
  }
8885
8888
  };
@@ -13017,6 +13020,7 @@ class StripeGateway {
13017
13020
  auth_token: window.Pelcro.user.read().auth_token,
13018
13021
  plan_id: plan.id,
13019
13022
  coupon_code: couponCode,
13023
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13020
13024
  address_id: product.address_required ? addressId : null
13021
13025
  }, (err, res) => {
13022
13026
  callback(err, res);
@@ -13043,6 +13047,7 @@ class StripeGateway {
13043
13047
  auth_token: window.Pelcro.user.read().auth_token,
13044
13048
  plan_id: plan.id,
13045
13049
  coupon_code: couponCode,
13050
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13046
13051
  gift_recipient_email: giftRecipient.email,
13047
13052
  gift_recipient_first_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.firstName,
13048
13053
  gift_recipient_last_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.lastName,
@@ -13070,6 +13075,7 @@ class StripeGateway {
13070
13075
  stripe_token: token,
13071
13076
  auth_token: window.Pelcro.user.read().auth_token,
13072
13077
  plan_id: plan.id,
13078
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13073
13079
  coupon_code: couponCode,
13074
13080
  subscription_id: subscriptionIdToRenew,
13075
13081
  address_id: product.address_required ? addressId : null
@@ -13122,6 +13128,7 @@ class StripeGateway {
13122
13128
  window.Pelcro.ecommerce.order.create({
13123
13129
  items,
13124
13130
  coupon_code: couponCode,
13131
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13125
13132
  ...params,
13126
13133
  ...(addressId && {
13127
13134
  address_id: addressId
@@ -13209,6 +13216,7 @@ class PaypalGateway {
13209
13216
  payment_gateway: _classPrivateFieldGet(this, _paymentGateway2),
13210
13217
  auth_token: window.Pelcro.user.read().auth_token,
13211
13218
  plan_id: plan.id,
13219
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13212
13220
  coupon_code: couponCode,
13213
13221
  address_id: product.address_required ? addressId : null
13214
13222
  }, (err, res) => {
@@ -13236,6 +13244,7 @@ class PaypalGateway {
13236
13244
  auth_token: window.Pelcro.user.read().auth_token,
13237
13245
  plan_id: plan.id,
13238
13246
  coupon_code: couponCode,
13247
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13239
13248
  gift_recipient_email: giftRecipient.email,
13240
13249
  gift_recipient_first_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.firstName,
13241
13250
  gift_recipient_last_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.lastName,
@@ -13338,6 +13347,7 @@ class VantivGateway {
13338
13347
  quantity,
13339
13348
  auth_token: window.Pelcro.user.read().auth_token,
13340
13349
  plan_id: plan.id,
13350
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13341
13351
  coupon_code: couponCode,
13342
13352
  address_id: product.address_required ? addressId : null,
13343
13353
  ...params
@@ -13369,6 +13379,7 @@ class VantivGateway {
13369
13379
  auth_token: window.Pelcro.user.read().auth_token,
13370
13380
  plan_id: plan.id,
13371
13381
  coupon_code: couponCode,
13382
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13372
13383
  subscription_id: subscriptionIdToRenew,
13373
13384
  address_id: product.address_required ? addressId : null,
13374
13385
  ...params
@@ -13402,6 +13413,7 @@ class VantivGateway {
13402
13413
  auth_token: window.Pelcro.user.read().auth_token,
13403
13414
  plan_id: plan.id,
13404
13415
  coupon_code: couponCode,
13416
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13405
13417
  gift_recipient_email: giftRecipient.email,
13406
13418
  gift_recipient_first_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.firstName,
13407
13419
  gift_recipient_last_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.lastName,
@@ -13465,6 +13477,7 @@ class VantivGateway {
13465
13477
  window.Pelcro.ecommerce.order.create({
13466
13478
  items,
13467
13479
  coupon_code: couponCode,
13480
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13468
13481
  ...params,
13469
13482
  ...(addressId && {
13470
13483
  address_id: addressId
@@ -13714,12 +13727,13 @@ const PaymentMethodContainerWithoutStripe = ({
13714
13727
  const cardProcessor = getSiteCardProcessor();
13715
13728
 
13716
13729
  if (cardProcessor === "vantiv" && !selectedPaymentMethodId) {
13717
- var _window$Pelcro$site$r;
13730
+ var _window$Pelcro$site$r, _window$Pelcro$site$r2;
13718
13731
 
13719
- const payPageId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_pay_page_id;
13732
+ const payPageId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings.pay_page_id;
13733
+ const reportGroup = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.report_group;
13720
13734
  vantivInstanceRef.current = new window.EprotectIframeClient({
13721
13735
  paypageId: payPageId,
13722
- reportGroup: payPageId,
13736
+ reportGroup: reportGroup,
13723
13737
  style: "pelcro",
13724
13738
  height: "245",
13725
13739
  timeout: 50000,
@@ -13808,9 +13822,9 @@ const PaymentMethodContainerWithoutStripe = ({
13808
13822
 
13809
13823
 
13810
13824
  const updateTotalAmountWithTax = () => {
13811
- var _window$Pelcro$site$r2;
13825
+ var _window$Pelcro$site$r3;
13812
13826
 
13813
- const taxesEnabled = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.taxes_enabled;
13827
+ const taxesEnabled = (_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.taxes_enabled;
13814
13828
 
13815
13829
  if (taxesEnabled && type === "createPayment") {
13816
13830
  dispatch({
@@ -13967,6 +13981,7 @@ const PaymentMethodContainerWithoutStripe = ({
13967
13981
  window.Pelcro.order.create({
13968
13982
  auth_token: window.Pelcro.user.read().auth_token,
13969
13983
  plan_id: plan.id,
13984
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13970
13985
  coupon_code: couponCode,
13971
13986
  address_id: selectedAddressId
13972
13987
  }, handleCouponResponse);
@@ -14048,6 +14063,7 @@ const PaymentMethodContainerWithoutStripe = ({
14048
14063
  stripe_token: !stripeSource.isExistingSource ? stripeSource.id : undefined,
14049
14064
  auth_token: window.Pelcro.user.read().auth_token,
14050
14065
  plan_id: plan.id,
14066
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
14051
14067
  quantity: plan.quantity,
14052
14068
  coupon_code: couponCode,
14053
14069
  gift_recipient_email: giftRecipient ? giftRecipient.email : null,
@@ -14119,6 +14135,7 @@ const PaymentMethodContainerWithoutStripe = ({
14119
14135
  stripe_token: !stripeSource.isExistingSource ? stripeSource.id : undefined,
14120
14136
  auth_token: window.Pelcro.user.read().auth_token,
14121
14137
  plan_id: plan.id,
14138
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
14122
14139
  coupon_code: couponCode,
14123
14140
  subscription_id: subscriptionIdToRenew,
14124
14141
  address_id: product.address_required ? selectedAddressId : null
@@ -14455,13 +14472,13 @@ const PaymentMethodContainerWithoutStripe = ({
14455
14472
 
14456
14473
 
14457
14474
  const resolveTaxCalculation = () => {
14458
- var _window$Pelcro$site$r3;
14475
+ var _window$Pelcro$site$r4;
14459
14476
 
14460
14477
  if (type === "invoicePayment") {
14461
14478
  return new Promise(resolve => resolve());
14462
14479
  }
14463
14480
 
14464
- const taxesEnabled = (_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.taxes_enabled;
14481
+ const taxesEnabled = (_window$Pelcro$site$r4 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.taxes_enabled;
14465
14482
  return new Promise((resolve, reject) => {
14466
14483
  // resolve early if taxes isn't enabled
14467
14484
  if (!taxesEnabled) {
@@ -14471,6 +14488,7 @@ const PaymentMethodContainerWithoutStripe = ({
14471
14488
  window.Pelcro.order.create({
14472
14489
  auth_token: window.Pelcro.user.read().auth_token,
14473
14490
  plan_id: plan.id,
14491
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
14474
14492
  coupon_code: state === null || state === void 0 ? void 0 : state.couponCode,
14475
14493
  address_id: selectedAddressId
14476
14494
  }, (error, res) => {
package/dist/index.esm.js CHANGED
@@ -8745,7 +8745,7 @@ const debounce = (func, waitTime) => {
8745
8745
  function getSiteCardProcessor() {
8746
8746
  var _window$Pelcro$site$r;
8747
8747
 
8748
- if ((_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.vantiv_pay_page_id) {
8748
+ if ((_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.vantiv_gateway_settings) {
8749
8749
  return "vantiv";
8750
8750
  }
8751
8751
 
@@ -8841,7 +8841,7 @@ const loadPaymentSDKs = () => {
8841
8841
  } // Load Vantiv SDKs
8842
8842
 
8843
8843
 
8844
- const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_pay_page_id);
8844
+ const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
8845
8845
 
8846
8846
  if (supportsVantiv) {
8847
8847
  if (!window.jQuery) {
@@ -8849,7 +8849,10 @@ const loadPaymentSDKs = () => {
8849
8849
  }
8850
8850
 
8851
8851
  if (!window.EprotectIframeClient) {
8852
- window.Pelcro.helpers.loadSDK("https://request.eprotect.vantivprelive.com/eProtect/js/eProtect-iframe-client.min.js", "vantiv-eprotect-sdk");
8852
+ const PRELIVE_URL = "https://request.eprotect.vantivprelive.com/eProtect/js/eProtect-iframe-client.min.js";
8853
+ const PRODUCTION_URL = "https://request.eprotect.vantivcnp.com/eProtect/js/eProtect-iframe-client4.min.js";
8854
+ const scriptUrlToUse = window.Pelcro.site.read().vantiv_gateway_settings.environment === "production" ? PRODUCTION_URL : PRELIVE_URL;
8855
+ window.Pelcro.helpers.loadSDK(scriptUrlToUse, "vantiv-eprotect-sdk");
8853
8856
  }
8854
8857
  }
8855
8858
  };
@@ -12987,6 +12990,7 @@ class StripeGateway {
12987
12990
  auth_token: window.Pelcro.user.read().auth_token,
12988
12991
  plan_id: plan.id,
12989
12992
  coupon_code: couponCode,
12993
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
12990
12994
  address_id: product.address_required ? addressId : null
12991
12995
  }, (err, res) => {
12992
12996
  callback(err, res);
@@ -13013,6 +13017,7 @@ class StripeGateway {
13013
13017
  auth_token: window.Pelcro.user.read().auth_token,
13014
13018
  plan_id: plan.id,
13015
13019
  coupon_code: couponCode,
13020
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13016
13021
  gift_recipient_email: giftRecipient.email,
13017
13022
  gift_recipient_first_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.firstName,
13018
13023
  gift_recipient_last_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.lastName,
@@ -13040,6 +13045,7 @@ class StripeGateway {
13040
13045
  stripe_token: token,
13041
13046
  auth_token: window.Pelcro.user.read().auth_token,
13042
13047
  plan_id: plan.id,
13048
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13043
13049
  coupon_code: couponCode,
13044
13050
  subscription_id: subscriptionIdToRenew,
13045
13051
  address_id: product.address_required ? addressId : null
@@ -13092,6 +13098,7 @@ class StripeGateway {
13092
13098
  window.Pelcro.ecommerce.order.create({
13093
13099
  items,
13094
13100
  coupon_code: couponCode,
13101
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13095
13102
  ...params,
13096
13103
  ...(addressId && {
13097
13104
  address_id: addressId
@@ -13179,6 +13186,7 @@ class PaypalGateway {
13179
13186
  payment_gateway: _classPrivateFieldGet(this, _paymentGateway2),
13180
13187
  auth_token: window.Pelcro.user.read().auth_token,
13181
13188
  plan_id: plan.id,
13189
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13182
13190
  coupon_code: couponCode,
13183
13191
  address_id: product.address_required ? addressId : null
13184
13192
  }, (err, res) => {
@@ -13206,6 +13214,7 @@ class PaypalGateway {
13206
13214
  auth_token: window.Pelcro.user.read().auth_token,
13207
13215
  plan_id: plan.id,
13208
13216
  coupon_code: couponCode,
13217
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13209
13218
  gift_recipient_email: giftRecipient.email,
13210
13219
  gift_recipient_first_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.firstName,
13211
13220
  gift_recipient_last_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.lastName,
@@ -13308,6 +13317,7 @@ class VantivGateway {
13308
13317
  quantity,
13309
13318
  auth_token: window.Pelcro.user.read().auth_token,
13310
13319
  plan_id: plan.id,
13320
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13311
13321
  coupon_code: couponCode,
13312
13322
  address_id: product.address_required ? addressId : null,
13313
13323
  ...params
@@ -13339,6 +13349,7 @@ class VantivGateway {
13339
13349
  auth_token: window.Pelcro.user.read().auth_token,
13340
13350
  plan_id: plan.id,
13341
13351
  coupon_code: couponCode,
13352
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13342
13353
  subscription_id: subscriptionIdToRenew,
13343
13354
  address_id: product.address_required ? addressId : null,
13344
13355
  ...params
@@ -13372,6 +13383,7 @@ class VantivGateway {
13372
13383
  auth_token: window.Pelcro.user.read().auth_token,
13373
13384
  plan_id: plan.id,
13374
13385
  coupon_code: couponCode,
13386
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13375
13387
  gift_recipient_email: giftRecipient.email,
13376
13388
  gift_recipient_first_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.firstName,
13377
13389
  gift_recipient_last_name: giftRecipient === null || giftRecipient === void 0 ? void 0 : giftRecipient.lastName,
@@ -13435,6 +13447,7 @@ class VantivGateway {
13435
13447
  window.Pelcro.ecommerce.order.create({
13436
13448
  items,
13437
13449
  coupon_code: couponCode,
13450
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13438
13451
  ...params,
13439
13452
  ...(addressId && {
13440
13453
  address_id: addressId
@@ -13684,12 +13697,13 @@ const PaymentMethodContainerWithoutStripe = ({
13684
13697
  const cardProcessor = getSiteCardProcessor();
13685
13698
 
13686
13699
  if (cardProcessor === "vantiv" && !selectedPaymentMethodId) {
13687
- var _window$Pelcro$site$r;
13700
+ var _window$Pelcro$site$r, _window$Pelcro$site$r2;
13688
13701
 
13689
- const payPageId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_pay_page_id;
13702
+ const payPageId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings.pay_page_id;
13703
+ const reportGroup = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.report_group;
13690
13704
  vantivInstanceRef.current = new window.EprotectIframeClient({
13691
13705
  paypageId: payPageId,
13692
- reportGroup: payPageId,
13706
+ reportGroup: reportGroup,
13693
13707
  style: "pelcro",
13694
13708
  height: "245",
13695
13709
  timeout: 50000,
@@ -13778,9 +13792,9 @@ const PaymentMethodContainerWithoutStripe = ({
13778
13792
 
13779
13793
 
13780
13794
  const updateTotalAmountWithTax = () => {
13781
- var _window$Pelcro$site$r2;
13795
+ var _window$Pelcro$site$r3;
13782
13796
 
13783
- const taxesEnabled = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.taxes_enabled;
13797
+ const taxesEnabled = (_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.taxes_enabled;
13784
13798
 
13785
13799
  if (taxesEnabled && type === "createPayment") {
13786
13800
  dispatch({
@@ -13937,6 +13951,7 @@ const PaymentMethodContainerWithoutStripe = ({
13937
13951
  window.Pelcro.order.create({
13938
13952
  auth_token: window.Pelcro.user.read().auth_token,
13939
13953
  plan_id: plan.id,
13954
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
13940
13955
  coupon_code: couponCode,
13941
13956
  address_id: selectedAddressId
13942
13957
  }, handleCouponResponse);
@@ -14018,6 +14033,7 @@ const PaymentMethodContainerWithoutStripe = ({
14018
14033
  stripe_token: !stripeSource.isExistingSource ? stripeSource.id : undefined,
14019
14034
  auth_token: window.Pelcro.user.read().auth_token,
14020
14035
  plan_id: plan.id,
14036
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
14021
14037
  quantity: plan.quantity,
14022
14038
  coupon_code: couponCode,
14023
14039
  gift_recipient_email: giftRecipient ? giftRecipient.email : null,
@@ -14089,6 +14105,7 @@ const PaymentMethodContainerWithoutStripe = ({
14089
14105
  stripe_token: !stripeSource.isExistingSource ? stripeSource.id : undefined,
14090
14106
  auth_token: window.Pelcro.user.read().auth_token,
14091
14107
  plan_id: plan.id,
14108
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
14092
14109
  coupon_code: couponCode,
14093
14110
  subscription_id: subscriptionIdToRenew,
14094
14111
  address_id: product.address_required ? selectedAddressId : null
@@ -14425,13 +14442,13 @@ const PaymentMethodContainerWithoutStripe = ({
14425
14442
 
14426
14443
 
14427
14444
  const resolveTaxCalculation = () => {
14428
- var _window$Pelcro$site$r3;
14445
+ var _window$Pelcro$site$r4;
14429
14446
 
14430
14447
  if (type === "invoicePayment") {
14431
14448
  return new Promise(resolve => resolve());
14432
14449
  }
14433
14450
 
14434
- const taxesEnabled = (_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.taxes_enabled;
14451
+ const taxesEnabled = (_window$Pelcro$site$r4 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.taxes_enabled;
14435
14452
  return new Promise((resolve, reject) => {
14436
14453
  // resolve early if taxes isn't enabled
14437
14454
  if (!taxesEnabled) {
@@ -14441,6 +14458,7 @@ const PaymentMethodContainerWithoutStripe = ({
14441
14458
  window.Pelcro.order.create({
14442
14459
  auth_token: window.Pelcro.user.read().auth_token,
14443
14460
  plan_id: plan.id,
14461
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
14444
14462
  coupon_code: state === null || state === void 0 ? void 0 : state.couponCode,
14445
14463
  address_id: selectedAddressId
14446
14464
  }, (error, res) => {
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.2.0-beta.5",
4
+ "version": "3.2.0-beta.8",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",