@funnelfox/billing 0.6.5-beta.3 → 0.6.5

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.
@@ -420,7 +420,7 @@ var PaymentMethod;
420
420
  /**
421
421
  * @fileoverview Constants for Funnefox SDK
422
422
  */
423
- const SDK_VERSION = '0.6.5-beta.3';
423
+ const SDK_VERSION = '0.6.5';
424
424
  const DEFAULTS = {
425
425
  BASE_URL: 'https://billing.funnelfox.com',
426
426
  REGION: 'default',
@@ -671,8 +671,6 @@ class PrimerWrapper {
671
671
  onMethodRenderError: options.onMethodRenderError,
672
672
  onMethodRender: options.onMethodRender,
673
673
  onCardInputValueChange: options.onCardInputValueChange,
674
- isCardholderNameRequired: options.isCardholderNameRequired,
675
- isPostalCodeRequired: options.isPostalCodeRequired,
676
674
  });
677
675
  this.paymentMethodsInterfaces.push(cardInterface);
678
676
  return cardInterface;
@@ -691,7 +689,7 @@ class PrimerWrapper {
691
689
  throw new PrimerError('Failed to initialize Primer checkout', error);
692
690
  }
693
691
  }
694
- async renderCardCheckoutWithElements(elements, { onSubmit, onInputChange, onCardInputValueChange, isCardholderNameRequired, isPostalCodeRequired, onMethodRenderError, onMethodRender, }) {
692
+ async renderCardCheckoutWithElements(elements, { onSubmit, onInputChange, onCardInputValueChange, onMethodRenderError, onMethodRender, }) {
695
693
  try {
696
694
  if (!this.currentHeadless) {
697
695
  throw new PrimerError('Headless checkout not found');
@@ -706,21 +704,14 @@ class PrimerWrapper {
706
704
  if (!pmManager)
707
705
  return false;
708
706
  const { valid, validationErrors } = await pmManager.validate();
709
- const cardHolderError = isCardholderNameRequired?.()
710
- ? validationErrors.find(v => v.name === 'cardholderName')?.message
711
- : null;
712
- dispatchError('cardholderName', cardHolderError);
707
+ const cardHolderError = validationErrors.find(v => v.name === 'cardholderName');
708
+ dispatchError('cardholderName', cardHolderError?.message || null);
713
709
  const emailAddress = elements.emailAddress?.value?.trim();
714
710
  const emailError = emailAddress && !isValidEmail(emailAddress)
715
711
  ? 'Please enter a valid email address'
716
712
  : null;
717
713
  dispatchError('emailAddress', emailError);
718
- const postalCode = elements.postalCode?.value?.trim();
719
- const postalCodeError = isPostalCodeRequired?.() && !postalCode
720
- ? 'Please enter a postal code'
721
- : null;
722
- dispatchError('postalCode', postalCodeError);
723
- return valid && !emailError && !cardHolderError && !postalCodeError;
714
+ return valid && !emailError;
724
715
  };
725
716
  const dispatchError = (inputName, error) => {
726
717
  onInputChange(inputName, error);
@@ -743,24 +734,18 @@ class PrimerWrapper {
743
734
  ? 'Please enter a valid email address'
744
735
  : null);
745
736
  };
746
- const countrySelectorOnChange = (e) => {
747
- const countryCode = e.target.value.trim();
748
- onCardInputValueChange?.('countryCode', countryCode);
749
- };
750
- const postalCodeOnChange = (e) => {
751
- const postalCode = e.target.value.trim();
752
- onCardInputValueChange?.('postalCode', postalCode);
753
- dispatchError('postalCode', null);
754
- };
755
737
  elements.cardholderName?.addEventListener('input', cardHolderOnChange);
756
738
  elements.emailAddress?.addEventListener('input', emailAddressOnChange);
757
- elements.countrySelector?.addEventListener('change', countrySelectorOnChange);
758
- elements.postalCode?.addEventListener('input', postalCodeOnChange);
759
739
  cardNumberInput.addEventListener('change', onHostedInputChange('cardNumber'));
760
740
  expiryInput.addEventListener('change', onHostedInputChange('expiryDate'));
761
741
  cvvInput.addEventListener('change', onHostedInputChange('cvv'));
762
742
  const onSubmitHandler = async () => {
763
- if (!(await validateForm())) {
743
+ const isEmailValid = isValidEmail(elements.emailAddress?.value?.trim() || '');
744
+ const isFormValid = await validateForm();
745
+ if (!isEmailValid) {
746
+ dispatchError('emailAddress', 'Please enter a valid email address');
747
+ }
748
+ if (!isFormValid || !isEmailValid) {
764
749
  return;
765
750
  }
766
751
  try {
@@ -797,8 +782,6 @@ class PrimerWrapper {
797
782
  pmManager.removeHostedInputs();
798
783
  elements.cardholderName?.removeEventListener('input', cardHolderOnChange);
799
784
  elements.emailAddress?.removeEventListener('input', emailAddressOnChange);
800
- elements.countrySelector?.removeEventListener('change', countrySelectorOnChange);
801
- elements.postalCode?.removeEventListener('input', postalCodeOnChange);
802
785
  elements.button?.removeEventListener('click', onSubmitHandler);
803
786
  };
804
787
  this.destroyCallbacks.push(onDestroy);
@@ -817,12 +800,6 @@ class PrimerWrapper {
817
800
  if (elements.emailAddress) {
818
801
  elements.emailAddress.disabled = disabled;
819
802
  }
820
- if (elements.countrySelector) {
821
- elements.countrySelector.disabled = disabled;
822
- }
823
- if (elements.postalCode) {
824
- elements.postalCode.disabled = disabled;
825
- }
826
803
  },
827
804
  submit: () => onSubmitHandler(),
828
805
  destroy: () => {
@@ -845,7 +822,7 @@ class PrimerWrapper {
845
822
  });
846
823
  }
847
824
  async renderCheckout(clientToken, checkoutOptions, checkoutRenderOptions) {
848
- const { cardElements, paymentButtonElements, container, onSubmit, onInputChange, onMethodRender, onMethodRenderError, onMethodsAvailable, onCardInputValueChange, isCardholderNameRequired, isPostalCodeRequired, } = checkoutRenderOptions;
825
+ const { cardElements, paymentButtonElements, container, onSubmit, onInputChange, onMethodRender, onMethodRenderError, onMethodsAvailable, onCardInputValueChange, } = checkoutRenderOptions;
849
826
  await this.initializeHeadlessCheckout(clientToken, checkoutOptions);
850
827
  onMethodsAvailable?.(this.availableMethods);
851
828
  await Promise.all(this.availableMethods.map(method => {
@@ -858,8 +835,6 @@ class PrimerWrapper {
858
835
  onMethodRender,
859
836
  onMethodRenderError,
860
837
  onCardInputValueChange,
861
- isCardholderNameRequired,
862
- isPostalCodeRequired,
863
838
  });
864
839
  }
865
840
  else {
@@ -1074,12 +1049,6 @@ class APIClient {
1074
1049
  if (params.email !== undefined) {
1075
1050
  payload.email_address = params.email;
1076
1051
  }
1077
- if (params.countryCode !== undefined) {
1078
- payload.country_code = params.countryCode;
1079
- }
1080
- if (params.postalCode !== undefined) {
1081
- payload.postal_code = params.postalCode;
1082
- }
1083
1052
  return (await this.request(API_ENDPOINTS.CREATE_PAYMENT, {
1084
1053
  method: 'POST',
1085
1054
  body: JSON.stringify(payload),
@@ -1392,24 +1361,12 @@ class CheckoutInstance extends EventEmitter {
1392
1361
  super();
1393
1362
  this.counter = 0;
1394
1363
  this.radarSessionId = null;
1395
- this.cardSessionFieldConfig = {};
1396
1364
  this.handleInputChange = (inputName, error) => {
1397
1365
  this.emit(EVENTS.INPUT_ERROR, { name: inputName, error });
1398
1366
  };
1399
1367
  this.handleCardInputValueChange = (inputName, value) => {
1400
1368
  if (inputName === 'emailAddress') {
1401
1369
  this.cardEmailAddress = value?.trim() || undefined;
1402
- return;
1403
- }
1404
- if (inputName === 'countryCode') {
1405
- this.cardCountryCode = this.normalizeCountryCode(value);
1406
- if (!this.isPostalCodeVisible()) {
1407
- this.cardPostalCode = undefined;
1408
- }
1409
- return;
1410
- }
1411
- if (inputName === 'postalCode') {
1412
- this.cardPostalCode = value?.trim() || undefined;
1413
1370
  }
1414
1371
  };
1415
1372
  this.handleMethodRender = (method) => {
@@ -1435,8 +1392,6 @@ class CheckoutInstance extends EventEmitter {
1435
1392
  orderId: this.orderId,
1436
1393
  paymentMethodToken: paymentMethodTokenData.token,
1437
1394
  email: this.getPaymentEmailAddress(),
1438
- countryCode: this.getPaymentCountryCode(),
1439
- postalCode: this.getPaymentPostalCode(),
1440
1395
  clientMetadata: {
1441
1396
  radarSessionId,
1442
1397
  },
@@ -1509,8 +1464,6 @@ class CheckoutInstance extends EventEmitter {
1509
1464
  this.primerWrapper = new PrimerWrapper();
1510
1465
  this.isDestroyed = false;
1511
1466
  this.cardEmailAddress = this.checkoutConfig.customer.email;
1512
- this.shouldApplySessionCardholderNameConfig =
1513
- this.checkoutConfig.card?.cardholderName?.required === undefined;
1514
1467
  this._setupCallbackBridges();
1515
1468
  }
1516
1469
  _setupCallbackBridges() {
@@ -1603,9 +1556,7 @@ class CheckoutInstance extends EventEmitter {
1603
1556
  this.clientToken = sessionData.clientToken;
1604
1557
  }
1605
1558
  applySessionCardFieldConfig(response) {
1606
- const cardConfig = {
1607
- ...(this.checkoutConfig.card || {}),
1608
- };
1559
+ const cardConfig = this.checkoutConfig.card || {};
1609
1560
  if (cardConfig.emailAddress?.visible === undefined &&
1610
1561
  response.data?.show_email_field !== undefined) {
1611
1562
  cardConfig.emailAddress = {
@@ -1613,41 +1564,19 @@ class CheckoutInstance extends EventEmitter {
1613
1564
  visible: response.data.show_email_field,
1614
1565
  };
1615
1566
  }
1616
- if (this.shouldApplySessionCardholderNameConfig &&
1567
+ if (cardConfig.cardholderName?.required === undefined &&
1617
1568
  response.data?.show_cardholder_name_field !== undefined) {
1618
1569
  cardConfig.cardholderName = {
1619
1570
  ...cardConfig.cardholderName,
1620
1571
  required: response.data.show_cardholder_name_field,
1621
1572
  };
1622
1573
  }
1623
- const countryFieldOverrides = this.normalizeCountryFieldOverrides(response.data?.country_field_overrides);
1624
- const detectedCountryCode = this.normalizeCountryCode(response.data?.detected_country_code) ||
1625
- this.cardCountryCode;
1626
- this.cardSessionFieldConfig = {
1627
- ...this.cardSessionFieldConfig,
1628
- showCountrySelector: response.data?.show_country_selector_field ??
1629
- this.cardSessionFieldConfig.showCountrySelector,
1630
- showPostalCode: response.data?.show_postal_code_field ??
1631
- this.cardSessionFieldConfig.showPostalCode,
1632
- detectedCountryCode: detectedCountryCode || this.cardSessionFieldConfig.detectedCountryCode,
1633
- validCountries: response.data?.valid_countries ||
1634
- this.cardSessionFieldConfig.validCountries,
1635
- countryFieldOverrides: countryFieldOverrides ||
1636
- this.cardSessionFieldConfig.countryFieldOverrides,
1637
- };
1638
1574
  if (Object.keys(cardConfig).length > 0) {
1639
1575
  this.checkoutConfig.card = cardConfig;
1640
1576
  }
1641
- this.cardCountryCode =
1642
- this.cardSessionFieldConfig.detectedCountryCode || this.cardCountryCode;
1643
- if (!this.isPostalCodeVisible()) {
1644
- this.cardPostalCode = undefined;
1645
- }
1646
1577
  }
1647
1578
  getPrimerCardConfig() {
1648
- const cardConfig = {
1649
- ...(this.checkoutConfig.card || {}),
1650
- };
1579
+ const cardConfig = { ...(this.checkoutConfig.card || {}) };
1651
1580
  delete cardConfig.emailAddress;
1652
1581
  return Object.keys(cardConfig).length
1653
1582
  ? cardConfig
@@ -1768,8 +1697,6 @@ class CheckoutInstance extends EventEmitter {
1768
1697
  onSubmit: this.handleSubmit,
1769
1698
  onInputChange: this.handleInputChange,
1770
1699
  onCardInputValueChange: this.handleCardInputValueChange,
1771
- isCardholderNameRequired: () => this.isCardholderNameRequired(),
1772
- isPostalCodeRequired: () => this.isPostalCodeVisible(),
1773
1700
  onMethodRender: this.handleMethodRender,
1774
1701
  onMethodsAvailable: this.handleMethodsAvailable,
1775
1702
  onMethodRenderError: this.handleMethodRenderError,
@@ -1928,58 +1855,12 @@ class CheckoutInstance extends EventEmitter {
1928
1855
  isProcessing() {
1929
1856
  return ['processing', 'action_required'].includes(this.state);
1930
1857
  }
1931
- normalizeCountryCode(countryCode) {
1932
- const normalized = countryCode?.trim().toUpperCase();
1933
- return normalized || undefined;
1934
- }
1935
- normalizeCountryFieldOverrides(overrides) {
1936
- if (!overrides) {
1937
- return undefined;
1938
- }
1939
- return Object.entries(overrides).reduce((result, [countryCode, override]) => {
1940
- const normalizedCountryCode = this.normalizeCountryCode(countryCode);
1941
- if (normalizedCountryCode && override) {
1942
- result[normalizedCountryCode] = override;
1943
- }
1944
- return result;
1945
- }, {});
1946
- }
1947
- getSelectedCountryCode() {
1948
- return (this.normalizeCountryCode(this.cardCountryCode) ||
1949
- this.normalizeCountryCode(this.cardSessionFieldConfig.detectedCountryCode));
1950
- }
1951
- getCountryFieldOverride(countryCode = this.getSelectedCountryCode()) {
1952
- if (!countryCode) {
1953
- return undefined;
1954
- }
1955
- return this.cardSessionFieldConfig.countryFieldOverrides?.[countryCode];
1956
- }
1957
- isCardholderNameRequired() {
1958
- return !!this.checkoutConfig.card?.cardholderName?.required;
1959
- }
1960
- isPostalCodeVisible(countryCode = this.getSelectedCountryCode()) {
1961
- const defaultValue = !!this.cardSessionFieldConfig.showPostalCode;
1962
- const overrideValue = this.getCountryFieldOverride(countryCode)?.show_postal_code;
1963
- if (overrideValue === null || overrideValue === undefined) {
1964
- return defaultValue;
1965
- }
1966
- return overrideValue;
1967
- }
1968
- getPaymentCountryCode() {
1969
- return this.getSelectedCountryCode();
1970
- }
1971
- getPaymentPostalCode() {
1972
- if (!this.isPostalCodeVisible()) {
1973
- return undefined;
1974
- }
1975
- return this.cardPostalCode?.trim() || undefined;
1976
- }
1977
1858
  // Creates containers to render hosted inputs with labels and error messages,
1978
1859
  // a card holder input with label and error, and a submit button.
1979
1860
  async getDefaultSkinCheckoutOptions() {
1980
1861
  const skinFactory = (await import('./chunk-index.es2.js'))
1981
1862
  .default;
1982
- const skin = await skinFactory(this.checkoutConfig, this.cardSessionFieldConfig);
1863
+ const skin = await skinFactory(this.checkoutConfig);
1983
1864
  this.on(EVENTS.INPUT_ERROR, skin.onInputError);
1984
1865
  this.on(EVENTS.STATUS_CHANGE, skin.onStatusChange);
1985
1866
  this.on(EVENTS.ERROR, (error) => skin.onError(error));
@@ -1995,7 +1876,7 @@ class CheckoutInstance extends EventEmitter {
1995
1876
  }
1996
1877
  async getCardDefaultSkinCheckoutOptions(node) {
1997
1878
  const CardSkin = (await import('./chunk-index.es3.js')).default;
1998
- const skin = new CardSkin(node, this.checkoutConfig, this.cardSessionFieldConfig);
1879
+ const skin = new CardSkin(node, this.checkoutConfig);
1999
1880
  skin.init();
2000
1881
  this.on(EVENTS.INPUT_ERROR, skin.onInputError);
2001
1882
  this.on(EVENTS.METHOD_RENDER, skin.onMethodRender);
@@ -2056,8 +1937,6 @@ class CheckoutInstance extends EventEmitter {
2056
1937
  onSubmit: this.handleSubmit,
2057
1938
  onInputChange: this.handleInputChange,
2058
1939
  onCardInputValueChange: this.handleCardInputValueChange,
2059
- isCardholderNameRequired: () => this.isCardholderNameRequired(),
2060
- isPostalCodeRequired: () => this.isPostalCodeVisible(),
2061
1940
  onMethodRender: this.handleMethodRender,
2062
1941
  onMethodRenderError: this.handleMethodRenderError,
2063
1942
  };
@@ -27,7 +27,7 @@ const paymentMethodTemplates = {
27
27
  [PaymentMethod.APPLE_PAY]: applePayTemplate,
28
28
  };
29
29
  class DefaultSkin {
30
- constructor(checkoutConfig, cardSessionFieldConfig) {
30
+ constructor(checkoutConfig) {
31
31
  this.onLoaderChange = (isLoading) => {
32
32
  document
33
33
  .querySelectorAll(`${this.containerSelector} .loader-container`)
@@ -116,7 +116,6 @@ class DefaultSkin {
116
116
  }
117
117
  this.containerEl = containerEl;
118
118
  this.checkoutConfig = checkoutConfig;
119
- this.cardSessionFieldConfig = cardSessionFieldConfig;
120
119
  }
121
120
  initAccordion() {
122
121
  const paymentMethodCards = this.containerEl.querySelectorAll('.ff-payment-method-card');
@@ -165,7 +164,7 @@ class DefaultSkin {
165
164
  this.paymentMethodOrder.forEach(paymentMethod => {
166
165
  paymentMethodContainers.insertAdjacentHTML('beforeend', paymentMethodTemplates[paymentMethod]);
167
166
  });
168
- this.cardInstance = new CardSkin(document.querySelector('#cardForm'), this.checkoutConfig, this.cardSessionFieldConfig);
167
+ this.cardInstance = new CardSkin(document.querySelector('#cardForm'), this.checkoutConfig);
169
168
  this.cardInstance.init();
170
169
  this.wireCardInputs();
171
170
  }
@@ -196,8 +195,8 @@ class DefaultSkin {
196
195
  };
197
196
  }
198
197
  }
199
- const createDefaultSkin = async (checkoutConfig, cardSessionFieldConfig) => {
200
- const skin = new DefaultSkin(checkoutConfig, cardSessionFieldConfig);
198
+ const createDefaultSkin = async (checkoutConfig) => {
199
+ const skin = new DefaultSkin(checkoutConfig);
201
200
  await skin['init']();
202
201
  return skin;
203
202
  };
@@ -5,12 +5,12 @@
5
5
  * @author Funnelfox
6
6
  * @license MIT
7
7
  */
8
- var template = "<div>\n <label class=\"ff-card-form-label\" for=\"cardNumberInput\">Card number</label>\n <div id=\"cardNumberInput\"></div>\n <div class=\"errorContainer\"></div>\n</div>\n<div class=\"card-form-row\">\n <div>\n <label class=\"ff-card-form-label\" for=\"expiryInput\">Expiration date</label>\n <div id=\"expiryInput\"></div>\n <div class=\"errorContainer\"></div>\n </div>\n <div>\n <label class=\"ff-card-form-label\" for=\"cvvInput\">Security code</label>\n <div id=\"cvvInput\">\n <svg width=\"200\" height=\"200\" viewBox=\"0 0 200 200\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"200\" height=\"200\" fill=\"transparent\"/>\n <g clip-path=\"url(#clip0_0_1)\">\n <path d=\"M157.555 23C168.279 23.0002 177 31.7394 177 42.4854V80.5889C171.946 72.0151 164.749 64.8558 156.146 59.8457H166.394V42.4854C166.393 37.6004 162.43 33.6291 157.555 33.6289H27.4453C22.5704 33.6291 18.6066 37.6004 18.6064 42.4854V59.8457H97.8535C88.9153 65.0512 81.4954 72.5771 76.4189 81.5986H18.6064V127.515C18.6066 132.4 22.5704 136.371 27.4453 136.371H75.3281C77.2742 140.177 79.6285 143.739 82.333 147H27.4453C16.7215 147 8.00019 138.261 8 127.515V42.4854C8.0002 31.7394 16.7215 23.0002 27.4453 23H157.555Z\" fill=\"#93939A\"/>\n <mask id=\"path-2-outside-1_0_1\" maskUnits=\"userSpaceOnUse\" x=\"68.5012\" y=\"52.0311\" width=\"135\" height=\"135\" fill=\"black\">\n <rect fill=\"white\" x=\"68.5012\" y=\"52.0311\" width=\"135\" height=\"135\"/>\n <path d=\"M190.242 160.457L170.136 140.351C166.533 145.552 162.023 150.063 156.821 153.666L176.927 173.772C178.693 175.538 181.088 176.53 183.585 176.53C186.082 176.53 188.477 175.538 190.242 173.772C192.008 172.007 193 169.612 193 167.115C193 164.618 192.008 162.223 190.242 160.457ZM126.436 157.901C116.955 157.901 107.688 155.089 99.8048 149.822C91.922 144.555 85.7781 137.069 82.15 128.31C78.5219 119.551 77.5727 109.913 79.4222 100.614C81.2718 91.3158 85.8371 82.7746 92.5409 76.0708C99.2447 69.367 107.786 64.8017 117.084 62.9521C126.383 61.1026 136.021 62.0518 144.78 65.6799C153.539 69.308 161.025 75.4519 166.292 83.3347C171.559 91.2175 174.371 100.485 174.371 109.966C174.371 122.679 169.32 134.871 160.331 143.861C151.341 152.85 139.149 157.901 126.436 157.901ZM163.719 109.966C163.719 102.592 161.532 95.3838 157.435 89.2527C153.339 83.1216 147.516 78.343 140.703 75.5212C133.891 72.6994 126.395 71.9611 119.162 73.3996C111.93 74.8382 105.287 78.389 100.073 83.6031C94.8591 88.8171 91.3083 95.4602 89.8697 102.692C88.4312 109.924 89.1695 117.421 91.9913 124.233C94.8131 131.046 99.5918 136.869 105.723 140.965C111.854 145.062 119.062 147.248 126.436 147.248C136.324 147.248 145.807 143.32 152.799 136.329C159.791 129.337 163.719 119.854 163.719 109.966ZM133.645 102.757C133.398 102.51 133.104 102.313 132.781 102.179C132.458 102.046 132.112 101.977 131.762 101.977C131.412 101.977 131.066 102.046 130.743 102.179C130.42 102.313 130.126 102.51 129.879 102.757L126.436 106.2L122.993 102.757C122.49 102.272 121.818 102.003 121.119 102.01C120.421 102.016 119.753 102.296 119.26 102.789C118.766 103.283 118.486 103.951 118.48 104.649C118.474 105.348 118.742 106.02 119.227 106.523L122.67 109.966L119.227 113.409C118.973 113.655 118.77 113.949 118.63 114.274C118.491 114.598 118.417 114.948 118.414 115.301C118.411 115.655 118.479 116.006 118.612 116.333C118.746 116.66 118.944 116.958 119.194 117.208C119.444 117.458 119.741 117.655 120.069 117.789C120.396 117.923 120.747 117.991 121.1 117.988C121.454 117.985 121.803 117.911 122.128 117.771C122.453 117.632 122.747 117.429 122.993 117.175L126.436 113.732L129.879 117.175C130.382 117.66 131.054 117.928 131.752 117.922C132.451 117.916 133.119 117.636 133.612 117.142C134.106 116.648 134.386 115.981 134.392 115.282C134.398 114.584 134.13 113.911 133.645 113.409L130.202 109.966L133.645 106.523C133.892 106.275 134.088 105.982 134.222 105.659C134.356 105.336 134.425 104.989 134.425 104.64C134.425 104.29 134.356 103.944 134.222 103.621C134.088 103.298 133.892 103.004 133.645 102.757ZM112.34 102.757C112.093 102.51 111.8 102.313 111.477 102.179C111.154 102.046 110.807 101.977 110.458 101.977C110.108 101.977 109.762 102.046 109.439 102.179C109.116 102.313 108.822 102.51 108.575 102.757L105.132 106.2L101.688 102.757C101.186 102.272 100.513 102.003 99.8151 102.01C99.1169 102.016 98.4489 102.296 97.9552 102.789C97.4614 103.283 97.1814 103.951 97.1753 104.649C97.1692 105.348 97.4377 106.02 97.9227 106.523L101.366 109.966L97.9227 113.409C97.6684 113.655 97.4655 113.949 97.326 114.274C97.1864 114.598 97.1129 114.948 97.1098 115.301C97.1068 115.655 97.1742 116.006 97.3081 116.333C97.442 116.66 97.6397 116.958 97.8897 117.208C98.1398 117.458 98.4371 117.655 98.7644 117.789C99.0917 117.923 99.4423 117.991 99.7959 117.988C100.15 117.985 100.499 117.911 100.824 117.771C101.149 117.632 101.443 117.429 101.688 117.175L105.132 113.732L108.575 117.175C109.077 117.66 109.75 117.928 110.448 117.922C111.146 117.916 111.814 117.636 112.308 117.142C112.802 116.648 113.082 115.981 113.088 115.282C113.094 114.584 112.826 113.911 112.34 113.409L108.897 109.966L112.34 106.523C112.588 106.275 112.784 105.982 112.918 105.659C113.052 105.336 113.121 104.989 113.121 104.64C113.121 104.29 113.052 103.944 112.918 103.621C112.784 103.298 112.588 103.004 112.34 102.757ZM151.506 109.966L154.949 106.523C155.434 106.02 155.703 105.348 155.697 104.649C155.691 103.951 155.41 103.283 154.917 102.789C154.423 102.296 153.755 102.016 153.057 102.01C152.359 102.003 151.686 102.272 151.184 102.757L147.74 106.2L144.297 102.757C143.795 102.272 143.122 102.003 142.424 102.01C141.726 102.016 141.058 102.296 140.564 102.789C140.07 103.283 139.79 103.951 139.784 104.649C139.778 105.348 140.046 106.02 140.531 106.523L143.974 109.966L140.531 113.409C140.277 113.655 140.074 113.949 139.935 114.274C139.795 114.598 139.722 114.948 139.719 115.301C139.715 115.655 139.783 116.006 139.917 116.333C140.051 116.66 140.248 116.958 140.498 117.208C140.748 117.458 141.046 117.655 141.373 117.789C141.7 117.923 142.051 117.991 142.405 117.988C142.758 117.985 143.108 117.911 143.433 117.771C143.757 117.632 144.051 117.429 144.297 117.175L147.74 113.732L151.184 117.175C151.686 117.66 152.359 117.928 153.057 117.922C153.755 117.916 154.423 117.636 154.917 117.142C155.41 116.648 155.691 115.981 155.697 115.282C155.703 114.584 155.434 113.911 154.949 113.409L151.506 109.966Z\"/>\n </mask>\n <path d=\"M190.242 160.457L170.136 140.351C166.533 145.552 162.023 150.063 156.821 153.666L176.927 173.772C178.693 175.538 181.088 176.53 183.585 176.53C186.082 176.53 188.477 175.538 190.242 173.772C192.008 172.007 193 169.612 193 167.115C193 164.618 192.008 162.223 190.242 160.457ZM126.436 157.901C116.955 157.901 107.688 155.089 99.8048 149.822C91.922 144.555 85.7781 137.069 82.15 128.31C78.5219 119.551 77.5727 109.913 79.4222 100.614C81.2718 91.3158 85.8371 82.7746 92.5409 76.0708C99.2447 69.367 107.786 64.8017 117.084 62.9521C126.383 61.1026 136.021 62.0518 144.78 65.6799C153.539 69.308 161.025 75.4519 166.292 83.3347C171.559 91.2175 174.371 100.485 174.371 109.966C174.371 122.679 169.32 134.871 160.331 143.861C151.341 152.85 139.149 157.901 126.436 157.901ZM163.719 109.966C163.719 102.592 161.532 95.3838 157.435 89.2527C153.339 83.1216 147.516 78.343 140.703 75.5212C133.891 72.6994 126.395 71.9611 119.162 73.3996C111.93 74.8382 105.287 78.389 100.073 83.6031C94.8591 88.8171 91.3083 95.4602 89.8697 102.692C88.4312 109.924 89.1695 117.421 91.9913 124.233C94.8131 131.046 99.5918 136.869 105.723 140.965C111.854 145.062 119.062 147.248 126.436 147.248C136.324 147.248 145.807 143.32 152.799 136.329C159.791 129.337 163.719 119.854 163.719 109.966ZM133.645 102.757C133.398 102.51 133.104 102.313 132.781 102.179C132.458 102.046 132.112 101.977 131.762 101.977C131.412 101.977 131.066 102.046 130.743 102.179C130.42 102.313 130.126 102.51 129.879 102.757L126.436 106.2L122.993 102.757C122.49 102.272 121.818 102.003 121.119 102.01C120.421 102.016 119.753 102.296 119.26 102.789C118.766 103.283 118.486 103.951 118.48 104.649C118.474 105.348 118.742 106.02 119.227 106.523L122.67 109.966L119.227 113.409C118.973 113.655 118.77 113.949 118.63 114.274C118.491 114.598 118.417 114.948 118.414 115.301C118.411 115.655 118.479 116.006 118.612 116.333C118.746 116.66 118.944 116.958 119.194 117.208C119.444 117.458 119.741 117.655 120.069 117.789C120.396 117.923 120.747 117.991 121.1 117.988C121.454 117.985 121.803 117.911 122.128 117.771C122.453 117.632 122.747 117.429 122.993 117.175L126.436 113.732L129.879 117.175C130.382 117.66 131.054 117.928 131.752 117.922C132.451 117.916 133.119 117.636 133.612 117.142C134.106 116.648 134.386 115.981 134.392 115.282C134.398 114.584 134.13 113.911 133.645 113.409L130.202 109.966L133.645 106.523C133.892 106.275 134.088 105.982 134.222 105.659C134.356 105.336 134.425 104.989 134.425 104.64C134.425 104.29 134.356 103.944 134.222 103.621C134.088 103.298 133.892 103.004 133.645 102.757ZM112.34 102.757C112.093 102.51 111.8 102.313 111.477 102.179C111.154 102.046 110.807 101.977 110.458 101.977C110.108 101.977 109.762 102.046 109.439 102.179C109.116 102.313 108.822 102.51 108.575 102.757L105.132 106.2L101.688 102.757C101.186 102.272 100.513 102.003 99.8151 102.01C99.1169 102.016 98.4489 102.296 97.9552 102.789C97.4614 103.283 97.1814 103.951 97.1753 104.649C97.1692 105.348 97.4377 106.02 97.9227 106.523L101.366 109.966L97.9227 113.409C97.6684 113.655 97.4655 113.949 97.326 114.274C97.1864 114.598 97.1129 114.948 97.1098 115.301C97.1068 115.655 97.1742 116.006 97.3081 116.333C97.442 116.66 97.6397 116.958 97.8897 117.208C98.1398 117.458 98.4371 117.655 98.7644 117.789C99.0917 117.923 99.4423 117.991 99.7959 117.988C100.15 117.985 100.499 117.911 100.824 117.771C101.149 117.632 101.443 117.429 101.688 117.175L105.132 113.732L108.575 117.175C109.077 117.66 109.75 117.928 110.448 117.922C111.146 117.916 111.814 117.636 112.308 117.142C112.802 116.648 113.082 115.981 113.088 115.282C113.094 114.584 112.826 113.911 112.34 113.409L108.897 109.966L112.34 106.523C112.588 106.275 112.784 105.982 112.918 105.659C113.052 105.336 113.121 104.989 113.121 104.64C113.121 104.29 113.052 103.944 112.918 103.621C112.784 103.298 112.588 103.004 112.34 102.757ZM151.506 109.966L154.949 106.523C155.434 106.02 155.703 105.348 155.697 104.649C155.691 103.951 155.41 103.283 154.917 102.789C154.423 102.296 153.755 102.016 153.057 102.01C152.359 102.003 151.686 102.272 151.184 102.757L147.74 106.2L144.297 102.757C143.795 102.272 143.122 102.003 142.424 102.01C141.726 102.016 141.058 102.296 140.564 102.789C140.07 103.283 139.79 103.951 139.784 104.649C139.778 105.348 140.046 106.02 140.531 106.523L143.974 109.966L140.531 113.409C140.277 113.655 140.074 113.949 139.935 114.274C139.795 114.598 139.722 114.948 139.719 115.301C139.715 115.655 139.783 116.006 139.917 116.333C140.051 116.66 140.248 116.958 140.498 117.208C140.748 117.458 141.046 117.655 141.373 117.789C141.7 117.923 142.051 117.991 142.405 117.988C142.758 117.985 143.108 117.911 143.433 117.771C143.757 117.632 144.051 117.429 144.297 117.175L147.74 113.732L151.184 117.175C151.686 117.66 152.359 117.928 153.057 117.922C153.755 117.916 154.423 117.636 154.917 117.142C155.41 116.648 155.691 115.981 155.697 115.282C155.703 114.584 155.434 113.911 154.949 113.409L151.506 109.966Z\" fill=\"#93939A\"/>\n <path d=\"M190.242 160.457L170.136 140.351C166.533 145.552 162.023 150.063 156.821 153.666L176.927 173.772C178.693 175.538 181.088 176.53 183.585 176.53C186.082 176.53 188.477 175.538 190.242 173.772C192.008 172.007 193 169.612 193 167.115C193 164.618 192.008 162.223 190.242 160.457ZM126.436 157.901C116.955 157.901 107.688 155.089 99.8048 149.822C91.922 144.555 85.7781 137.069 82.15 128.31C78.5219 119.551 77.5727 109.913 79.4222 100.614C81.2718 91.3158 85.8371 82.7746 92.5409 76.0708C99.2447 69.367 107.786 64.8017 117.084 62.9521C126.383 61.1026 136.021 62.0518 144.78 65.6799C153.539 69.308 161.025 75.4519 166.292 83.3347C171.559 91.2175 174.371 100.485 174.371 109.966C174.371 122.679 169.32 134.871 160.331 143.861C151.341 152.85 139.149 157.901 126.436 157.901ZM163.719 109.966C163.719 102.592 161.532 95.3838 157.435 89.2527C153.339 83.1216 147.516 78.343 140.703 75.5212C133.891 72.6994 126.395 71.9611 119.162 73.3996C111.93 74.8382 105.287 78.389 100.073 83.6031C94.8591 88.8171 91.3083 95.4602 89.8697 102.692C88.4312 109.924 89.1695 117.421 91.9913 124.233C94.8131 131.046 99.5918 136.869 105.723 140.965C111.854 145.062 119.062 147.248 126.436 147.248C136.324 147.248 145.807 143.32 152.799 136.329C159.791 129.337 163.719 119.854 163.719 109.966ZM133.645 102.757C133.398 102.51 133.104 102.313 132.781 102.179C132.458 102.046 132.112 101.977 131.762 101.977C131.412 101.977 131.066 102.046 130.743 102.179C130.42 102.313 130.126 102.51 129.879 102.757L126.436 106.2L122.993 102.757C122.49 102.272 121.818 102.003 121.119 102.01C120.421 102.016 119.753 102.296 119.26 102.789C118.766 103.283 118.486 103.951 118.48 104.649C118.474 105.348 118.742 106.02 119.227 106.523L122.67 109.966L119.227 113.409C118.973 113.655 118.77 113.949 118.63 114.274C118.491 114.598 118.417 114.948 118.414 115.301C118.411 115.655 118.479 116.006 118.612 116.333C118.746 116.66 118.944 116.958 119.194 117.208C119.444 117.458 119.741 117.655 120.069 117.789C120.396 117.923 120.747 117.991 121.1 117.988C121.454 117.985 121.803 117.911 122.128 117.771C122.453 117.632 122.747 117.429 122.993 117.175L126.436 113.732L129.879 117.175C130.382 117.66 131.054 117.928 131.752 117.922C132.451 117.916 133.119 117.636 133.612 117.142C134.106 116.648 134.386 115.981 134.392 115.282C134.398 114.584 134.13 113.911 133.645 113.409L130.202 109.966L133.645 106.523C133.892 106.275 134.088 105.982 134.222 105.659C134.356 105.336 134.425 104.989 134.425 104.64C134.425 104.29 134.356 103.944 134.222 103.621C134.088 103.298 133.892 103.004 133.645 102.757ZM112.34 102.757C112.093 102.51 111.8 102.313 111.477 102.179C111.154 102.046 110.807 101.977 110.458 101.977C110.108 101.977 109.762 102.046 109.439 102.179C109.116 102.313 108.822 102.51 108.575 102.757L105.132 106.2L101.688 102.757C101.186 102.272 100.513 102.003 99.8151 102.01C99.1169 102.016 98.4489 102.296 97.9552 102.789C97.4614 103.283 97.1814 103.951 97.1753 104.649C97.1692 105.348 97.4377 106.02 97.9227 106.523L101.366 109.966L97.9227 113.409C97.6684 113.655 97.4655 113.949 97.326 114.274C97.1864 114.598 97.1129 114.948 97.1098 115.301C97.1068 115.655 97.1742 116.006 97.3081 116.333C97.442 116.66 97.6397 116.958 97.8897 117.208C98.1398 117.458 98.4371 117.655 98.7644 117.789C99.0917 117.923 99.4423 117.991 99.7959 117.988C100.15 117.985 100.499 117.911 100.824 117.771C101.149 117.632 101.443 117.429 101.688 117.175L105.132 113.732L108.575 117.175C109.077 117.66 109.75 117.928 110.448 117.922C111.146 117.916 111.814 117.636 112.308 117.142C112.802 116.648 113.082 115.981 113.088 115.282C113.094 114.584 112.826 113.911 112.34 113.409L108.897 109.966L112.34 106.523C112.588 106.275 112.784 105.982 112.918 105.659C113.052 105.336 113.121 104.989 113.121 104.64C113.121 104.29 113.052 103.944 112.918 103.621C112.784 103.298 112.588 103.004 112.34 102.757ZM151.506 109.966L154.949 106.523C155.434 106.02 155.703 105.348 155.697 104.649C155.691 103.951 155.41 103.283 154.917 102.789C154.423 102.296 153.755 102.016 153.057 102.01C152.359 102.003 151.686 102.272 151.184 102.757L147.74 106.2L144.297 102.757C143.795 102.272 143.122 102.003 142.424 102.01C141.726 102.016 141.058 102.296 140.564 102.789C140.07 103.283 139.79 103.951 139.784 104.649C139.778 105.348 140.046 106.02 140.531 106.523L143.974 109.966L140.531 113.409C140.277 113.655 140.074 113.949 139.935 114.274C139.795 114.598 139.722 114.948 139.719 115.301C139.715 115.655 139.783 116.006 139.917 116.333C140.051 116.66 140.248 116.958 140.498 117.208C140.748 117.458 141.046 117.655 141.373 117.789C141.7 117.923 142.051 117.991 142.405 117.988C142.758 117.985 143.108 117.911 143.433 117.771C143.757 117.632 144.051 117.429 144.297 117.175L147.74 113.732L151.184 117.175C151.686 117.66 152.359 117.928 153.057 117.922C153.755 117.916 154.423 117.636 154.917 117.142C155.41 116.648 155.691 115.981 155.697 115.282C155.703 114.584 155.434 113.911 154.949 113.409L151.506 109.966Z\" stroke=\"transparent\" stroke-width=\"20\" mask=\"url(#path-2-outside-1_0_1)\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_0_1\">\n <rect width=\"200\" height=\"200\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n </div>\n <div class=\"errorContainer\"></div>\n </div>\n</div>\n<div>\n <label class=\"ff-card-form-label\" for=\"cardHolderInput\">Cardholder name</label>\n <input class=\"ff-card-form-text-input\" id=\"cardHolderInput\" type=\"text\" pattern=\"[A-Za-z\\s]+\" placeholder=\"Full name on card\">\n <div class=\"errorContainer\"></div>\n</div>\n<div>\n <label class=\"ff-card-form-label\" for=\"emailAddressInput\">Email</label>\n <input class=\"ff-card-form-text-input\" id=\"emailAddressInput\" placeholder=\"Email\" type=\"email\">\n <div class=\"errorContainer\"></div>\n</div>\n<div id=\"countrySelectorField\">\n <label class=\"ff-card-form-label\" for=\"countrySelectorInput\">Country</label>\n <div class=\"ff-select-wrap\">\n <select class=\"ff-card-form-text-input ff-card-form-select\" id=\"countrySelectorInput\"></select>\n <div class=\"ff-select-arrow\" aria-hidden=\"true\"></div>\n </div>\n</div>\n<div>\n <label class=\"ff-card-form-label\" for=\"postalCodeInput\">Zip code</label>\n <input class=\"ff-card-form-text-input\" id=\"postalCodeInput\" placeholder=\"12345\">\n</div>\n";
8
+ var template = "<div>\n <label class=\"ff-card-form-label\" for=\"cardNumberInput\">Card number</label>\n <div id=\"cardNumberInput\"></div>\n <div class=\"errorContainer\"></div>\n</div>\n<div class=\"card-form-row\">\n <div>\n <label class=\"ff-card-form-label\" for=\"expiryInput\">Expiration date</label>\n <div id=\"expiryInput\"></div>\n <div class=\"errorContainer\"></div>\n </div>\n <div>\n <label class=\"ff-card-form-label\" for=\"cvvInput\">Security code</label>\n <div id=\"cvvInput\">\n <svg width=\"200\" height=\"200\" viewBox=\"0 0 200 200\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"200\" height=\"200\" fill=\"transparent\"/>\n <g clip-path=\"url(#clip0_0_1)\">\n <path d=\"M157.555 23C168.279 23.0002 177 31.7394 177 42.4854V80.5889C171.946 72.0151 164.749 64.8558 156.146 59.8457H166.394V42.4854C166.393 37.6004 162.43 33.6291 157.555 33.6289H27.4453C22.5704 33.6291 18.6066 37.6004 18.6064 42.4854V59.8457H97.8535C88.9153 65.0512 81.4954 72.5771 76.4189 81.5986H18.6064V127.515C18.6066 132.4 22.5704 136.371 27.4453 136.371H75.3281C77.2742 140.177 79.6285 143.739 82.333 147H27.4453C16.7215 147 8.00019 138.261 8 127.515V42.4854C8.0002 31.7394 16.7215 23.0002 27.4453 23H157.555Z\" fill=\"#93939A\"/>\n <mask id=\"path-2-outside-1_0_1\" maskUnits=\"userSpaceOnUse\" x=\"68.5012\" y=\"52.0311\" width=\"135\" height=\"135\" fill=\"black\">\n <rect fill=\"white\" x=\"68.5012\" y=\"52.0311\" width=\"135\" height=\"135\"/>\n <path d=\"M190.242 160.457L170.136 140.351C166.533 145.552 162.023 150.063 156.821 153.666L176.927 173.772C178.693 175.538 181.088 176.53 183.585 176.53C186.082 176.53 188.477 175.538 190.242 173.772C192.008 172.007 193 169.612 193 167.115C193 164.618 192.008 162.223 190.242 160.457ZM126.436 157.901C116.955 157.901 107.688 155.089 99.8048 149.822C91.922 144.555 85.7781 137.069 82.15 128.31C78.5219 119.551 77.5727 109.913 79.4222 100.614C81.2718 91.3158 85.8371 82.7746 92.5409 76.0708C99.2447 69.367 107.786 64.8017 117.084 62.9521C126.383 61.1026 136.021 62.0518 144.78 65.6799C153.539 69.308 161.025 75.4519 166.292 83.3347C171.559 91.2175 174.371 100.485 174.371 109.966C174.371 122.679 169.32 134.871 160.331 143.861C151.341 152.85 139.149 157.901 126.436 157.901ZM163.719 109.966C163.719 102.592 161.532 95.3838 157.435 89.2527C153.339 83.1216 147.516 78.343 140.703 75.5212C133.891 72.6994 126.395 71.9611 119.162 73.3996C111.93 74.8382 105.287 78.389 100.073 83.6031C94.8591 88.8171 91.3083 95.4602 89.8697 102.692C88.4312 109.924 89.1695 117.421 91.9913 124.233C94.8131 131.046 99.5918 136.869 105.723 140.965C111.854 145.062 119.062 147.248 126.436 147.248C136.324 147.248 145.807 143.32 152.799 136.329C159.791 129.337 163.719 119.854 163.719 109.966ZM133.645 102.757C133.398 102.51 133.104 102.313 132.781 102.179C132.458 102.046 132.112 101.977 131.762 101.977C131.412 101.977 131.066 102.046 130.743 102.179C130.42 102.313 130.126 102.51 129.879 102.757L126.436 106.2L122.993 102.757C122.49 102.272 121.818 102.003 121.119 102.01C120.421 102.016 119.753 102.296 119.26 102.789C118.766 103.283 118.486 103.951 118.48 104.649C118.474 105.348 118.742 106.02 119.227 106.523L122.67 109.966L119.227 113.409C118.973 113.655 118.77 113.949 118.63 114.274C118.491 114.598 118.417 114.948 118.414 115.301C118.411 115.655 118.479 116.006 118.612 116.333C118.746 116.66 118.944 116.958 119.194 117.208C119.444 117.458 119.741 117.655 120.069 117.789C120.396 117.923 120.747 117.991 121.1 117.988C121.454 117.985 121.803 117.911 122.128 117.771C122.453 117.632 122.747 117.429 122.993 117.175L126.436 113.732L129.879 117.175C130.382 117.66 131.054 117.928 131.752 117.922C132.451 117.916 133.119 117.636 133.612 117.142C134.106 116.648 134.386 115.981 134.392 115.282C134.398 114.584 134.13 113.911 133.645 113.409L130.202 109.966L133.645 106.523C133.892 106.275 134.088 105.982 134.222 105.659C134.356 105.336 134.425 104.989 134.425 104.64C134.425 104.29 134.356 103.944 134.222 103.621C134.088 103.298 133.892 103.004 133.645 102.757ZM112.34 102.757C112.093 102.51 111.8 102.313 111.477 102.179C111.154 102.046 110.807 101.977 110.458 101.977C110.108 101.977 109.762 102.046 109.439 102.179C109.116 102.313 108.822 102.51 108.575 102.757L105.132 106.2L101.688 102.757C101.186 102.272 100.513 102.003 99.8151 102.01C99.1169 102.016 98.4489 102.296 97.9552 102.789C97.4614 103.283 97.1814 103.951 97.1753 104.649C97.1692 105.348 97.4377 106.02 97.9227 106.523L101.366 109.966L97.9227 113.409C97.6684 113.655 97.4655 113.949 97.326 114.274C97.1864 114.598 97.1129 114.948 97.1098 115.301C97.1068 115.655 97.1742 116.006 97.3081 116.333C97.442 116.66 97.6397 116.958 97.8897 117.208C98.1398 117.458 98.4371 117.655 98.7644 117.789C99.0917 117.923 99.4423 117.991 99.7959 117.988C100.15 117.985 100.499 117.911 100.824 117.771C101.149 117.632 101.443 117.429 101.688 117.175L105.132 113.732L108.575 117.175C109.077 117.66 109.75 117.928 110.448 117.922C111.146 117.916 111.814 117.636 112.308 117.142C112.802 116.648 113.082 115.981 113.088 115.282C113.094 114.584 112.826 113.911 112.34 113.409L108.897 109.966L112.34 106.523C112.588 106.275 112.784 105.982 112.918 105.659C113.052 105.336 113.121 104.989 113.121 104.64C113.121 104.29 113.052 103.944 112.918 103.621C112.784 103.298 112.588 103.004 112.34 102.757ZM151.506 109.966L154.949 106.523C155.434 106.02 155.703 105.348 155.697 104.649C155.691 103.951 155.41 103.283 154.917 102.789C154.423 102.296 153.755 102.016 153.057 102.01C152.359 102.003 151.686 102.272 151.184 102.757L147.74 106.2L144.297 102.757C143.795 102.272 143.122 102.003 142.424 102.01C141.726 102.016 141.058 102.296 140.564 102.789C140.07 103.283 139.79 103.951 139.784 104.649C139.778 105.348 140.046 106.02 140.531 106.523L143.974 109.966L140.531 113.409C140.277 113.655 140.074 113.949 139.935 114.274C139.795 114.598 139.722 114.948 139.719 115.301C139.715 115.655 139.783 116.006 139.917 116.333C140.051 116.66 140.248 116.958 140.498 117.208C140.748 117.458 141.046 117.655 141.373 117.789C141.7 117.923 142.051 117.991 142.405 117.988C142.758 117.985 143.108 117.911 143.433 117.771C143.757 117.632 144.051 117.429 144.297 117.175L147.74 113.732L151.184 117.175C151.686 117.66 152.359 117.928 153.057 117.922C153.755 117.916 154.423 117.636 154.917 117.142C155.41 116.648 155.691 115.981 155.697 115.282C155.703 114.584 155.434 113.911 154.949 113.409L151.506 109.966Z\"/>\n </mask>\n <path d=\"M190.242 160.457L170.136 140.351C166.533 145.552 162.023 150.063 156.821 153.666L176.927 173.772C178.693 175.538 181.088 176.53 183.585 176.53C186.082 176.53 188.477 175.538 190.242 173.772C192.008 172.007 193 169.612 193 167.115C193 164.618 192.008 162.223 190.242 160.457ZM126.436 157.901C116.955 157.901 107.688 155.089 99.8048 149.822C91.922 144.555 85.7781 137.069 82.15 128.31C78.5219 119.551 77.5727 109.913 79.4222 100.614C81.2718 91.3158 85.8371 82.7746 92.5409 76.0708C99.2447 69.367 107.786 64.8017 117.084 62.9521C126.383 61.1026 136.021 62.0518 144.78 65.6799C153.539 69.308 161.025 75.4519 166.292 83.3347C171.559 91.2175 174.371 100.485 174.371 109.966C174.371 122.679 169.32 134.871 160.331 143.861C151.341 152.85 139.149 157.901 126.436 157.901ZM163.719 109.966C163.719 102.592 161.532 95.3838 157.435 89.2527C153.339 83.1216 147.516 78.343 140.703 75.5212C133.891 72.6994 126.395 71.9611 119.162 73.3996C111.93 74.8382 105.287 78.389 100.073 83.6031C94.8591 88.8171 91.3083 95.4602 89.8697 102.692C88.4312 109.924 89.1695 117.421 91.9913 124.233C94.8131 131.046 99.5918 136.869 105.723 140.965C111.854 145.062 119.062 147.248 126.436 147.248C136.324 147.248 145.807 143.32 152.799 136.329C159.791 129.337 163.719 119.854 163.719 109.966ZM133.645 102.757C133.398 102.51 133.104 102.313 132.781 102.179C132.458 102.046 132.112 101.977 131.762 101.977C131.412 101.977 131.066 102.046 130.743 102.179C130.42 102.313 130.126 102.51 129.879 102.757L126.436 106.2L122.993 102.757C122.49 102.272 121.818 102.003 121.119 102.01C120.421 102.016 119.753 102.296 119.26 102.789C118.766 103.283 118.486 103.951 118.48 104.649C118.474 105.348 118.742 106.02 119.227 106.523L122.67 109.966L119.227 113.409C118.973 113.655 118.77 113.949 118.63 114.274C118.491 114.598 118.417 114.948 118.414 115.301C118.411 115.655 118.479 116.006 118.612 116.333C118.746 116.66 118.944 116.958 119.194 117.208C119.444 117.458 119.741 117.655 120.069 117.789C120.396 117.923 120.747 117.991 121.1 117.988C121.454 117.985 121.803 117.911 122.128 117.771C122.453 117.632 122.747 117.429 122.993 117.175L126.436 113.732L129.879 117.175C130.382 117.66 131.054 117.928 131.752 117.922C132.451 117.916 133.119 117.636 133.612 117.142C134.106 116.648 134.386 115.981 134.392 115.282C134.398 114.584 134.13 113.911 133.645 113.409L130.202 109.966L133.645 106.523C133.892 106.275 134.088 105.982 134.222 105.659C134.356 105.336 134.425 104.989 134.425 104.64C134.425 104.29 134.356 103.944 134.222 103.621C134.088 103.298 133.892 103.004 133.645 102.757ZM112.34 102.757C112.093 102.51 111.8 102.313 111.477 102.179C111.154 102.046 110.807 101.977 110.458 101.977C110.108 101.977 109.762 102.046 109.439 102.179C109.116 102.313 108.822 102.51 108.575 102.757L105.132 106.2L101.688 102.757C101.186 102.272 100.513 102.003 99.8151 102.01C99.1169 102.016 98.4489 102.296 97.9552 102.789C97.4614 103.283 97.1814 103.951 97.1753 104.649C97.1692 105.348 97.4377 106.02 97.9227 106.523L101.366 109.966L97.9227 113.409C97.6684 113.655 97.4655 113.949 97.326 114.274C97.1864 114.598 97.1129 114.948 97.1098 115.301C97.1068 115.655 97.1742 116.006 97.3081 116.333C97.442 116.66 97.6397 116.958 97.8897 117.208C98.1398 117.458 98.4371 117.655 98.7644 117.789C99.0917 117.923 99.4423 117.991 99.7959 117.988C100.15 117.985 100.499 117.911 100.824 117.771C101.149 117.632 101.443 117.429 101.688 117.175L105.132 113.732L108.575 117.175C109.077 117.66 109.75 117.928 110.448 117.922C111.146 117.916 111.814 117.636 112.308 117.142C112.802 116.648 113.082 115.981 113.088 115.282C113.094 114.584 112.826 113.911 112.34 113.409L108.897 109.966L112.34 106.523C112.588 106.275 112.784 105.982 112.918 105.659C113.052 105.336 113.121 104.989 113.121 104.64C113.121 104.29 113.052 103.944 112.918 103.621C112.784 103.298 112.588 103.004 112.34 102.757ZM151.506 109.966L154.949 106.523C155.434 106.02 155.703 105.348 155.697 104.649C155.691 103.951 155.41 103.283 154.917 102.789C154.423 102.296 153.755 102.016 153.057 102.01C152.359 102.003 151.686 102.272 151.184 102.757L147.74 106.2L144.297 102.757C143.795 102.272 143.122 102.003 142.424 102.01C141.726 102.016 141.058 102.296 140.564 102.789C140.07 103.283 139.79 103.951 139.784 104.649C139.778 105.348 140.046 106.02 140.531 106.523L143.974 109.966L140.531 113.409C140.277 113.655 140.074 113.949 139.935 114.274C139.795 114.598 139.722 114.948 139.719 115.301C139.715 115.655 139.783 116.006 139.917 116.333C140.051 116.66 140.248 116.958 140.498 117.208C140.748 117.458 141.046 117.655 141.373 117.789C141.7 117.923 142.051 117.991 142.405 117.988C142.758 117.985 143.108 117.911 143.433 117.771C143.757 117.632 144.051 117.429 144.297 117.175L147.74 113.732L151.184 117.175C151.686 117.66 152.359 117.928 153.057 117.922C153.755 117.916 154.423 117.636 154.917 117.142C155.41 116.648 155.691 115.981 155.697 115.282C155.703 114.584 155.434 113.911 154.949 113.409L151.506 109.966Z\" fill=\"#93939A\"/>\n <path d=\"M190.242 160.457L170.136 140.351C166.533 145.552 162.023 150.063 156.821 153.666L176.927 173.772C178.693 175.538 181.088 176.53 183.585 176.53C186.082 176.53 188.477 175.538 190.242 173.772C192.008 172.007 193 169.612 193 167.115C193 164.618 192.008 162.223 190.242 160.457ZM126.436 157.901C116.955 157.901 107.688 155.089 99.8048 149.822C91.922 144.555 85.7781 137.069 82.15 128.31C78.5219 119.551 77.5727 109.913 79.4222 100.614C81.2718 91.3158 85.8371 82.7746 92.5409 76.0708C99.2447 69.367 107.786 64.8017 117.084 62.9521C126.383 61.1026 136.021 62.0518 144.78 65.6799C153.539 69.308 161.025 75.4519 166.292 83.3347C171.559 91.2175 174.371 100.485 174.371 109.966C174.371 122.679 169.32 134.871 160.331 143.861C151.341 152.85 139.149 157.901 126.436 157.901ZM163.719 109.966C163.719 102.592 161.532 95.3838 157.435 89.2527C153.339 83.1216 147.516 78.343 140.703 75.5212C133.891 72.6994 126.395 71.9611 119.162 73.3996C111.93 74.8382 105.287 78.389 100.073 83.6031C94.8591 88.8171 91.3083 95.4602 89.8697 102.692C88.4312 109.924 89.1695 117.421 91.9913 124.233C94.8131 131.046 99.5918 136.869 105.723 140.965C111.854 145.062 119.062 147.248 126.436 147.248C136.324 147.248 145.807 143.32 152.799 136.329C159.791 129.337 163.719 119.854 163.719 109.966ZM133.645 102.757C133.398 102.51 133.104 102.313 132.781 102.179C132.458 102.046 132.112 101.977 131.762 101.977C131.412 101.977 131.066 102.046 130.743 102.179C130.42 102.313 130.126 102.51 129.879 102.757L126.436 106.2L122.993 102.757C122.49 102.272 121.818 102.003 121.119 102.01C120.421 102.016 119.753 102.296 119.26 102.789C118.766 103.283 118.486 103.951 118.48 104.649C118.474 105.348 118.742 106.02 119.227 106.523L122.67 109.966L119.227 113.409C118.973 113.655 118.77 113.949 118.63 114.274C118.491 114.598 118.417 114.948 118.414 115.301C118.411 115.655 118.479 116.006 118.612 116.333C118.746 116.66 118.944 116.958 119.194 117.208C119.444 117.458 119.741 117.655 120.069 117.789C120.396 117.923 120.747 117.991 121.1 117.988C121.454 117.985 121.803 117.911 122.128 117.771C122.453 117.632 122.747 117.429 122.993 117.175L126.436 113.732L129.879 117.175C130.382 117.66 131.054 117.928 131.752 117.922C132.451 117.916 133.119 117.636 133.612 117.142C134.106 116.648 134.386 115.981 134.392 115.282C134.398 114.584 134.13 113.911 133.645 113.409L130.202 109.966L133.645 106.523C133.892 106.275 134.088 105.982 134.222 105.659C134.356 105.336 134.425 104.989 134.425 104.64C134.425 104.29 134.356 103.944 134.222 103.621C134.088 103.298 133.892 103.004 133.645 102.757ZM112.34 102.757C112.093 102.51 111.8 102.313 111.477 102.179C111.154 102.046 110.807 101.977 110.458 101.977C110.108 101.977 109.762 102.046 109.439 102.179C109.116 102.313 108.822 102.51 108.575 102.757L105.132 106.2L101.688 102.757C101.186 102.272 100.513 102.003 99.8151 102.01C99.1169 102.016 98.4489 102.296 97.9552 102.789C97.4614 103.283 97.1814 103.951 97.1753 104.649C97.1692 105.348 97.4377 106.02 97.9227 106.523L101.366 109.966L97.9227 113.409C97.6684 113.655 97.4655 113.949 97.326 114.274C97.1864 114.598 97.1129 114.948 97.1098 115.301C97.1068 115.655 97.1742 116.006 97.3081 116.333C97.442 116.66 97.6397 116.958 97.8897 117.208C98.1398 117.458 98.4371 117.655 98.7644 117.789C99.0917 117.923 99.4423 117.991 99.7959 117.988C100.15 117.985 100.499 117.911 100.824 117.771C101.149 117.632 101.443 117.429 101.688 117.175L105.132 113.732L108.575 117.175C109.077 117.66 109.75 117.928 110.448 117.922C111.146 117.916 111.814 117.636 112.308 117.142C112.802 116.648 113.082 115.981 113.088 115.282C113.094 114.584 112.826 113.911 112.34 113.409L108.897 109.966L112.34 106.523C112.588 106.275 112.784 105.982 112.918 105.659C113.052 105.336 113.121 104.989 113.121 104.64C113.121 104.29 113.052 103.944 112.918 103.621C112.784 103.298 112.588 103.004 112.34 102.757ZM151.506 109.966L154.949 106.523C155.434 106.02 155.703 105.348 155.697 104.649C155.691 103.951 155.41 103.283 154.917 102.789C154.423 102.296 153.755 102.016 153.057 102.01C152.359 102.003 151.686 102.272 151.184 102.757L147.74 106.2L144.297 102.757C143.795 102.272 143.122 102.003 142.424 102.01C141.726 102.016 141.058 102.296 140.564 102.789C140.07 103.283 139.79 103.951 139.784 104.649C139.778 105.348 140.046 106.02 140.531 106.523L143.974 109.966L140.531 113.409C140.277 113.655 140.074 113.949 139.935 114.274C139.795 114.598 139.722 114.948 139.719 115.301C139.715 115.655 139.783 116.006 139.917 116.333C140.051 116.66 140.248 116.958 140.498 117.208C140.748 117.458 141.046 117.655 141.373 117.789C141.7 117.923 142.051 117.991 142.405 117.988C142.758 117.985 143.108 117.911 143.433 117.771C143.757 117.632 144.051 117.429 144.297 117.175L147.74 113.732L151.184 117.175C151.686 117.66 152.359 117.928 153.057 117.922C153.755 117.916 154.423 117.636 154.917 117.142C155.41 116.648 155.691 115.981 155.697 115.282C155.703 114.584 155.434 113.911 154.949 113.409L151.506 109.966Z\" stroke=\"transparent\" stroke-width=\"20\" mask=\"url(#path-2-outside-1_0_1)\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_0_1\">\n <rect width=\"200\" height=\"200\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n </div>\n <div class=\"errorContainer\"></div>\n </div>\n</div>\n<div>\n <label class=\"ff-card-form-label\" for=\"emailAddressInput\">Email</label>\n <input class=\"ff-card-form-text-input\" id=\"emailAddressInput\" placeholder=\"Email\" type=\"email\">\n <div class=\"errorContainer\"></div>\n</div>\n<div>\n <label class=\"ff-card-form-label\" for=\"cardHolderInput\">Card holder</label>\n <input class=\"ff-card-form-text-input\" id=\"cardHolderInput\" placeholder=\"Card holder\">\n <div class=\"errorContainer\"></div>\n</div>\n";
9
9
 
10
- if(typeof document!=="undefined")document.head.appendChild(document.createElement("style")).textContent="\n\n.ff-card-form-label {\n display: block;\n font-size: 16px;\n margin-bottom: 5px;\n }\n \n .card-form-row {\n display: flex;\n flex-direction: row;\n gap: 10px;\n }\n \n .ff-card-form-text-input {\n margin: 0 0 3px;\n padding-left: 10px;\n padding-right: 10px;\n box-sizing: border-box;\n height: 36px;\n width: 100%;\n font-size: 1rem;\n background-color: transparent;\n border: 1px solid rgb(0 0 0 / 10%);\n border-radius: 6px;\n transition: all 0.3s ease;\n box-shadow: none;\n outline: none;\n }\n .ff-card-form-text-input.error {\n border-color: #e32f41;\n }\n\n.ff-select-wrap {\n position: relative;\n}\n\n.ff-card-form-select {\n padding-right: 34px;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n background-image: none;\n}\n\n.ff-card-form-select::-ms-expand {\n display: none;\n}\n\n.ff-card-form-select:disabled {\n color: #6b7280;\n cursor: not-allowed;\n}\n\n.ff-select-arrow {\n position: absolute;\n top: 50%;\n right: 12px;\n width: 8px;\n height: 8px;\n border-right: 1.5px solid #6b7280;\n border-bottom: 1.5px solid #6b7280;\n transform: translateY(-65%) rotate(45deg);\n pointer-events: none;\n}\n\n.ff-select-wrap:focus-within .ff-select-arrow {\n border-right-color: #111827;\n border-bottom-color: #111827;\n}\n \n .errorContainer:not(:empty) {\n color: #d10000;\n font-size: 16px;\n line-height: 1;\n margin: 0 0 10px;\n }\n\n #cvvInput {\n position: relative;\n }\n \n #cvvInput > svg {\n z-index: 1;\n position: absolute;\n top: 5px;\n right: 5px;\n width: 26px;\n height: 26px;\n }";
10
+ if(typeof document!=="undefined")document.head.appendChild(document.createElement("style")).textContent="\n\n.ff-card-form-label {\n display: block;\n font-size: 16px;\n margin-bottom: 5px;\n }\n \n .card-form-row {\n display: flex;\n flex-direction: row;\n gap: 10px;\n }\n \n .ff-card-form-text-input {\n margin: 0 0 3px;\n padding-left: 10px;\n padding-right: 10px;\n box-sizing: border-box;\n height: 36px;\n width: 100%;\n font-size: 1rem;\n background-color: transparent;\n border: 1px solid rgb(0 0 0 / 10%);\n border-radius: 6px;\n transition: all 0.3s ease;\n box-shadow: none;\n outline: none;\n }\n .ff-card-form-text-input.error {\n border-color: #e32f41;\n }\n \n .errorContainer:not(:empty) {\n color: #d10000;\n font-size: 16px;\n line-height: 1;\n margin: 0 0 10px;\n }\n\n #cvvInput {\n position: relative;\n }\n \n #cvvInput > svg {\n z-index: 1;\n position: absolute;\n top: 5px;\n right: 5px;\n width: 26px;\n height: 26px;\n }";
11
11
 
12
12
  class CardSkin {
13
- constructor(containerEl, checkoutConfig, cardSessionFieldConfig) {
13
+ constructor(containerEl, checkoutConfig) {
14
14
  this.onInputError = (event) => {
15
15
  const { name, error } = event;
16
16
  const cardInputElements = this.getCardInputElements();
@@ -20,20 +20,15 @@ class CardSkin {
20
20
  cvv: cardInputElements.cvv.parentElement,
21
21
  cardholderName: cardInputElements.cardholderName?.parentElement,
22
22
  emailAddress: cardInputElements.emailAddress?.parentElement,
23
- postalCode: cardInputElements.postalCode?.parentElement,
24
23
  };
25
24
  const errorContainer = elementsMap[name]?.querySelector('.errorContainer');
26
25
  if (errorContainer) {
27
26
  errorContainer.textContent = error || '';
28
27
  }
29
- if (name === 'cardholderName' ||
30
- name === 'emailAddress' ||
31
- name === 'postalCode') {
28
+ if (name === 'cardholderName' || name === 'emailAddress') {
32
29
  const field = name === 'cardholderName'
33
30
  ? cardInputElements.cardholderName
34
- : name === 'emailAddress'
35
- ? cardInputElements.emailAddress
36
- : cardInputElements.postalCode;
31
+ : cardInputElements.emailAddress;
37
32
  if (error) {
38
33
  field?.classList?.add('error');
39
34
  }
@@ -55,92 +50,21 @@ class CardSkin {
55
50
  }
56
51
  this.containerEl = containerEl;
57
52
  this.checkoutConfig = checkoutConfig;
58
- this.cardSessionFieldConfig = cardSessionFieldConfig;
59
53
  this.containerEl.style.display = 'none';
60
54
  }
61
- normalizeCountryCode(countryCode) {
62
- const normalized = countryCode?.trim().toUpperCase();
63
- return normalized || undefined;
64
- }
65
- getSelectedCountryCode() {
66
- const selector = this.containerEl.querySelector('#countrySelectorInput');
67
- return (this.normalizeCountryCode(selector?.value) ||
68
- this.normalizeCountryCode(this.cardSessionFieldConfig?.detectedCountryCode));
69
- }
70
- getCountryFieldOverride(countryCode = this.getSelectedCountryCode()) {
71
- if (!countryCode) {
72
- return undefined;
73
- }
74
- return this.cardSessionFieldConfig?.countryFieldOverrides?.[countryCode];
75
- }
76
- isCountrySelectorVisible() {
77
- return !!this.cardSessionFieldConfig?.showCountrySelector;
78
- }
79
- isCardholderNameVisible() {
80
- return !!this.checkoutConfig.card?.cardholderName?.required;
81
- }
82
- isPostalCodeVisible(countryCode = this.getSelectedCountryCode()) {
83
- const defaultVisible = !!this.cardSessionFieldConfig?.showPostalCode;
84
- const overrideValue = this.getCountryFieldOverride(countryCode)?.show_postal_code;
85
- if (overrideValue === null || overrideValue === undefined) {
86
- return defaultVisible;
87
- }
88
- return overrideValue;
89
- }
90
- setFieldVisibility(inputId, isVisible) {
91
- const field = this.containerEl.querySelector(`#${inputId}`);
92
- if (field?.parentElement) {
93
- field.parentElement.style.display = isVisible ? '' : 'none';
94
- }
95
- }
96
- setContainerVisibility(containerId, isVisible) {
97
- const container = this.containerEl.querySelector(`#${containerId}`);
98
- if (container) {
99
- container.style.display = isVisible ? '' : 'none';
100
- }
101
- }
102
- populateCountrySelector(selectEl) {
103
- const validCountries = this.cardSessionFieldConfig?.validCountries || [];
104
- const selectedCountryCode = this.getSelectedCountryCode();
105
- selectEl.innerHTML = '';
106
- selectEl.disabled = false;
107
- if (!validCountries.length) {
108
- const fallbackOption = document.createElement('option');
109
- fallbackOption.value = selectedCountryCode || '';
110
- fallbackOption.textContent = selectedCountryCode
111
- ? `Detected country: ${selectedCountryCode}`
112
- : 'Country unavailable';
113
- selectEl.appendChild(fallbackOption);
114
- selectEl.disabled = true;
115
- return;
116
- }
117
- const placeholderOption = document.createElement('option');
118
- placeholderOption.value = '';
119
- placeholderOption.textContent = 'Select country';
120
- selectEl.appendChild(placeholderOption);
121
- validCountries.forEach(country => {
122
- const option = document.createElement('option');
123
- option.value = country.code;
124
- option.textContent = country.name;
125
- selectEl.appendChild(option);
126
- });
127
- if (selectedCountryCode) {
128
- selectEl.value = selectedCountryCode;
129
- }
130
- }
131
- updateDynamicFieldVisibility(countryCode = this.getSelectedCountryCode()) {
132
- this.setFieldVisibility('cardHolderInput', this.isCardholderNameVisible());
133
- this.setFieldVisibility('postalCodeInput', this.isPostalCodeVisible(countryCode));
134
- const postalCodeInput = this.containerEl.querySelector('#postalCodeInput');
135
- if (!this.isPostalCodeVisible(countryCode) && postalCodeInput) {
136
- postalCodeInput.value = '';
137
- }
138
- }
139
55
  wireCardInputs() {
140
56
  const cardNumber = this.containerEl.querySelector('#cardNumberInput');
141
57
  const expiryDate = this.containerEl.querySelector('#expiryInput');
142
58
  const cvv = this.containerEl.querySelector('#cvvInput');
143
- const cardholderName = this.containerEl.querySelector('#cardHolderInput');
59
+ const hasCardholderInput = !!this.checkoutConfig?.card?.cardholderName?.required;
60
+ let cardholderName = undefined;
61
+ if (hasCardholderInput) {
62
+ cardholderName =
63
+ this.containerEl.querySelector('#cardHolderInput');
64
+ }
65
+ else {
66
+ this.containerEl.querySelector('#cardHolderInput').parentElement.style.display = 'none';
67
+ }
144
68
  const hasEmailInput = !!this.checkoutConfig?.card?.emailAddress?.visible;
145
69
  let emailAddress = undefined;
146
70
  if (hasEmailInput) {
@@ -153,23 +77,11 @@ class CardSkin {
153
77
  else {
154
78
  this.containerEl.querySelector('#emailAddressInput').parentElement.style.display = 'none';
155
79
  }
156
- const countrySelector = this.containerEl.querySelector('#countrySelectorInput');
157
- const postalCode = this.containerEl.querySelector('#postalCodeInput');
158
- if (countrySelector) {
159
- this.populateCountrySelector(countrySelector);
160
- countrySelector.addEventListener('change', () => {
161
- this.updateDynamicFieldVisibility(this.normalizeCountryCode(countrySelector.value));
162
- });
163
- }
164
- this.setContainerVisibility('countrySelectorField', this.isCountrySelectorVisible());
165
- this.updateDynamicFieldVisibility();
166
80
  if (!cardNumber ||
167
81
  !expiryDate ||
168
82
  !cvv ||
169
- !cardholderName ||
170
- (hasEmailInput && !emailAddress) ||
171
- !countrySelector ||
172
- !postalCode) {
83
+ (hasCardholderInput && !cardholderName) ||
84
+ (hasEmailInput && !emailAddress)) {
173
85
  throw new Error('One or more card input elements are missing in the default skin');
174
86
  }
175
87
  this.cardInputElements = {
@@ -178,8 +90,6 @@ class CardSkin {
178
90
  cvv,
179
91
  cardholderName,
180
92
  emailAddress,
181
- countrySelector,
182
- postalCode,
183
93
  };
184
94
  }
185
95
  async init() {
@@ -195,6 +105,11 @@ class CardSkin {
195
105
  getCheckoutOptions() {
196
106
  return {
197
107
  cardElements: this.getCardInputElements(),
108
+ card: {
109
+ cardholderName: {
110
+ required: !!this.checkoutConfig?.card?.cardholderName?.required,
111
+ },
112
+ },
198
113
  };
199
114
  }
200
115
  }