@funnelfox/billing 0.6.4 → 0.6.5-beta.2

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.
@@ -422,7 +422,7 @@ exports.PaymentMethod = void 0;
422
422
  /**
423
423
  * @fileoverview Constants for Funnefox SDK
424
424
  */
425
- const SDK_VERSION = '0.6.4';
425
+ const SDK_VERSION = '0.6.5-beta.2';
426
426
  const DEFAULTS = {
427
427
  BASE_URL: 'https://billing.funnelfox.com',
428
428
  REGION: 'default',
@@ -673,6 +673,8 @@ class PrimerWrapper {
673
673
  onMethodRenderError: options.onMethodRenderError,
674
674
  onMethodRender: options.onMethodRender,
675
675
  onCardInputValueChange: options.onCardInputValueChange,
676
+ isCardholderNameRequired: options.isCardholderNameRequired,
677
+ isPostalCodeRequired: options.isPostalCodeRequired,
676
678
  });
677
679
  this.paymentMethodsInterfaces.push(cardInterface);
678
680
  return cardInterface;
@@ -691,7 +693,7 @@ class PrimerWrapper {
691
693
  throw new PrimerError('Failed to initialize Primer checkout', error);
692
694
  }
693
695
  }
694
- async renderCardCheckoutWithElements(elements, { onSubmit, onInputChange, onCardInputValueChange, onMethodRenderError, onMethodRender, }) {
696
+ async renderCardCheckoutWithElements(elements, { onSubmit, onInputChange, onCardInputValueChange, isCardholderNameRequired, isPostalCodeRequired, onMethodRenderError, onMethodRender, }) {
695
697
  try {
696
698
  if (!this.currentHeadless) {
697
699
  throw new PrimerError('Headless checkout not found');
@@ -706,14 +708,21 @@ class PrimerWrapper {
706
708
  if (!pmManager)
707
709
  return false;
708
710
  const { valid, validationErrors } = await pmManager.validate();
709
- const cardHolderError = validationErrors.find(v => v.name === 'cardholderName');
710
- dispatchError('cardholderName', cardHolderError?.message || null);
711
+ const cardHolderError = isCardholderNameRequired?.()
712
+ ? validationErrors.find(v => v.name === 'cardholderName')?.message
713
+ : null;
714
+ dispatchError('cardholderName', cardHolderError);
711
715
  const emailAddress = elements.emailAddress?.value?.trim();
712
716
  const emailError = emailAddress && !isValidEmail(emailAddress)
713
717
  ? 'Please enter a valid email address'
714
718
  : null;
715
719
  dispatchError('emailAddress', emailError);
716
- return valid && !emailError;
720
+ const postalCode = elements.postalCode?.value?.trim();
721
+ const postalCodeError = isPostalCodeRequired?.() && !postalCode
722
+ ? 'Please enter a postal code'
723
+ : null;
724
+ dispatchError('postalCode', postalCodeError);
725
+ return valid && !emailError && !cardHolderError && !postalCodeError;
717
726
  };
718
727
  const dispatchError = (inputName, error) => {
719
728
  onInputChange(inputName, error);
@@ -736,8 +745,19 @@ class PrimerWrapper {
736
745
  ? 'Please enter a valid email address'
737
746
  : null);
738
747
  };
748
+ const countrySelectorOnChange = (e) => {
749
+ const countryCode = e.target.value.trim();
750
+ onCardInputValueChange?.('countryCode', countryCode);
751
+ };
752
+ const postalCodeOnChange = (e) => {
753
+ const postalCode = e.target.value.trim();
754
+ onCardInputValueChange?.('postalCode', postalCode);
755
+ dispatchError('postalCode', null);
756
+ };
739
757
  elements.cardholderName?.addEventListener('input', cardHolderOnChange);
740
758
  elements.emailAddress?.addEventListener('input', emailAddressOnChange);
759
+ elements.countrySelector?.addEventListener('change', countrySelectorOnChange);
760
+ elements.postalCode?.addEventListener('input', postalCodeOnChange);
741
761
  cardNumberInput.addEventListener('change', onHostedInputChange('cardNumber'));
742
762
  expiryInput.addEventListener('change', onHostedInputChange('expiryDate'));
743
763
  cvvInput.addEventListener('change', onHostedInputChange('cvv'));
@@ -779,6 +799,8 @@ class PrimerWrapper {
779
799
  pmManager.removeHostedInputs();
780
800
  elements.cardholderName?.removeEventListener('input', cardHolderOnChange);
781
801
  elements.emailAddress?.removeEventListener('input', emailAddressOnChange);
802
+ elements.countrySelector?.removeEventListener('change', countrySelectorOnChange);
803
+ elements.postalCode?.removeEventListener('input', postalCodeOnChange);
782
804
  elements.button?.removeEventListener('click', onSubmitHandler);
783
805
  };
784
806
  this.destroyCallbacks.push(onDestroy);
@@ -797,6 +819,12 @@ class PrimerWrapper {
797
819
  if (elements.emailAddress) {
798
820
  elements.emailAddress.disabled = disabled;
799
821
  }
822
+ if (elements.countrySelector) {
823
+ elements.countrySelector.disabled = disabled;
824
+ }
825
+ if (elements.postalCode) {
826
+ elements.postalCode.disabled = disabled;
827
+ }
800
828
  },
801
829
  submit: () => onSubmitHandler(),
802
830
  destroy: () => {
@@ -819,7 +847,7 @@ class PrimerWrapper {
819
847
  });
820
848
  }
821
849
  async renderCheckout(clientToken, checkoutOptions, checkoutRenderOptions) {
822
- const { cardElements, paymentButtonElements, container, onSubmit, onInputChange, onMethodRender, onMethodRenderError, onMethodsAvailable, onCardInputValueChange, } = checkoutRenderOptions;
850
+ const { cardElements, paymentButtonElements, container, onSubmit, onInputChange, onMethodRender, onMethodRenderError, onMethodsAvailable, onCardInputValueChange, isCardholderNameRequired, isPostalCodeRequired, } = checkoutRenderOptions;
823
851
  await this.initializeHeadlessCheckout(clientToken, checkoutOptions);
824
852
  onMethodsAvailable?.(this.availableMethods);
825
853
  await Promise.all(this.availableMethods.map(method => {
@@ -832,6 +860,8 @@ class PrimerWrapper {
832
860
  onMethodRender,
833
861
  onMethodRenderError,
834
862
  onCardInputValueChange,
863
+ isCardholderNameRequired,
864
+ isPostalCodeRequired,
835
865
  });
836
866
  }
837
867
  else {
@@ -1046,6 +1076,12 @@ class APIClient {
1046
1076
  if (params.email !== undefined) {
1047
1077
  payload.email_address = params.email;
1048
1078
  }
1079
+ if (params.countryCode !== undefined) {
1080
+ payload.country_code = params.countryCode;
1081
+ }
1082
+ if (params.postalCode !== undefined) {
1083
+ payload.postal_code = params.postalCode;
1084
+ }
1049
1085
  return (await this.request(API_ENDPOINTS.CREATE_PAYMENT, {
1050
1086
  method: 'POST',
1051
1087
  body: JSON.stringify(payload),
@@ -1358,12 +1394,24 @@ class CheckoutInstance extends EventEmitter {
1358
1394
  super();
1359
1395
  this.counter = 0;
1360
1396
  this.radarSessionId = null;
1397
+ this.cardSessionFieldConfig = {};
1361
1398
  this.handleInputChange = (inputName, error) => {
1362
1399
  this.emit(EVENTS.INPUT_ERROR, { name: inputName, error });
1363
1400
  };
1364
1401
  this.handleCardInputValueChange = (inputName, value) => {
1365
1402
  if (inputName === 'emailAddress') {
1366
1403
  this.cardEmailAddress = value?.trim() || undefined;
1404
+ return;
1405
+ }
1406
+ if (inputName === 'countryCode') {
1407
+ this.cardCountryCode = this.normalizeCountryCode(value);
1408
+ if (!this.isPostalCodeVisible()) {
1409
+ this.cardPostalCode = undefined;
1410
+ }
1411
+ return;
1412
+ }
1413
+ if (inputName === 'postalCode') {
1414
+ this.cardPostalCode = value?.trim() || undefined;
1367
1415
  }
1368
1416
  };
1369
1417
  this.handleMethodRender = (method) => {
@@ -1389,6 +1437,8 @@ class CheckoutInstance extends EventEmitter {
1389
1437
  orderId: this.orderId,
1390
1438
  paymentMethodToken: paymentMethodTokenData.token,
1391
1439
  email: this.getPaymentEmailAddress(),
1440
+ countryCode: this.getPaymentCountryCode(),
1441
+ postalCode: this.getPaymentPostalCode(),
1392
1442
  clientMetadata: {
1393
1443
  radarSessionId,
1394
1444
  },
@@ -1461,6 +1511,8 @@ class CheckoutInstance extends EventEmitter {
1461
1511
  this.primerWrapper = new PrimerWrapper();
1462
1512
  this.isDestroyed = false;
1463
1513
  this.cardEmailAddress = this.checkoutConfig.customer.email;
1514
+ this.shouldApplySessionCardholderNameConfig =
1515
+ this.checkoutConfig.card?.cardholderName?.required === undefined;
1464
1516
  this._setupCallbackBridges();
1465
1517
  }
1466
1518
  _setupCallbackBridges() {
@@ -1553,7 +1605,9 @@ class CheckoutInstance extends EventEmitter {
1553
1605
  this.clientToken = sessionData.clientToken;
1554
1606
  }
1555
1607
  applySessionCardFieldConfig(response) {
1556
- const cardConfig = this.checkoutConfig.card || {};
1608
+ const cardConfig = {
1609
+ ...(this.checkoutConfig.card || {}),
1610
+ };
1557
1611
  if (cardConfig.emailAddress?.visible === undefined &&
1558
1612
  response.data?.show_email_field !== undefined) {
1559
1613
  cardConfig.emailAddress = {
@@ -1561,19 +1615,41 @@ class CheckoutInstance extends EventEmitter {
1561
1615
  visible: response.data.show_email_field,
1562
1616
  };
1563
1617
  }
1564
- if (cardConfig.cardholderName?.required === undefined &&
1618
+ if (this.shouldApplySessionCardholderNameConfig &&
1565
1619
  response.data?.show_cardholder_name_field !== undefined) {
1566
1620
  cardConfig.cardholderName = {
1567
1621
  ...cardConfig.cardholderName,
1568
1622
  required: response.data.show_cardholder_name_field,
1569
1623
  };
1570
1624
  }
1625
+ const countryFieldOverrides = this.normalizeCountryFieldOverrides(response.data?.country_field_overrides);
1626
+ const detectedCountryCode = this.normalizeCountryCode(response.data?.detected_country_code) ||
1627
+ this.cardCountryCode;
1628
+ this.cardSessionFieldConfig = {
1629
+ ...this.cardSessionFieldConfig,
1630
+ showCountrySelector: response.data?.show_country_selector_field ??
1631
+ this.cardSessionFieldConfig.showCountrySelector,
1632
+ showPostalCode: response.data?.show_postal_code_field ??
1633
+ this.cardSessionFieldConfig.showPostalCode,
1634
+ detectedCountryCode: detectedCountryCode || this.cardSessionFieldConfig.detectedCountryCode,
1635
+ validCountries: response.data?.valid_countries ||
1636
+ this.cardSessionFieldConfig.validCountries,
1637
+ countryFieldOverrides: countryFieldOverrides ||
1638
+ this.cardSessionFieldConfig.countryFieldOverrides,
1639
+ };
1571
1640
  if (Object.keys(cardConfig).length > 0) {
1572
1641
  this.checkoutConfig.card = cardConfig;
1573
1642
  }
1643
+ this.cardCountryCode =
1644
+ this.cardSessionFieldConfig.detectedCountryCode || this.cardCountryCode;
1645
+ if (!this.isPostalCodeVisible()) {
1646
+ this.cardPostalCode = undefined;
1647
+ }
1574
1648
  }
1575
1649
  getPrimerCardConfig() {
1576
- const cardConfig = { ...(this.checkoutConfig.card || {}) };
1650
+ const cardConfig = {
1651
+ ...(this.checkoutConfig.card || {}),
1652
+ };
1577
1653
  delete cardConfig.emailAddress;
1578
1654
  return Object.keys(cardConfig).length
1579
1655
  ? cardConfig
@@ -1694,6 +1770,8 @@ class CheckoutInstance extends EventEmitter {
1694
1770
  onSubmit: this.handleSubmit,
1695
1771
  onInputChange: this.handleInputChange,
1696
1772
  onCardInputValueChange: this.handleCardInputValueChange,
1773
+ isCardholderNameRequired: () => this.isCardholderNameRequired(),
1774
+ isPostalCodeRequired: () => this.isPostalCodeVisible(),
1697
1775
  onMethodRender: this.handleMethodRender,
1698
1776
  onMethodsAvailable: this.handleMethodsAvailable,
1699
1777
  onMethodRenderError: this.handleMethodRenderError,
@@ -1852,12 +1930,58 @@ class CheckoutInstance extends EventEmitter {
1852
1930
  isProcessing() {
1853
1931
  return ['processing', 'action_required'].includes(this.state);
1854
1932
  }
1933
+ normalizeCountryCode(countryCode) {
1934
+ const normalized = countryCode?.trim().toUpperCase();
1935
+ return normalized || undefined;
1936
+ }
1937
+ normalizeCountryFieldOverrides(overrides) {
1938
+ if (!overrides) {
1939
+ return undefined;
1940
+ }
1941
+ return Object.entries(overrides).reduce((result, [countryCode, override]) => {
1942
+ const normalizedCountryCode = this.normalizeCountryCode(countryCode);
1943
+ if (normalizedCountryCode && override) {
1944
+ result[normalizedCountryCode] = override;
1945
+ }
1946
+ return result;
1947
+ }, {});
1948
+ }
1949
+ getSelectedCountryCode() {
1950
+ return (this.normalizeCountryCode(this.cardCountryCode) ||
1951
+ this.normalizeCountryCode(this.cardSessionFieldConfig.detectedCountryCode));
1952
+ }
1953
+ getCountryFieldOverride(countryCode = this.getSelectedCountryCode()) {
1954
+ if (!countryCode) {
1955
+ return undefined;
1956
+ }
1957
+ return this.cardSessionFieldConfig.countryFieldOverrides?.[countryCode];
1958
+ }
1959
+ isCardholderNameRequired() {
1960
+ return !!this.checkoutConfig.card?.cardholderName?.required;
1961
+ }
1962
+ isPostalCodeVisible(countryCode = this.getSelectedCountryCode()) {
1963
+ const defaultValue = !!this.cardSessionFieldConfig.showPostalCode;
1964
+ const overrideValue = this.getCountryFieldOverride(countryCode)?.show_postal_code;
1965
+ if (overrideValue === null || overrideValue === undefined) {
1966
+ return defaultValue;
1967
+ }
1968
+ return overrideValue;
1969
+ }
1970
+ getPaymentCountryCode() {
1971
+ return this.getSelectedCountryCode();
1972
+ }
1973
+ getPaymentPostalCode() {
1974
+ if (!this.isPostalCodeVisible()) {
1975
+ return undefined;
1976
+ }
1977
+ return this.cardPostalCode?.trim() || undefined;
1978
+ }
1855
1979
  // Creates containers to render hosted inputs with labels and error messages,
1856
1980
  // a card holder input with label and error, and a submit button.
1857
1981
  async getDefaultSkinCheckoutOptions() {
1858
1982
  const skinFactory = (await Promise.resolve().then(function () { return require('./chunk-index.cjs2.js'); }))
1859
1983
  .default;
1860
- const skin = await skinFactory(this.checkoutConfig);
1984
+ const skin = await skinFactory(this.checkoutConfig, this.cardSessionFieldConfig);
1861
1985
  this.on(EVENTS.INPUT_ERROR, skin.onInputError);
1862
1986
  this.on(EVENTS.STATUS_CHANGE, skin.onStatusChange);
1863
1987
  this.on(EVENTS.ERROR, (error) => skin.onError(error));
@@ -1873,7 +1997,7 @@ class CheckoutInstance extends EventEmitter {
1873
1997
  }
1874
1998
  async getCardDefaultSkinCheckoutOptions(node) {
1875
1999
  const CardSkin = (await Promise.resolve().then(function () { return require('./chunk-index.cjs3.js'); })).default;
1876
- const skin = new CardSkin(node, this.checkoutConfig);
2000
+ const skin = new CardSkin(node, this.checkoutConfig, this.cardSessionFieldConfig);
1877
2001
  skin.init();
1878
2002
  this.on(EVENTS.INPUT_ERROR, skin.onInputError);
1879
2003
  this.on(EVENTS.METHOD_RENDER, skin.onMethodRender);
@@ -1934,6 +2058,8 @@ class CheckoutInstance extends EventEmitter {
1934
2058
  onSubmit: this.handleSubmit,
1935
2059
  onInputChange: this.handleInputChange,
1936
2060
  onCardInputValueChange: this.handleCardInputValueChange,
2061
+ isCardholderNameRequired: () => this.isCardholderNameRequired(),
2062
+ isPostalCodeRequired: () => this.isPostalCodeVisible(),
1937
2063
  onMethodRender: this.handleMethodRender,
1938
2064
  onMethodRenderError: this.handleMethodRenderError,
1939
2065
  };
@@ -29,7 +29,7 @@ const paymentMethodTemplates = {
29
29
  [index.PaymentMethod.APPLE_PAY]: applePayTemplate,
30
30
  };
31
31
  class DefaultSkin {
32
- constructor(checkoutConfig) {
32
+ constructor(checkoutConfig, cardSessionFieldConfig) {
33
33
  this.onLoaderChange = (isLoading) => {
34
34
  document
35
35
  .querySelectorAll(`${this.containerSelector} .loader-container`)
@@ -118,6 +118,7 @@ class DefaultSkin {
118
118
  }
119
119
  this.containerEl = containerEl;
120
120
  this.checkoutConfig = checkoutConfig;
121
+ this.cardSessionFieldConfig = cardSessionFieldConfig;
121
122
  }
122
123
  initAccordion() {
123
124
  const paymentMethodCards = this.containerEl.querySelectorAll('.ff-payment-method-card');
@@ -166,7 +167,7 @@ class DefaultSkin {
166
167
  this.paymentMethodOrder.forEach(paymentMethod => {
167
168
  paymentMethodContainers.insertAdjacentHTML('beforeend', paymentMethodTemplates[paymentMethod]);
168
169
  });
169
- this.cardInstance = new index$1.default(document.querySelector('#cardForm'), this.checkoutConfig);
170
+ this.cardInstance = new index$1.default(document.querySelector('#cardForm'), this.checkoutConfig, this.cardSessionFieldConfig);
170
171
  this.cardInstance.init();
171
172
  this.wireCardInputs();
172
173
  }
@@ -197,8 +198,8 @@ class DefaultSkin {
197
198
  };
198
199
  }
199
200
  }
200
- const createDefaultSkin = async (checkoutConfig) => {
201
- const skin = new DefaultSkin(checkoutConfig);
201
+ const createDefaultSkin = async (checkoutConfig, cardSessionFieldConfig) => {
202
+ const skin = new DefaultSkin(checkoutConfig, cardSessionFieldConfig);
202
203
  await skin['init']();
203
204
  return skin;
204
205
  };
@@ -7,12 +7,12 @@
7
7
  */
8
8
  'use strict';
9
9
 
10
- 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";
10
+ 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<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\">Postal code</label>\n <input class=\"ff-card-form-text-input\" id=\"postalCodeInput\" placeholder=\"Postal code\">\n</div>\n";
11
11
 
12
- 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 }";
12
+ 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 }";
13
13
 
14
14
  class CardSkin {
15
- constructor(containerEl, checkoutConfig) {
15
+ constructor(containerEl, checkoutConfig, cardSessionFieldConfig) {
16
16
  this.onInputError = (event) => {
17
17
  const { name, error } = event;
18
18
  const cardInputElements = this.getCardInputElements();
@@ -22,15 +22,20 @@ class CardSkin {
22
22
  cvv: cardInputElements.cvv.parentElement,
23
23
  cardholderName: cardInputElements.cardholderName?.parentElement,
24
24
  emailAddress: cardInputElements.emailAddress?.parentElement,
25
+ postalCode: cardInputElements.postalCode?.parentElement,
25
26
  };
26
27
  const errorContainer = elementsMap[name]?.querySelector('.errorContainer');
27
28
  if (errorContainer) {
28
29
  errorContainer.textContent = error || '';
29
30
  }
30
- if (name === 'cardholderName' || name === 'emailAddress') {
31
+ if (name === 'cardholderName' ||
32
+ name === 'emailAddress' ||
33
+ name === 'postalCode') {
31
34
  const field = name === 'cardholderName'
32
35
  ? cardInputElements.cardholderName
33
- : cardInputElements.emailAddress;
36
+ : name === 'emailAddress'
37
+ ? cardInputElements.emailAddress
38
+ : cardInputElements.postalCode;
34
39
  if (error) {
35
40
  field?.classList?.add('error');
36
41
  }
@@ -52,21 +57,92 @@ class CardSkin {
52
57
  }
53
58
  this.containerEl = containerEl;
54
59
  this.checkoutConfig = checkoutConfig;
60
+ this.cardSessionFieldConfig = cardSessionFieldConfig;
55
61
  this.containerEl.style.display = 'none';
56
62
  }
63
+ normalizeCountryCode(countryCode) {
64
+ const normalized = countryCode?.trim().toUpperCase();
65
+ return normalized || undefined;
66
+ }
67
+ getSelectedCountryCode() {
68
+ const selector = this.containerEl.querySelector('#countrySelectorInput');
69
+ return (this.normalizeCountryCode(selector?.value) ||
70
+ this.normalizeCountryCode(this.cardSessionFieldConfig?.detectedCountryCode));
71
+ }
72
+ getCountryFieldOverride(countryCode = this.getSelectedCountryCode()) {
73
+ if (!countryCode) {
74
+ return undefined;
75
+ }
76
+ return this.cardSessionFieldConfig?.countryFieldOverrides?.[countryCode];
77
+ }
78
+ isCountrySelectorVisible() {
79
+ return !!this.cardSessionFieldConfig?.showCountrySelector;
80
+ }
81
+ isCardholderNameVisible() {
82
+ return !!this.checkoutConfig.card?.cardholderName?.required;
83
+ }
84
+ isPostalCodeVisible(countryCode = this.getSelectedCountryCode()) {
85
+ const defaultVisible = !!this.cardSessionFieldConfig?.showPostalCode;
86
+ const overrideValue = this.getCountryFieldOverride(countryCode)?.show_postal_code;
87
+ if (overrideValue === null || overrideValue === undefined) {
88
+ return defaultVisible;
89
+ }
90
+ return overrideValue;
91
+ }
92
+ setFieldVisibility(inputId, isVisible) {
93
+ const field = this.containerEl.querySelector(`#${inputId}`);
94
+ if (field?.parentElement) {
95
+ field.parentElement.style.display = isVisible ? '' : 'none';
96
+ }
97
+ }
98
+ setContainerVisibility(containerId, isVisible) {
99
+ const container = this.containerEl.querySelector(`#${containerId}`);
100
+ if (container) {
101
+ container.style.display = isVisible ? '' : 'none';
102
+ }
103
+ }
104
+ populateCountrySelector(selectEl) {
105
+ const validCountries = this.cardSessionFieldConfig?.validCountries || [];
106
+ const selectedCountryCode = this.getSelectedCountryCode();
107
+ selectEl.innerHTML = '';
108
+ selectEl.disabled = false;
109
+ if (!validCountries.length) {
110
+ const fallbackOption = document.createElement('option');
111
+ fallbackOption.value = selectedCountryCode || '';
112
+ fallbackOption.textContent = selectedCountryCode
113
+ ? `Detected country: ${selectedCountryCode}`
114
+ : 'Country unavailable';
115
+ selectEl.appendChild(fallbackOption);
116
+ selectEl.disabled = true;
117
+ return;
118
+ }
119
+ const placeholderOption = document.createElement('option');
120
+ placeholderOption.value = '';
121
+ placeholderOption.textContent = 'Select country';
122
+ selectEl.appendChild(placeholderOption);
123
+ validCountries.forEach(country => {
124
+ const option = document.createElement('option');
125
+ option.value = country.code;
126
+ option.textContent = country.name;
127
+ selectEl.appendChild(option);
128
+ });
129
+ if (selectedCountryCode) {
130
+ selectEl.value = selectedCountryCode;
131
+ }
132
+ }
133
+ updateDynamicFieldVisibility(countryCode = this.getSelectedCountryCode()) {
134
+ this.setFieldVisibility('cardHolderInput', this.isCardholderNameVisible());
135
+ this.setFieldVisibility('postalCodeInput', this.isPostalCodeVisible(countryCode));
136
+ const postalCodeInput = this.containerEl.querySelector('#postalCodeInput');
137
+ if (!this.isPostalCodeVisible(countryCode) && postalCodeInput) {
138
+ postalCodeInput.value = '';
139
+ }
140
+ }
57
141
  wireCardInputs() {
58
142
  const cardNumber = this.containerEl.querySelector('#cardNumberInput');
59
143
  const expiryDate = this.containerEl.querySelector('#expiryInput');
60
144
  const cvv = this.containerEl.querySelector('#cvvInput');
61
- const hasCardholderInput = !!this.checkoutConfig?.card?.cardholderName?.required;
62
- let cardholderName = undefined;
63
- if (hasCardholderInput) {
64
- cardholderName =
65
- this.containerEl.querySelector('#cardHolderInput');
66
- }
67
- else {
68
- this.containerEl.querySelector('#cardHolderInput').parentElement.style.display = 'none';
69
- }
145
+ const cardholderName = this.containerEl.querySelector('#cardHolderInput');
70
146
  const hasEmailInput = !!this.checkoutConfig?.card?.emailAddress?.visible;
71
147
  let emailAddress = undefined;
72
148
  if (hasEmailInput) {
@@ -79,11 +155,23 @@ class CardSkin {
79
155
  else {
80
156
  this.containerEl.querySelector('#emailAddressInput').parentElement.style.display = 'none';
81
157
  }
158
+ const countrySelector = this.containerEl.querySelector('#countrySelectorInput');
159
+ const postalCode = this.containerEl.querySelector('#postalCodeInput');
160
+ if (countrySelector) {
161
+ this.populateCountrySelector(countrySelector);
162
+ countrySelector.addEventListener('change', () => {
163
+ this.updateDynamicFieldVisibility(this.normalizeCountryCode(countrySelector.value));
164
+ });
165
+ }
166
+ this.setContainerVisibility('countrySelectorField', this.isCountrySelectorVisible());
167
+ this.updateDynamicFieldVisibility();
82
168
  if (!cardNumber ||
83
169
  !expiryDate ||
84
170
  !cvv ||
85
- (hasCardholderInput && !cardholderName) ||
86
- (hasEmailInput && !emailAddress)) {
171
+ !cardholderName ||
172
+ (hasEmailInput && !emailAddress) ||
173
+ !countrySelector ||
174
+ !postalCode) {
87
175
  throw new Error('One or more card input elements are missing in the default skin');
88
176
  }
89
177
  this.cardInputElements = {
@@ -92,6 +180,8 @@ class CardSkin {
92
180
  cvv,
93
181
  cardholderName,
94
182
  emailAddress,
183
+ countrySelector,
184
+ postalCode,
95
185
  };
96
186
  }
97
187
  async init() {
@@ -107,11 +197,6 @@ class CardSkin {
107
197
  getCheckoutOptions() {
108
198
  return {
109
199
  cardElements: this.getCardInputElements(),
110
- card: {
111
- cardholderName: {
112
- required: !!this.checkoutConfig?.card?.cardholderName?.required,
113
- },
114
- },
115
200
  };
116
201
  }
117
202
  }