@adyen/adyen-web 6.43.0 → 6.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +26 -27
- package/dist/es/components/Card/Card.js +1 -1
- package/dist/es/components/Card/Card.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/CardInput.js +1 -1
- package/dist/es/components/Card/components/CardInput/CardInput.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CVC.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/CVC.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CardFields.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/CardFields.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/DualBrandSelector.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/DualBrandSelector.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/StoredCardFields.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/StoredCardFields.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/types.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/useSRPanelForCardInputErrors.js +1 -1
- package/dist/es/components/Card/components/CardInput/useSRPanelForCardInputErrors.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/utils.js +1 -1
- package/dist/es/components/Card/components/CardInput/utils.js.map +1 -1
- package/dist/es/components/CustomCard/CustomCard.js +1 -1
- package/dist/es/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es/components/CustomCard/CustomCardInput/CustomCardInput.js +1 -1
- package/dist/es/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
- package/dist/es/components/Dropin/Dropin.js +1 -1
- package/dist/es/components/Dropin/Dropin.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
- package/dist/es/components/Giftcard/Giftcard.js +1 -1
- package/dist/es/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js.map +1 -1
- package/dist/es/components/internal/Address/Address.js +1 -1
- package/dist/es/components/internal/Address/Address.js.map +1 -1
- package/dist/es/components/internal/Address/validate.js.map +1 -1
- package/dist/es/components/internal/BaseElement/BaseElement.js +1 -1
- package/dist/es/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es/components/internal/Button/Button.js +1 -1
- package/dist/es/components/internal/Button/Button.js.map +1 -1
- package/dist/es/components/internal/Button/CopyButton.js +1 -1
- package/dist/es/components/internal/Button/CopyButton.js.map +1 -1
- package/dist/es/components/internal/Button/CopyIconButton.js +1 -1
- package/dist/es/components/internal/Button/CopyIconButton.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/ClickToPayComponent.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPSection.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
- package/dist/es/components/internal/FormFields/InputBase.js +1 -1
- package/dist/es/components/internal/FormFields/InputBase.js.map +1 -1
- package/dist/es/components/internal/FormFields/Select/Select.js +1 -1
- package/dist/es/components/internal/FormFields/Select/Select.js.map +1 -1
- package/dist/es/components/internal/LoadingWrapper/LoadingWrapper.js +1 -1
- package/dist/es/components/internal/LoadingWrapper/LoadingWrapper.js.map +1 -1
- package/dist/es/components/internal/Modal/Modal.js +1 -1
- package/dist/es/components/internal/Modal/Modal.js.map +1 -1
- package/dist/es/components/internal/QRLoader/QRLoader.js +1 -1
- package/dist/es/components/internal/QRLoader/QRLoader.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRFinalState.js +1 -1
- package/dist/es/components/internal/QRLoader/components/QRFinalState.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRLoaderPendingState.js +2 -0
- package/dist/es/components/internal/QRLoader/components/QRLoaderPendingState.js.map +1 -0
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/defaultProps.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/defaultProps.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/constants.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/constants.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/SecuredField.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/SecuredField.js.map +1 -1
- package/dist/es/components/internal/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/es/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es/core/Errors/SRMessages.js +1 -1
- package/dist/es/core/Errors/SRMessages.js.map +1 -1
- package/dist/es/core/Errors/SRPanel.js.map +1 -1
- package/dist/es/core/Errors/SRPanelProvider.js.map +1 -1
- package/dist/es/core/Errors/constants.js +1 -1
- package/dist/es/core/Errors/constants.js.map +1 -1
- package/dist/es/core/Errors/useA11yReporter.js +1 -1
- package/dist/es/core/Errors/useA11yReporter.js.map +1 -1
- package/dist/es/core/Errors/useLoadingA11yReporter.js +2 -0
- package/dist/es/core/Errors/useLoadingA11yReporter.js.map +1 -0
- package/dist/es/core/Errors/utils.js +1 -1
- package/dist/es/core/Errors/utils.js.map +1 -1
- package/dist/es/core/config.js +1 -1
- package/dist/es/external/preact/compat/dist/compat.js +1 -1
- package/dist/es/external/preact/compat/dist/compat.js.map +1 -1
- package/dist/es/external/preact/dist/preact.js +1 -1
- package/dist/es/external/preact/dist/preact.js.map +1 -1
- package/dist/es/external/preact/hooks/dist/hooks.js +1 -1
- package/dist/es/external/preact/hooks/dist/hooks.js.map +1 -1
- package/dist/es/index.d.ts +26 -27
- package/dist/es/packages/server/translations/en-US.json.js +1 -1
- package/dist/es/utils/useForm/useForm.js +1 -1
- package/dist/es/utils/useForm/useForm.js.map +1 -1
- package/dist/es-legacy/components/Card/Card.js +1 -1
- package/dist/es-legacy/components/Card/Card.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/CardInput.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/CardInput.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CVC.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CVC.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CardFields.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CardFields.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/DualBrandSelector.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/DualBrandSelector.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFields.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFields.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/types.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/useSRPanelForCardInputErrors.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/useSRPanelForCardInputErrors.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/utils.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/utils.js.map +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCard.js +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
- package/dist/es-legacy/components/Dropin/Dropin.js +1 -1
- package/dist/es-legacy/components/Dropin/Dropin.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js.map +1 -1
- package/dist/es-legacy/components/internal/Address/Address.js +1 -1
- package/dist/es-legacy/components/internal/Address/Address.js.map +1 -1
- package/dist/es-legacy/components/internal/Address/validate.js.map +1 -1
- package/dist/es-legacy/components/internal/BaseElement/BaseElement.js +1 -1
- package/dist/es-legacy/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es-legacy/components/internal/Button/Button.js +1 -1
- package/dist/es-legacy/components/internal/Button/Button.js.map +1 -1
- package/dist/es-legacy/components/internal/Button/CopyButton.js +1 -1
- package/dist/es-legacy/components/internal/Button/CopyButton.js.map +1 -1
- package/dist/es-legacy/components/internal/Button/CopyIconButton.js +1 -1
- package/dist/es-legacy/components/internal/Button/CopyIconButton.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/ClickToPayComponent.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPSection.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/InputBase.js +1 -1
- package/dist/es-legacy/components/internal/FormFields/InputBase.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/Select.js +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/Select.js.map +1 -1
- package/dist/es-legacy/components/internal/LoadingWrapper/LoadingWrapper.js +1 -1
- package/dist/es-legacy/components/internal/LoadingWrapper/LoadingWrapper.js.map +1 -1
- package/dist/es-legacy/components/internal/Modal/Modal.js +1 -1
- package/dist/es-legacy/components/internal/Modal/Modal.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/QRLoader.js +1 -1
- package/dist/es-legacy/components/internal/QRLoader/QRLoader.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRFinalState.js +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRFinalState.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRLoaderPendingState.js +2 -0
- package/dist/es-legacy/components/internal/QRLoader/components/QRLoaderPendingState.js.map +1 -0
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/defaultProps.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/defaultProps.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/constants.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/constants.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.js.map +1 -1
- package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es-legacy/core/Errors/SRMessages.js +1 -1
- package/dist/es-legacy/core/Errors/SRMessages.js.map +1 -1
- package/dist/es-legacy/core/Errors/SRPanel.js.map +1 -1
- package/dist/es-legacy/core/Errors/SRPanelProvider.js.map +1 -1
- package/dist/es-legacy/core/Errors/constants.js +1 -1
- package/dist/es-legacy/core/Errors/constants.js.map +1 -1
- package/dist/es-legacy/core/Errors/useA11yReporter.js +1 -1
- package/dist/es-legacy/core/Errors/useA11yReporter.js.map +1 -1
- package/dist/es-legacy/core/Errors/useLoadingA11yReporter.js +2 -0
- package/dist/es-legacy/core/Errors/useLoadingA11yReporter.js.map +1 -0
- package/dist/es-legacy/core/Errors/utils.js +1 -1
- package/dist/es-legacy/core/Errors/utils.js.map +1 -1
- package/dist/es-legacy/core/config.js +1 -1
- package/dist/es-legacy/external/preact/compat/dist/compat.js +1 -1
- package/dist/es-legacy/external/preact/compat/dist/compat.js.map +1 -1
- package/dist/es-legacy/external/preact/dist/preact.js +1 -1
- package/dist/es-legacy/external/preact/dist/preact.js.map +1 -1
- package/dist/es-legacy/external/preact/hooks/dist/hooks.js +1 -1
- package/dist/es-legacy/external/preact/hooks/dist/hooks.js.map +1 -1
- package/dist/es-legacy/packages/server/translations/en-US.json.js +1 -1
- package/dist/es-legacy/utils/useForm/useForm.js +1 -1
- package/dist/es-legacy/utils/useForm/useForm.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={payButton:"Pay","payButton.redirecting":"Redirecting...","payButton.with":"Pay %{value} with %{maskedData}","payButton.saveDetails":"Save details",close:"Close",storeDetails:"Save for my next payment",readMore:"Read more","creditCard.holderName":"Name on card","creditCard.holderName.invalid":"Enter name as shown on card","creditCard.expiryDateField.month":"Month","creditCard.expiryDateField.year":"Year","creditCard.storeDetailsButton":"Remember for next time","creditCard.dualBrand.title":"Card Brand","creditCard.dualBrand.description":"You can select the card brand you prefer to pay with. This is optional.",installments:"Number of installments",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} months","installments.oneTime":"One time payment","installments.installments":"Installments payment","installments.revolving":"Revolving payment","installments.bonus":"Bonus payment","sepaDirectDebit.ibanField.invalid":"Invalid account number","sepa.ownerName":"Holder Name","sepa.ibanNumber":"Account Number (IBAN)","error.title":"Error","error.subtitle.redirect":"Redirect failed","error.subtitle.payment":"Payment failed","error.subtitle.refused":"Payment refused","error.message.unknown":"An unknown error occurred","errorPanel.title":"Existing errors","idealIssuer.selectField.title":"Bank","creditCard.success":"Payment Successful",loading:"Loading…",continue:"Continue",continueTo:"Continue to","wechatpay.timetopay":"You have %@ to pay","sr.wechatpay.timetopay":"You have %#minutes%# %#seconds%# to pay","wechatpay.scanqrcode":"Scan QR code",personalDetails:"Personal details",companyDetails:"Company details","companyDetails.name":"Company name","companyDetails.registrationNumber":"Registration number",socialSecurityNumber:"Social security number",firstName:"First name","firstName.invalid":"Enter your first name",infix:"Prefix",lastName:"Last name","lastName.invalid":"Enter your last name",mobileNumber:"Mobile number","mobileNumber.invalid":"Invalid mobile number",city:"City",postalCode:"Postal code","postalCode.optional":"Postal code (optional)",countryCode:"Country Code",telephoneNumber:"Telephone number",telephonePrefix:"Prefix",dateOfBirth:"Date of birth",shopperEmail:"Email address",gender:"Gender","gender.notselected":"Select your gender",male:"Male",female:"Female",billingAddress:"Billing address",street:"Street",stateOrProvince:"State or province",country:"Country/Region",houseNumberOrName:"House number",separateDeliveryAddress:"Specify a separate delivery address",deliveryAddress:"Delivery Address","deliveryAddress.firstName":"Recipient first name","deliveryAddress.lastName":"Recipient last name",zipCode:"Zip code",apartmentSuite:"Apartment / Suite",provinceOrTerritory:"Province or Territory",cityTown:"City / Town",address:"Address","address.search.contextualText":"Type to start searching your address","address.errors.incomplete":"Enter an address to continue","address.enterManually":"Enter address manually",state:"State",payAmountFormat:"Pay %@","field.title.optional":"(optional)","issuerList.selectField.contextualText":"Select your bank to continue","issuerList.selectField.label":"Bank selection",privacyPolicy:"Privacy policy","afterPay.agreement":"I agree with the %@ of Riverty","riverty.termsAndConditions":"I agree with the general %#Terms & Conditions%# for the Riverty Payment Method. The privacy policy of Riverty can be found %#here%#.",paymentConditions:"payment conditions",openApp:"Open the app","voucher.readInstructions":"Read instructions","voucher.introduction":"Thank you for your purchase, please use the following coupon to complete your payment.","voucher.expirationDate":"Expiration Date","voucher.alternativeReference":"Alternative Reference","voucher.paymentReferenceLabel":"Payment Reference","voucher.surcharge":"Incl. %@ surcharge","voucher.introduction.doku":"Thank you for your purchase, please use the following information to complete your payment.","voucher.shopperName":"Shopper Name","voucher.merchantName":"Merchant","voucher.introduction.econtext":"Thank you for your purchase, please use the following information to complete your payment.","voucher.telephoneNumber":"Phone Number","voucher.shopperReference":"Shopper Reference","voucher.collectionInstitutionNumber":"Collection Institution Number","voucher.econtext.telephoneNumber.invalid":"Telephone number must be 10 or 11 digits long","boletobancario.btnLabel":"Generate Boleto","boleto.sendCopyToEmail":"Send a copy to my email","button.copy":"Copy","button.copied":"Copied!","button.download":"Download","boleto.socialSecurityNumber":"CPF/CNPJ","boleto.socialSecurityNumber.invalid":"Enter a valid CPF/CNPJ number","creditCard.storedCard.description.ariaLabel":"Stored card ends in %@","voucher.entity":"Entity",donateButton:"Donate",donationTermsCondition:"By donating you agree to the %#terms and conditions%#",donationRoundUpDescription:"%{donationAmount} is a round up from your original payment (%{originalPaymentAmount})",notNowButton:"Not now",thanksForYourSupport:"Thanks for your support!","resultMessages.preauthorized":"Details saved",preauthorizeWith:"Preauthorize with",confirmPreauthorization:"Confirm preauthorization",confirmPurchase:"Confirm purchase",applyGiftcard:"Redeem",giftcardBalance:"Gift card balance",deductedBalance:"Deducted balance","creditCard.taxNumber":"Cardholder birthdate or Corporate registration number","creditCard.taxNumber.label":"Cardholder birthdate (YYMMDD) or Corporate registration number (10 digits)","creditCard.taxNumber.labelAlt":"Corporate registration number (10 digits)","creditCard.taxNumber.invalid":"Invalid Cardholder birthdate or Corporate registration number","storedPaymentMethod.disable.button":"Remove","storedPaymentMethod.disable.confirmation":"Remove stored payment method","storedPaymentMethod.disable.confirmButton":"Yes, remove","storedPaymentMethod.disable.cancelButton":"Cancel","ach.bankAccount":"Bank account","ach.bankAccount.title":"Bank account details","ach.bankAccount.label":"Account type","ach.bankAccount.placeholder":"Choose an account type","ach.bankAccount.nothing-selected-error":"Choose an account type","ach.bankAccount.option.personal-checking":"Personal Checking Account","ach.bankAccount.option.personal-savings":"Personal Savings Account","ach.bankAccount.option.business-checking":"Business Checking Account","ach.bankAccount.option.business-savings":"Business Savings Account","ach.bankAccountNumberVerification.label":"Verify account number","ach.bankAccountNumberVerification.error.not-match":"Account number does not match","ach.bankAccountNumberVerification.error.empty":"Enter the provided account number to verify the account number","ach.routingNumber.label":"Routing number","ach.accountHolderNameField.title":"Account holder name","ach.accountHolderNameField.contextualText":"Located on the front of your card","ach.accountHolderNameField.invalid":"Invalid account holder name","ach.accountNumberField.invalid":"Invalid account number","ach.accountLocationField.invalid":"Invalid ABA routing number","ach.savedBankAccount":"Saved bank account","ach.savings":"Savings account","ach.checking":"Checking account","select.state":"Select state","select.stateOrProvince":"Select state or province","select.provinceOrTerritory":"Select province or territory","select.country":"Select country/region","select.noOptionsFound":"No options found","select.results":"%{count} results available","telephoneNumber.invalid":"Invalid telephone number",qrCodeOrApp:"or","paypal.processingPayment":"Processing payment...",generateQRCode:"Generate QR code","await.waitForConfirmation":"Waiting for confirmation","mbway.confirmPayment":"Confirm your payment on the MB WAY app","shopperEmail.invalid":"Invalid email address","dateOfBirth.format":"DD/MM/YYYY","dateOfBirth.invalid":"Enter a valid date of birth that indicates you are at least 18 years old","blik.confirmPayment":"Open your banking app to confirm the payment.","blik.invalid":"Enter 6 numbers","blik.code":"6-digit code","blik.help":"Get the code from your banking app.","swish.pendingMessage":"After you scan, the status can be pending for up to 10 minutes. Attempting to pay again within this time may result in multiple charges.","field.valid":"Field valid","field.invalid":"Field not valid","field.error.required":"Enter the %{label}","field.error.invalid":"Enter a valid %{label}","field.error.invalidCharacters":"Some special characters are not allowed, enter a valid %{label}","error.giftcard.no-balance":"This gift card has zero balance","error.giftcard.card-error":"In our records we have no gift card with this number","error.giftcard.currency-error":"Gift cards are only valid in the currency they were issued in","err.gen.9100":"Incomplete field","err.gen.9101":"Field not valid","err.gen.9102":"Data parsing error","3ds.chal.805":"Challenge resolved without a %{result} object","cc.num.902":"Enter a valid card number","cc.num.900":"Enter the card number","cc.num.903":"Enter a supported card brand","cc.num.901":"Enter the complete card number","cc.dat.912":"Enter a valid expiry date","cc.dat.913":"Enter a valid expiry date","cc.dat.914":"Credit card about to expire","cc.dat.910":"Enter the expiry date","cc.dat.911":"Enter the complete expiry date","cc.mth.915":"Enter the expiry month","cc.yr.917":"Enter the expiry year","cc.yr.918":"Enter the complete expiry year","cc.cvc.920":"Enter the security code","cc.cvc.921":"Enter the complete security code","ach.num.945":"Enter the bank account number","ach.num.946":"Enter the complete bank account number","ach.loc.947":"Enter the bank routing number","ach.loc.948":"Enter the complete bank routing number","kcp.pwd.940":"Enter the password","kcp.pwd.941":"Enter the complete password","amazonpay.signout":"Sign out from Amazon","amazonpay.changePaymentDetails":"Change payment details","order.paymentMethod.description":"%{name} ending in %{lastFour}","partialPayment.warning":"Select another payment method to pay the remaining","partialPayment.remainingBalance":"Remaining balance will be %{amount}","bankTransfer.beneficiary":"Beneficiary name","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Reference","bankTransfer.accountNumber":"Account number","bankTransfer.sortCode":"Sort code","bankTransfer.routingNumber":"Routing number","bankTransfer.branchCode":"Branch code","bankTransfer.bankCode":"Bank code","bankTransfer.introduction":"Press ‘Continue’ to create a new bank transfer payment. You can use the details in the following screen to finalize this payment.","bankTransfer.instructions":"Thank you for your purchase, please use the following information to complete your payment.","bankTransfer.shopperEmail.contextualText":"A copy of the payment details will be sent to your email so you can complete the payment later.","bankTransfer.details.title":"Payment details","bankTransfer.instruction.title":"Payment process","bankTransfer.instruction.step1":"Open your banking app","bankTransfer.instruction.step2":"Start a new transfer","bankTransfer.instruction.step3":"Enter the account details provided below","bankTransfer.instruction.step4":"Review and confirm the payment","bacs.accountHolderName":"Bank account holder name","bacs.accountHolderName.invalid":"Invalid bank account holder name","bacs.accountNumber":"Bank account number","bacs.accountNumber.invalid":"Invalid bank account number","bacs.bankLocationId":"Sort code","bacs.bankLocationId.invalid":"Invalid sort code","bacs.consent.amount":"I agree that the above amount will be deducted from my bank account.","bacs.consent.account":"I confirm the account is in my name and I am the only signatory required to authorise the Direct Debit on this account.",edit:"Edit","bacs.confirm":"Confirm and pay","bacs.result.introduction":"Download your Direct Debit Instruction (DDI / Mandate)","download.pdf":"Download PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Card number","creditCard.encryptedExpiryDate.aria.iframeTitle":"Expiry date","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Expiry month","creditCard.encryptedExpiryYear.aria.iframeTitle":"Expiry year","creditCard.encryptedSecurityCode.aria.iframeTitle":"Security code","creditCard.encryptedPassword.aria.iframeTitle":"Password","giftcard.encryptedCardNumber.aria.iframeTitle":"Card number","giftcard.encryptedSecurityCode.aria.iframeTitle":"Pin",giftcardTransactionLimit:"Max. %{amount} allowed per transaction on this gift card","pix.instructions":"Use your banking app to scan the QR code or copy the PIX code below to complete your payment.","pix.code.label":"PIX code","pix.code.copy.label":"Copy PIX code","pix.code.copied.label":"PIX code copied","twint.saved":"saved",orPayWith:"or pay with","invalid.format.expects":"%{label} Invalid format. Expected format: %{format}","upi.qrCodeWaitingMessage":"Scan the QR code using your preferred UPI app to complete the payment","upi.vpaWaitingMessage":"Open your UPI app to confirm the payment","upi.modeSelection":"How would you like to use UPI?","upi.completePayment":"Complete your payment","upi.mode.enterUpiId":"UPI ID","upi.mode.qrCode":"QR code","upi.mode.payByAnyUpi":"UPI apps","upi.collect.dropdown.label":"Enter UPI ID","upi.collect.instruction":"Enter your UPI ID","upi.collect.field.label":"UPI ID","upi.collect.field.contextualText":"Enter the UPI ID connected to your account and press continue","upi.collect.field.invalid-id-error":"Enter a valid UPI","upi.error.noAppSelected":"Select your preferred UPI app to continue","upi.intent.instruction":"Select your preferred UPI app","upi.qrCode.instruction":"After generating the QR code you can use your preferred UPI app to complete the payment.","onlineBanking.termsAndConditions":"By continuing you agree with the %#terms and conditions%#","onlineBankingPL.termsAndConditions":"By continuing you agree with the %#regulations%# and %#information obligation%# of Przelewy24","ctp.loading.poweredByCtp":"Powered by Click to Pay","ctp.loading.intro":"We are checking to see if you have any saved cards with Click to Pay...","ctp.login.title":"Continue to Click to Pay","ctp.login.subtitle":"Enter the email address that is connected to Click to Pay to continue.","ctp.login.inputLabel":"Email","ctp.logout.notYou":"Not you?","ctp.logout.notYourCards":"Not your cards?","ctp.logout.notYourCard":"Not your card?","ctp.logout.notYourProfile":"Not your profile?","ctp.otp.fieldLabel":"One time code","ctp.otp.resendCode":"Resend code","ctp.otp.codeResent":"Code resent","ctp.otp.title":"Access your Click to Pay cards","ctp.otp.subtitle":"Enter the code %@ sent to %@ to verify it‘s you.","ctp.otp.saveCookiesCheckbox.label":"Skip verification next time","ctp.otp.saveCookiesCheckbox.information":"Select to be remembered on your device and browser at participating stores for faster checkout. Not recommended for shared devices.","ctp.otp.saveCookiesCheckbox.shorterInfo":"Select to be remembered on your device and browser","ctp.emptyProfile.message":"No cards registered in this Click to Pay profile","ctp.separatorText":"or use","ctp.cards.title":"Complete payment with Click to Pay","ctp.cards.subtitle":"Select a card to use.","ctp.cards.expiredCard":"Expired","ctp.manualCardEntry":"Manual card entry","ctp.aria.infoModalButton":"What is Click to Pay","ctp.infoPopup.title":"Click to Pay brings the ease of contactless, online","ctp.infoPopup.subtitle":"A fast, secure payment method supported by Mastercard, Visa and other payment cards.","ctp.infoPopup.benefit1":"Click to Pay uses encryption to keep your information safe and secure","ctp.infoPopup.benefit2":"Use it with merchants worldwide","ctp.infoPopup.benefit3":"Set up once for hassle-free payments in the future","ctp.errors.AUTH_INVALID":"Authentication Invalid","ctp.errors.NOT_FOUND":"No account found, enter a valid email or continue using manual card entry","ctp.errors.ID_FORMAT_UNSUPPORTED":"Format not supported","ctp.errors.FRAUD":"The user account was locked or disabled","ctp.errors.CONSUMER_ID_MISSING":"Consumer identity is missing in the request","ctp.errors.ACCT_INACCESSIBLE":"This account is currently not available, e.g it is locked","ctp.errors.CODE_INVALID":"Incorrect verification code","ctp.errors.CODE_EXPIRED":"This code has expired","ctp.errors.RETRIES_EXCEEDED":"The limit for the number of retries for OTP generation was exceeded","ctp.errors.OTP_SEND_FAILED":"The OTP could not be sent to the recipient","ctp.errors.REQUEST_TIMEOUT":"Something went wrong, try again or use the manual card entry","ctp.errors.UNKNOWN_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.SERVICE_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.SERVER_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.INVALID_PARAMETER":"Something went wrong, try again or use the manual card entry","ctp.errors.AUTH_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.INVALID_EMAIL":"Enter a valid email address (e.g. name@example.com)","paymentMethodsList.aria.label":"Choose a payment method","paymentMethodsList.storedPayments.label":"Saved payment methods","paymentMethodsList.otherPayments.label":"More payment options","paymentMethodsList.otherPayments.buttonLabel":"Show %{count} more","paymentMethodsList.promotedPayments.label":"Other","companyDetails.name.invalid":"Enter the company name","companyDetails.registrationNumber.invalid":"Enter the registration number","consent.checkbox.invalid":"You must agree with the terms & conditions","form.instruction":"All fields are required unless marked otherwise.","trustly.descriptor":"Instant Bank Payment","trustly.description1":"Pay directly from any of your bank accounts, backed by bank-level security","trustly.description2":"No cards, no app download, no registration","ancv.input.label":"Your ANCV identification","ancv.confirmPayment":"Use your ANCV application to confirm the payment.","ancv.form.instruction":"The Cheque-Vacances application is necessary to validate this payment.","ancv.beneficiaryId.invalid":"Enter a valid email address or ANCV ID","creditCard.cardNumber.label":"Card number","creditCard.expiryDate.label":"Expiry date","creditCard.expiryDate.contextualText":"Front of card in MM/YY format","creditCard.securityCode.label":"Security code","creditCard.securityCode.label.optional":"Security code (optional)","creditCard.securityCode.contextualText.3digits":"3 digits on back of card","creditCard.securityCode.contextualText.4digits":"4 digits on front of card","creditCard.expiryMonth.label":"Expiry month","creditCard.expiryYear.label":"Expiry year","creditCard.pin.label":"Pin","creditCard.password.label":"First 2 digits of card password","giftcard.cardNumber.label":"Card Number","giftcard.expiryDate.label":"Expiry date","giftcard.securityCode.label":"Pin","ach.bankAccountNumber.label":"Account number","ach.bankLocationId.label":"ABA routing number","dragonpayVoucher.selectField.contextualText.nonBank":"Select your provider","dragonpayVoucher.selectField.contextualText.bank":"Select your bank","payme.openPayMeApp":"Complete your payment in the PayMe app by authorizing the payment in the app and wait for the confirmation.","payme.redirectButtonLabel":"Open PayMe app","payme.scanQrCode":"Complete your payment by QR code","payme.timeToPay":"This QR code is valid for %@","payme.instructions.steps":"Open the PayMe app.%@Scan the QR code to authorize the payment.%@Complete the payment in the app and wait for confirmation.","payme.instructions.footnote":"Please do not close this page before the payment is completed","payByBankAISDD.disclaimer.header":"Use Pay by Bank to pay instantly from any bank account.","payByBankAISDD.disclaimer.body":"By connecting your bank account you are authorizing debits to your account for any amount owed for use of our services and/or purchase of our products, until this authorization is revoked.","paymentMethodBrand.other":"other","paynow.scanQrCode":"Scan the QR code using the PayNow app to complete the payment","paynow.mobileViewInstruction.step1":"Take a screenshot of the QR code.","paynow.mobileViewInstruction.step2":"Open the PayNow bank or payment app.","paynow.mobileViewInstruction.step3":"Select the option to scan a QR code.","paynow.mobileViewInstruction.step4":"Choose the option to upload a QR and select the screenshot.","paynow.mobileViewInstruction.step5":"Complete the transaction.","payto.payid.description":"Enter the PayID and account details that are connected to your PayTo account.","payto.payid.label.identifier":"Identifier","payto.payid.label.orgid":"Organization ID","payto.payid.option.phone":"Mobile","payto.payid.option.email":"Email","payto.payid.option.orgid":"Organization ID","payto.bsb.description":"Enter the bank account number and the Bank State Branch that is connected to your account to continue","payto.bsb.label.bankAccountNumber":"Bank account number","payto.instructions.steps":"Log into your PayTo banking app@Authorize the PayTo agreement@Approve the payment terms@Complete the transaction","payto.confirmPayment":"Thank you for your purchase, complete your payment by following the instructions below.","payto.mandate.amount.label":"Amount","payto.mandate.frequency.label":"Frequency","payto.mandate.remarks.label":"Description","payto.mandate.startsAt.label":"First payment date","payto.mandate.endsAt.label":"End date","payto.mandate.payee.label":"Payee","payto.mandate.amount.max":"Up to %{amount} per transaction","payto.mandate.frequency.adhoc-no-count":"Ad Hoc","payto.mandate.frequency.adhoc":"%{count} time(s)","payto.mandate.frequency.daily":"%{count} payment(s) Daily","payto.mandate.frequency.weekly":"%{count} payment(s) Weekly","payto.mandate.frequency.biWeekly":"%{count} payment(s) Fortnightly","payto.mandate.frequency.monthly":"%{count} payment(s) Monthly","payto.mandate.frequency.quarterly":"%{count} payment(s) Quarterly","payto.mandate.frequency.halfYearly":"%{count} payment(s) Bi-Annual","payto.mandate.frequency.yearly":"%{count} payment(s) Yearly","payto.label.firstName":"Account holder first name","payto.label.lastName":"Account holder last name","payto.await.waitForConfirmation":"Awaiting your approval","payto.errors.accountHolderFirstName.invalid":"Enter your account holder first name","payto.errors.accountHolderLastName.invalid":"Enter your account holder last name","payto.bsb.option.label":"BSB and account number","card.fastlane.a11y.logo":"Fastlane by Paypal logo","card.fastlane.a11y.openDialog":"Read more about Fastlane","card.fastlane.a11y.closeDialog":"Close dialog","card.fastlane.mobileInputLabel":"Mobile number","card.fastlane.consentToggle":"Save your info with Fastlane for faster checkouts and more","card.fastlane.consentText":"By saving your info, you agree to get codes by text to use Fastlane everywhere it's available. Fastlane will text the number provided. You also agree to this %#terms%# and %#privacy statement%#.","card.fastlane.modal.benefit1.header":"Autofill your checkouts","card.fastlane.modal.benefit1.text":"Get one-time codes to use card and addresses you’ve saved.","card.fastlane.modal.benefit2.header":"Protect your info","card.fastlane.modal.benefit2.text":"Your payment info is encrypted when it’s stored and sent to places you shop.","card.fastlane.modal.benefit3.header":"Use across stores","card.fastlane.modal.benefit3.text":"Speed through checkout everywhere Fastlane is available.","paybybankpix.redirectBtn.label":"Continue to PIX through OpenBanking","paybybankpix.issuerList.disclaimer":"By continuing, you agree to the %#Consent Notice%# and will be redirected to your bank.","paybybankpix.issuerList.selectField.label":"Bank","paybybankpix.issuerList.introduction.logo.content":"Connect your favorite PIX keys to pay through Open Finance","paybybankpix.await.waitForConfirmation":"Waiting for your confirmation...","paybybankpix.await.timeToPay":"This process will take approximately %{numberOfMin} minute(s)","paybybankpix.await.withOpenFinance":"With the ease of Open Finance","paybybankpix.await.logoAlt.openFinance":"Open Finance","paybybankpix.storedPayment.payButton.label":"Continue payment","paybybankpix.storedPayment.additionalLabel":"%{receiver} account through PIX","paybybankpix.await.fetchDetails":"Fetching details...","eftpad-canada.input.accountHolderName.label":"Account holder name","eftpad-canada.input.accountHolderName.error":"Enter an account holder name","eftpad-canada.input.accountNumber.label":"Account number","eftpad-canada.input.accountNumber.contextualText":"Between 7 and 12 digits","eftpad-canada.input.accountNumber.error":"Enter an account number that is between 7 and 12 digits","eftpad-canada.input.institutionNumber.label":"Institution number","eftpad-canada.input.institutionNumber.contextualText":"3 digits","eftpad-canada.input.institutionNumber.error":"Enter an institution number that consists of 3 digits","eftpad-canada.input.transitNumber.label":"Transit number","eftpad-canada.input.transitNumber.contextualText":"5 digits","eftpad-canada.input.transitNumber.error":"Enter a transit number that consists of 5 digits","eftpad-canada.settlement-info":"The funds will be withdrawn from your bank account within 1–3 business days.","upi.mandate.intro":"You’re setting up a UPI Autopay recurring payment","upi.mandate.max.extraText":"You’ll approve a higher limit to allow future plan changes","upi.mandate.upTo":"up to %{amount}","upi.mandate.frequency.monthly":"/month","upi.mandate.frequency.weekly":"/week","upi.mandate.frequency.adhoc":" as presented",bankList:"Bank list",qrCode:"QR code","iris.instructions.generateQrCode":"After generating the QR code you can use your preferred banking app to complete the payment.","iris.instructions.payment.step1":"Open your preferred banking app.","iris.instructions.payment.step2":"Scan the QR code with your banking app.","iris.instructions.payment.step3":"Complete the payment in the app and wait for the confirmation here.","econtext.customerNumber":"Customer number","econtext.confirmationNumber":"Confirmation number","econtext.useBefore":"Use before","econtext.paymentInformation":"Payment information","issuerList.separatorText":"or choose from list","upi.intent.apps.title":"Options","upi.intent.apps.dropdown.label":"UPI apps","upi.intent.apps.dropdown.placeholder":"Choose preferred app","emi.subtitle":"Installment plans on credit cards","emi.title":"EMI plan","emi.instructions":"Choose your preferred combination from the options listed below and continue to enter your card details","emi.provider":"Provider","emi.plan":"Plan","emi.planSummary":"Plan summary","emi.itemPrice":"Item price","emi.amountReservedOnCard":"Amount reserved on card","emi.interestChargedByBank":"Interest charged by bank @%{interest}","emi.totalAmountOverTime":"Total amount to be paid over time","emi.upcomingMonthlyPayment":"Upcoming monthly payment","emi.discount":"Discount","emi.discountApplied":"%{amount} discount offer applied for using %{provider}","emi.noCost":"No cost","emi.lowCost":"Low cost","emi.discountAvailable":"discount available","emi.perAnnum":"p.a","emi.cardDetailsInstructions":"Enter card details that are associated with a %{provider} card","emi.cardDetails":"Card details"};export{e as default};
|
|
1
|
+
var e={payButton:"Pay","payButton.redirecting":"Redirecting...","payButton.with":"Pay %{value} with %{maskedData}","payButton.saveDetails":"Save details",close:"Close",storeDetails:"Save for my next payment",readMore:"Read more","creditCard.holderName":"Name on card","creditCard.holderName.invalid":"Enter name as shown on card","creditCard.expiryDateField.month":"Month","creditCard.expiryDateField.year":"Year","creditCard.storeDetailsButton":"Remember for next time","creditCard.dualBrand.title":"Card Brand","creditCard.dualBrand.description":"You can select the card brand you prefer to pay with. This is optional.",installments:"Number of installments",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} months","installments.oneTime":"One time payment","installments.installments":"Installments payment","installments.revolving":"Revolving payment","installments.bonus":"Bonus payment","sepaDirectDebit.ibanField.invalid":"Invalid account number","sepa.ownerName":"Holder Name","sepa.ibanNumber":"Account Number (IBAN)","error.title":"Error","error.subtitle.redirect":"Redirect failed","error.subtitle.payment":"Payment failed","error.subtitle.refused":"Payment refused","error.message.unknown":"An unknown error occurred","errorPanel.title":"Existing errors","idealIssuer.selectField.title":"Bank","creditCard.success":"Payment Successful",loading:"Loading…",loaded:"Loaded",continue:"Continue",continueTo:"Continue to","wechatpay.timetopay":"You have %@ to pay","sr.wechatpay.timetopay":"You have %#minutes%# %#seconds%# to pay","wechatpay.scanqrcode":"Scan QR code",personalDetails:"Personal details",companyDetails:"Company details","companyDetails.name":"Company name","companyDetails.registrationNumber":"Registration number",socialSecurityNumber:"Social security number",firstName:"First name","firstName.invalid":"Enter your first name",infix:"Prefix",lastName:"Last name","lastName.invalid":"Enter your last name",mobileNumber:"Mobile number","mobileNumber.invalid":"Invalid mobile number",city:"City",postalCode:"Postal code","postalCode.optional":"Postal code (optional)",countryCode:"Country Code",telephoneNumber:"Telephone number",telephonePrefix:"Prefix",dateOfBirth:"Date of birth",shopperEmail:"Email address",gender:"Gender","gender.notselected":"Select your gender",male:"Male",female:"Female",billingAddress:"Billing address",street:"Street",stateOrProvince:"State or province",country:"Country/Region",houseNumberOrName:"House number",separateDeliveryAddress:"Specify a separate delivery address",deliveryAddress:"Delivery Address","deliveryAddress.firstName":"Recipient first name","deliveryAddress.lastName":"Recipient last name",zipCode:"Zip code",apartmentSuite:"Apartment / Suite",provinceOrTerritory:"Province or Territory",cityTown:"City / Town",address:"Address","address.search.contextualText":"Type to start searching your address","address.errors.incomplete":"Enter an address to continue","address.enterManually":"Enter address manually",state:"State",payAmountFormat:"Pay %@","field.title.optional":"(optional)","issuerList.selectField.contextualText":"Select your bank to continue","issuerList.selectField.label":"Bank selection",privacyPolicy:"Privacy policy","afterPay.agreement":"I agree with the %@ of Riverty","riverty.termsAndConditions":"I agree with the general %#Terms & Conditions%# for the Riverty Payment Method. The privacy policy of Riverty can be found %#here%#.",paymentConditions:"payment conditions",openApp:"Open the app","voucher.readInstructions":"Read instructions","voucher.introduction":"Thank you for your purchase, please use the following coupon to complete your payment.","voucher.expirationDate":"Expiration Date","voucher.alternativeReference":"Alternative Reference","voucher.paymentReferenceLabel":"Payment Reference","voucher.surcharge":"Incl. %@ surcharge","voucher.introduction.doku":"Thank you for your purchase, please use the following information to complete your payment.","voucher.shopperName":"Shopper Name","voucher.merchantName":"Merchant","voucher.introduction.econtext":"Thank you for your purchase, please use the following information to complete your payment.","voucher.telephoneNumber":"Phone Number","voucher.shopperReference":"Shopper Reference","voucher.collectionInstitutionNumber":"Collection Institution Number","voucher.econtext.telephoneNumber.invalid":"Telephone number must be 10 or 11 digits long","boletobancario.btnLabel":"Generate Boleto","boleto.sendCopyToEmail":"Send a copy to my email","button.copy":"Copy","button.copied":"Copied!","button.download":"Download","boleto.socialSecurityNumber":"CPF/CNPJ","boleto.socialSecurityNumber.invalid":"Enter a valid CPF/CNPJ number","creditCard.storedCard.description.ariaLabel":"Stored card ends in %@","voucher.entity":"Entity",donateButton:"Donate",donationTermsCondition:"By donating you agree to the %#terms and conditions%#",donationRoundUpDescription:"%{donationAmount} is a round up from your original payment (%{originalPaymentAmount})",notNowButton:"Not now",thanksForYourSupport:"Thanks for your support!","resultMessages.preauthorized":"Details saved",preauthorizeWith:"Preauthorize with",confirmPreauthorization:"Confirm preauthorization",confirmPurchase:"Confirm purchase",applyGiftcard:"Redeem",giftcardBalance:"Gift card balance",deductedBalance:"Deducted balance","creditCard.taxNumber":"Cardholder birthdate or Corporate registration number","creditCard.taxNumber.label":"Cardholder birthdate (YYMMDD) or Corporate registration number (10 digits)","creditCard.taxNumber.labelAlt":"Corporate registration number (10 digits)","creditCard.taxNumber.invalid":"Invalid Cardholder birthdate or Corporate registration number","storedPaymentMethod.disable.button":"Remove","storedPaymentMethod.disable.confirmation":"Remove stored payment method","storedPaymentMethod.disable.confirmButton":"Yes, remove","storedPaymentMethod.disable.cancelButton":"Cancel","ach.bankAccount":"Bank account","ach.bankAccount.title":"Bank account details","ach.bankAccount.label":"Account type","ach.bankAccount.placeholder":"Choose an account type","ach.bankAccount.nothing-selected-error":"Choose an account type","ach.bankAccount.option.personal-checking":"Personal Checking Account","ach.bankAccount.option.personal-savings":"Personal Savings Account","ach.bankAccount.option.business-checking":"Business Checking Account","ach.bankAccount.option.business-savings":"Business Savings Account","ach.bankAccountNumberVerification.label":"Verify account number","ach.bankAccountNumberVerification.error.not-match":"Account number does not match","ach.bankAccountNumberVerification.error.empty":"Enter the provided account number to verify the account number","ach.routingNumber.label":"Routing number","ach.accountHolderNameField.title":"Account holder name","ach.accountHolderNameField.contextualText":"Located on the front of your card","ach.accountHolderNameField.invalid":"Invalid account holder name","ach.accountNumberField.invalid":"Invalid account number","ach.accountLocationField.invalid":"Invalid ABA routing number","ach.savedBankAccount":"Saved bank account","ach.savings":"Savings account","ach.checking":"Checking account","select.state":"Select state","select.stateOrProvince":"Select state or province","select.provinceOrTerritory":"Select province or territory","select.country":"Select country/region","select.noOptionsFound":"No options found","select.results":"%{count} results available","telephoneNumber.invalid":"Invalid telephone number",qrCodeOrApp:"or","paypal.processingPayment":"Processing payment...",generateQRCode:"Generate QR code","await.waitForConfirmation":"Waiting for confirmation","mbway.confirmPayment":"Confirm your payment on the MB WAY app","shopperEmail.invalid":"Invalid email address","dateOfBirth.format":"DD/MM/YYYY","dateOfBirth.invalid":"Enter a valid date of birth that indicates you are at least 18 years old","blik.confirmPayment":"Open your banking app to confirm the payment.","blik.invalid":"Enter 6 numbers","blik.code":"6-digit code","blik.help":"Get the code from your banking app.","swish.pendingMessage":"After you scan, the status can be pending for up to 10 minutes. Attempting to pay again within this time may result in multiple charges.","field.valid":"Field valid","field.invalid":"Field not valid","field.error.required":"Enter the %{label}","field.error.invalid":"Enter a valid %{label}","field.error.invalidCharacters":"Some special characters are not allowed, enter a valid %{label}","error.giftcard.no-balance":"This gift card has zero balance","error.giftcard.card-error":"In our records we have no gift card with this number","error.giftcard.currency-error":"Gift cards are only valid in the currency they were issued in","err.gen.9100":"Incomplete field","err.gen.9101":"Field not valid","err.gen.9102":"Data parsing error","3ds.chal.805":"Challenge resolved without a %{result} object","cc.num.902":"Enter a valid card number","cc.num.900":"Enter the card number","cc.num.903":"Enter a supported card brand","cc.num.901":"Enter the complete card number","cc.num.904":"This card type is not supported","cc.dat.912":"Enter a valid expiry date. Front of card in MM/YY format.","cc.dat.913":"Enter a valid expiry date. Front of card in MM/YY format.","cc.dat.914":"Credit card about to expire","cc.dat.910":"Enter the expiry date. Front of card in MM/YY format.","cc.dat.911":"Enter the complete expiry date. Front of card in MM/YY format.","cc.mth.915":"Enter the expiry month","cc.yr.917":"Enter the expiry year","cc.yr.918":"Enter the complete expiry year","cc.cvc.920":"Enter the security code. 3 digits on back of card.","cc.cvc.921":"Enter the complete security code. 3 digits on back of card.","cc.cvc.920.amex":"Enter the security code. 4 digits on front of card.","cc.cvc.921.amex":"Enter the complete security code. 4 digits on front of card.","ach.num.945":"Enter the bank account number","ach.num.946":"Enter the complete bank account number","ach.loc.947":"Enter the bank routing number","ach.loc.948":"Enter the complete bank routing number","kcp.pwd.940":"Enter the password","kcp.pwd.941":"Enter the complete password","amazonpay.signout":"Sign out from Amazon","amazonpay.changePaymentDetails":"Change payment details","order.paymentMethod.description":"%{name} ending in %{lastFour}","partialPayment.warning":"Select another payment method to pay the remaining","partialPayment.remainingBalance":"Remaining balance will be %{amount}","bankTransfer.beneficiary":"Beneficiary name","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Reference","bankTransfer.accountNumber":"Account number","bankTransfer.sortCode":"Sort code","bankTransfer.routingNumber":"Routing number","bankTransfer.branchCode":"Branch code","bankTransfer.bankCode":"Bank code","bankTransfer.introduction":"Press ‘Continue’ to create a new bank transfer payment. You can use the details in the following screen to finalize this payment.","bankTransfer.instructions":"Thank you for your purchase, please use the following information to complete your payment.","bankTransfer.shopperEmail.contextualText":"A copy of the payment details will be sent to your email so you can complete the payment later.","bankTransfer.details.title":"Payment details","bankTransfer.instruction.title":"Payment process","bankTransfer.instruction.step1":"Open your banking app","bankTransfer.instruction.step2":"Start a new transfer","bankTransfer.instruction.step3":"Enter the account details provided below","bankTransfer.instruction.step4":"Review and confirm the payment","bacs.accountHolderName":"Bank account holder name","bacs.accountHolderName.invalid":"Invalid bank account holder name","bacs.accountNumber":"Bank account number","bacs.accountNumber.invalid":"Invalid bank account number","bacs.bankLocationId":"Sort code","bacs.bankLocationId.invalid":"Invalid sort code","bacs.consent.amount":"I agree that the above amount will be deducted from my bank account.","bacs.consent.account":"I confirm the account is in my name and I am the only signatory required to authorise the Direct Debit on this account.",edit:"Edit","bacs.confirm":"Confirm and pay","bacs.result.introduction":"Download your Direct Debit Instruction (DDI / Mandate)","download.pdf":"Download PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Card number","creditCard.encryptedExpiryDate.aria.iframeTitle":"Expiry date","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Expiry month","creditCard.encryptedExpiryYear.aria.iframeTitle":"Expiry year","creditCard.encryptedSecurityCode.aria.iframeTitle":"Security code","creditCard.encryptedPassword.aria.iframeTitle":"Password","giftcard.encryptedCardNumber.aria.iframeTitle":"Card number","giftcard.encryptedSecurityCode.aria.iframeTitle":"Pin",giftcardTransactionLimit:"Max. %{amount} allowed per transaction on this gift card","pix.instructions":"Use your banking app to scan the QR code or copy the PIX code below to complete your payment.","pix.code.label":"PIX code","pix.code.copy.label":"Copy PIX code","pix.code.copied.label":"PIX code copied","twint.saved":"saved",orPayWith:"or pay with","invalid.format.expects":"%{label} Invalid format. Expected format: %{format}","upi.qrCodeWaitingMessage":"Scan the QR code using your preferred UPI app to complete the payment","upi.vpaWaitingMessage":"Open your UPI app to confirm the payment","upi.modeSelection":"How would you like to use UPI?","upi.completePayment":"Complete your payment","upi.mode.enterUpiId":"UPI ID","upi.mode.qrCode":"QR code","upi.mode.payByAnyUpi":"UPI apps","upi.collect.dropdown.label":"Enter UPI ID","upi.collect.instruction":"Enter your UPI ID","upi.collect.field.label":"UPI ID","upi.collect.field.contextualText":"Enter the UPI ID connected to your account and press continue","upi.collect.field.invalid-id-error":"Enter a valid UPI","upi.error.noAppSelected":"Select your preferred UPI app to continue","upi.intent.instruction":"Select your preferred UPI app","upi.qrCode.instruction":"After generating the QR code you can use your preferred UPI app to complete the payment.","onlineBanking.termsAndConditions":"By continuing you agree with the %#terms and conditions%#","onlineBankingPL.termsAndConditions":"By continuing you agree with the %#regulations%# and %#information obligation%# of Przelewy24","ctp.loading.poweredByCtp":"Powered by Click to Pay","ctp.loading.intro":"We are checking to see if you have any saved cards with Click to Pay...","ctp.login.title":"Continue to Click to Pay","ctp.login.subtitle":"Enter the email address that is connected to Click to Pay to continue.","ctp.login.inputLabel":"Email","ctp.logout.notYou":"Not you?","ctp.logout.notYourCards":"Not your cards?","ctp.logout.notYourCard":"Not your card?","ctp.logout.notYourProfile":"Not your profile?","ctp.otp.fieldLabel":"One time code","ctp.otp.resendCode":"Resend code","ctp.otp.codeResent":"Code resent","ctp.otp.title":"Access your Click to Pay cards","ctp.otp.subtitle":"Enter the code %@ sent to %@ to verify it‘s you.","ctp.otp.saveCookiesCheckbox.label":"Skip verification next time","ctp.otp.saveCookiesCheckbox.information":"Select to be remembered on your device and browser at participating stores for faster checkout. Not recommended for shared devices.","ctp.otp.saveCookiesCheckbox.shorterInfo":"Select to be remembered on your device and browser","ctp.emptyProfile.message":"No cards registered in this Click to Pay profile","ctp.separatorText":"or use","ctp.cards.title":"Complete payment with Click to Pay","ctp.cards.subtitle":"Select a card to use.","ctp.cards.expiredCard":"Expired","ctp.manualCardEntry":"Manual card entry","ctp.aria.infoModalButton":"What is Click to Pay","ctp.infoPopup.title":"Click to Pay brings the ease of contactless, online","ctp.infoPopup.subtitle":"A fast, secure payment method supported by Mastercard, Visa and other payment cards.","ctp.infoPopup.benefit1":"Click to Pay uses encryption to keep your information safe and secure","ctp.infoPopup.benefit2":"Use it with merchants worldwide","ctp.infoPopup.benefit3":"Set up once for hassle-free payments in the future","ctp.errors.AUTH_INVALID":"Authentication Invalid","ctp.errors.NOT_FOUND":"No account found, enter a valid email or continue using manual card entry","ctp.errors.ID_FORMAT_UNSUPPORTED":"Format not supported","ctp.errors.FRAUD":"The user account was locked or disabled","ctp.errors.CONSUMER_ID_MISSING":"Consumer identity is missing in the request","ctp.errors.ACCT_INACCESSIBLE":"This account is currently not available, e.g it is locked","ctp.errors.CODE_INVALID":"Incorrect verification code","ctp.errors.CODE_EXPIRED":"This code has expired","ctp.errors.RETRIES_EXCEEDED":"The limit for the number of retries for OTP generation was exceeded","ctp.errors.OTP_SEND_FAILED":"The OTP could not be sent to the recipient","ctp.errors.REQUEST_TIMEOUT":"Something went wrong, try again or use the manual card entry","ctp.errors.UNKNOWN_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.SERVICE_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.SERVER_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.INVALID_PARAMETER":"Something went wrong, try again or use the manual card entry","ctp.errors.AUTH_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.INVALID_EMAIL":"Enter a valid email address (e.g. name@example.com)","paymentMethodsList.aria.label":"Choose a payment method","paymentMethodsList.storedPayments.label":"Saved payment methods","paymentMethodsList.otherPayments.label":"More payment options","paymentMethodsList.otherPayments.buttonLabel":"Show %{count} more","paymentMethodsList.promotedPayments.label":"Other","companyDetails.name.invalid":"Enter the company name","companyDetails.registrationNumber.invalid":"Enter the registration number","consent.checkbox.invalid":"You must agree with the terms & conditions","form.instruction":"All fields are required unless marked otherwise.","trustly.descriptor":"Instant Bank Payment","trustly.description1":"Pay directly from any of your bank accounts, backed by bank-level security","trustly.description2":"No cards, no app download, no registration","ancv.input.label":"Your ANCV identification","ancv.confirmPayment":"Use your ANCV application to confirm the payment.","ancv.form.instruction":"The Cheque-Vacances application is necessary to validate this payment.","ancv.beneficiaryId.invalid":"Enter a valid email address or ANCV ID","creditCard.cardNumber.label":"Card number","creditCard.expiryDate.label":"Expiry date","creditCard.expiryDate.contextualText":"Front of card in MM/YY format","creditCard.securityCode.label":"Security code","creditCard.securityCode.label.optional":"Security code (optional)","creditCard.securityCode.contextualText.3digits":"3 digits on back of card","creditCard.securityCode.contextualText.4digits":"4 digits on front of card","creditCard.expiryMonth.label":"Expiry month","creditCard.expiryYear.label":"Expiry year","creditCard.pin.label":"Pin","creditCard.password.label":"First 2 digits of card password","giftcard.cardNumber.label":"Card Number","giftcard.expiryDate.label":"Expiry date","giftcard.securityCode.label":"Pin","ach.bankAccountNumber.label":"Account number","ach.bankLocationId.label":"ABA routing number","dragonpayVoucher.selectField.contextualText.nonBank":"Select your provider","dragonpayVoucher.selectField.contextualText.bank":"Select your bank","payme.openPayMeApp":"Complete your payment in the PayMe app by authorizing the payment in the app and wait for the confirmation.","payme.redirectButtonLabel":"Open PayMe app","payme.scanQrCode":"Complete your payment by QR code","payme.timeToPay":"This QR code is valid for %@","payme.instructions.steps":"Open the PayMe app.%@Scan the QR code to authorize the payment.%@Complete the payment in the app and wait for confirmation.","payme.instructions.footnote":"Please do not close this page before the payment is completed","payByBankAISDD.disclaimer.header":"Use Pay by Bank to pay instantly from any bank account.","payByBankAISDD.disclaimer.body":"By connecting your bank account you are authorizing debits to your account for any amount owed for use of our services and/or purchase of our products, until this authorization is revoked.","paymentMethodBrand.other":"other","paynow.scanQrCode":"Scan the QR code using the PayNow app to complete the payment","paynow.mobileViewInstruction.step1":"Take a screenshot of the QR code.","paynow.mobileViewInstruction.step2":"Open the PayNow bank or payment app.","paynow.mobileViewInstruction.step3":"Select the option to scan a QR code.","paynow.mobileViewInstruction.step4":"Choose the option to upload a QR and select the screenshot.","paynow.mobileViewInstruction.step5":"Complete the transaction.","payto.payid.description":"Enter the PayID and account details that are connected to your PayTo account.","payto.payid.label.identifier":"Identifier","payto.payid.label.orgid":"Organization ID","payto.payid.option.phone":"Mobile","payto.payid.option.email":"Email","payto.payid.option.orgid":"Organization ID","payto.bsb.description":"Enter the bank account number and the Bank State Branch that is connected to your account to continue","payto.bsb.label.bankAccountNumber":"Bank account number","payto.instructions.steps":"Log into your PayTo banking app@Authorize the PayTo agreement@Approve the payment terms@Complete the transaction","payto.confirmPayment":"Thank you for your purchase, complete your payment by following the instructions below.","payto.mandate.amount.label":"Amount","payto.mandate.frequency.label":"Frequency","payto.mandate.remarks.label":"Description","payto.mandate.startsAt.label":"First payment date","payto.mandate.endsAt.label":"End date","payto.mandate.payee.label":"Payee","payto.mandate.amount.max":"Up to %{amount} per transaction","payto.mandate.frequency.adhoc-no-count":"Ad Hoc","payto.mandate.frequency.adhoc":"%{count} time(s)","payto.mandate.frequency.daily":"%{count} payment(s) Daily","payto.mandate.frequency.weekly":"%{count} payment(s) Weekly","payto.mandate.frequency.biWeekly":"%{count} payment(s) Fortnightly","payto.mandate.frequency.monthly":"%{count} payment(s) Monthly","payto.mandate.frequency.quarterly":"%{count} payment(s) Quarterly","payto.mandate.frequency.halfYearly":"%{count} payment(s) Bi-Annual","payto.mandate.frequency.yearly":"%{count} payment(s) Yearly","payto.label.firstName":"Account holder first name","payto.label.lastName":"Account holder last name","payto.await.waitForConfirmation":"Awaiting your approval","payto.errors.accountHolderFirstName.invalid":"Enter your account holder first name","payto.errors.accountHolderLastName.invalid":"Enter your account holder last name","payto.bsb.option.label":"BSB and account number","card.fastlane.a11y.logo":"Fastlane by Paypal logo","card.fastlane.a11y.openDialog":"Read more about Fastlane","card.fastlane.a11y.closeDialog":"Close dialog","card.fastlane.mobileInputLabel":"Mobile number","card.fastlane.consentToggle":"Save your info with Fastlane for faster checkouts and more","card.fastlane.consentText":"By saving your info, you agree to get codes by text to use Fastlane everywhere it's available. Fastlane will text the number provided. You also agree to this %#terms%# and %#privacy statement%#.","card.fastlane.modal.benefit1.header":"Autofill your checkouts","card.fastlane.modal.benefit1.text":"Get one-time codes to use card and addresses you’ve saved.","card.fastlane.modal.benefit2.header":"Protect your info","card.fastlane.modal.benefit2.text":"Your payment info is encrypted when it’s stored and sent to places you shop.","card.fastlane.modal.benefit3.header":"Use across stores","card.fastlane.modal.benefit3.text":"Speed through checkout everywhere Fastlane is available.","paybybankpix.redirectBtn.label":"Continue to PIX through OpenBanking","paybybankpix.issuerList.disclaimer":"By continuing, you agree to the %#Consent Notice%# and will be redirected to your bank.","paybybankpix.issuerList.selectField.label":"Bank","paybybankpix.issuerList.introduction.logo.content":"Connect your favorite PIX keys to pay through Open Finance","paybybankpix.await.waitForConfirmation":"Waiting for your confirmation...","paybybankpix.await.timeToPay":"This process will take approximately %{numberOfMin} minute(s)","paybybankpix.await.withOpenFinance":"With the ease of Open Finance","paybybankpix.await.logoAlt.openFinance":"Open Finance","paybybankpix.storedPayment.payButton.label":"Continue payment","paybybankpix.storedPayment.additionalLabel":"%{receiver} account through PIX","paybybankpix.await.fetchDetails":"Fetching details...","eftpad-canada.input.accountHolderName.label":"Account holder name","eftpad-canada.input.accountHolderName.error":"Enter an account holder name","eftpad-canada.input.accountNumber.label":"Account number","eftpad-canada.input.accountNumber.contextualText":"Between 7 and 12 digits","eftpad-canada.input.accountNumber.error":"Enter an account number that is between 7 and 12 digits","eftpad-canada.input.institutionNumber.label":"Institution number","eftpad-canada.input.institutionNumber.contextualText":"3 digits","eftpad-canada.input.institutionNumber.error":"Enter an institution number that consists of 3 digits","eftpad-canada.input.transitNumber.label":"Transit number","eftpad-canada.input.transitNumber.contextualText":"5 digits","eftpad-canada.input.transitNumber.error":"Enter a transit number that consists of 5 digits","eftpad-canada.settlement-info":"The funds will be withdrawn from your bank account within 1–3 business days.","upi.mandate.intro":"You’re setting up a UPI Autopay recurring payment","upi.mandate.max.extraText":"You’ll approve a higher limit to allow future plan changes","upi.mandate.upTo":"up to %{amount}","upi.mandate.frequency.monthly":"/month","upi.mandate.frequency.weekly":"/week","upi.mandate.frequency.adhoc":" as presented",bankList:"Bank list",qrCode:"QR code","iris.instructions.generateQrCode":"After generating the QR code you can use your preferred banking app to complete the payment.","iris.instructions.payment.step1":"Open your preferred banking app.","iris.instructions.payment.step2":"Scan the QR code with your banking app.","iris.instructions.payment.step3":"Complete the payment in the app and wait for the confirmation here.","econtext.customerNumber":"Customer number","econtext.confirmationNumber":"Confirmation number","econtext.useBefore":"Use before","econtext.paymentInformation":"Payment information","issuerList.separatorText":"or choose from list","upi.intent.apps.title":"Options","upi.intent.apps.dropdown.label":"UPI apps","upi.intent.apps.dropdown.placeholder":"Choose preferred app","emi.subtitle":"Installment plans on credit cards","emi.title":"EMI plan","emi.instructions":"Choose your preferred combination from the options listed below and continue to enter your card details","emi.provider":"Provider","emi.plan":"Plan","emi.planSummary":"Plan summary","emi.itemPrice":"Item price","emi.amountReservedOnCard":"Amount reserved on card","emi.interestChargedByBank":"Interest charged by bank @%{interest}","emi.totalAmountOverTime":"Total amount to be paid over time","emi.upcomingMonthlyPayment":"Upcoming monthly payment","emi.discount":"Discount","emi.discountApplied":"%{amount} discount offer applied for using %{provider}","emi.noCost":"No cost","emi.lowCost":"Low cost","emi.discountAvailable":"discount available","emi.perAnnum":"p.a","emi.cardDetailsInstructions":"Enter card details that are associated with a %{provider} card","emi.cardDetails":"Card details"};export{e as default};
|
|
2
2
|
//# sourceMappingURL=en-US.json.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useMemo as e,useReducer as a,useCallback as t,useEffect as r}from"../../external/preact/hooks/dist/hooks.js";import s from"../Validator/Validator.js";import{init as o,getReducer as l}from"./reducer.js";import{useCoreContext as m}from"../../core/Context/CoreProvider.js";function d(d){const{rules:i
|
|
1
|
+
import{useMemo as e,useReducer as a,useCallback as t,useEffect as r}from"../../external/preact/hooks/dist/hooks.js";import s from"../Validator/Validator.js";import{init as o,getReducer as l}from"./reducer.js";import{useCoreContext as m}from"../../core/Context/CoreProvider.js";function d(d){const{rules:i,formatters:c,defaultData:u,fieldProblems:f,schema:n}=d,p=i??{},y=c??{},h=u??{},v=f??{},g=n??[],{i18n:k}=m(),F=e(()=>new s(p,k),[p]),b=({key:e,value:a,mode:t},r)=>{const s=y?.[e],o=function(e){return e&&"formatterFn"in e}(s)?s.formatterFn:s,l=o&&"function"==typeof o?o(a??"",r):a;return[l,F.validate({key:e,value:l,mode:t},r)]},[P,D]=a(l(b),{defaultData:h,schema:g,processField:b,fieldProblems:v},o),V=e(()=>P.schema.reduce((e,a)=>e&&P.valid[a],!0),[P.schema,P.valid]),j=t((e=null)=>{D({type:"validateForm",selectedSchema:e})},[]),x=t((e,a)=>D({type:"setErrors",key:e,value:a}),[]),C=t((e,a)=>D({type:"setValid",key:e,value:a}),[]),S=t((e,a)=>D({type:"setData",key:e,value:a}),[]),E=t(e=>D({type:"mergeData",data:e}),[]),w=t(e=>D({type:"setSchema",schema:e,defaultData:h}),[P.schema]),J=t(e=>D({type:"mergeForm",formValue:e}),[]),M=t(e=>D({type:"setFieldProblems",fieldProblems:e}),[P.schema]);return r(()=>{M(v??{})},[JSON.stringify(v)]),{handleChangeFor:(e,a)=>t=>{const r=((e,a)=>a.target?"checkbox"===a.target.type?!P.data[e]:a.target.value:a)(e,t);D({type:"updateField",key:e,value:r,mode:a})},triggerValidation:j,setSchema:w,setData:S,mergeData:E,setValid:C,setErrors:x,isValid:V,mergeForm:J,setFieldProblems:M,schema:P.schema,valid:P.valid,errors:P.errors,data:P.data,fieldProblems:P.fieldProblems}}export{d as default};
|
|
2
2
|
//# sourceMappingURL=useForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useForm.js","sources":["../../../../src/utils/useForm/useForm.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo, useReducer } from 'preact/hooks';\nimport Validator from '../Validator';\nimport { getReducer, init } from './reducer';\nimport { Form, FormState, FormProps, Formatter } from './types';\nimport { useCoreContext } from '../../core/Context/CoreProvider';\n\nfunction isFormatterObject(formatter: Formatter | Function): formatter is Formatter {\n return formatter && 'formatterFn' in formatter;\n}\n\nfunction useForm<FormSchema>(props: FormProps): Form<FormSchema> {\n const { rules = {}
|
|
1
|
+
{"version":3,"file":"useForm.js","sources":["../../../../src/utils/useForm/useForm.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo, useReducer } from 'preact/hooks';\nimport Validator from '../Validator';\nimport { getReducer, init } from './reducer';\nimport { Form, FormState, FormProps, Formatter } from './types';\nimport { useCoreContext } from '../../core/Context/CoreProvider';\n\nfunction isFormatterObject(formatter: Formatter | Function): formatter is Formatter {\n return formatter && 'formatterFn' in formatter;\n}\n\nfunction useForm<FormSchema>(props: FormProps): Form<FormSchema> {\n // Normalize null values to empty objects/arrays to avoid type errors\n const {\n rules: providedRules,\n formatters: providedFormatters,\n defaultData: providedDefaultData,\n fieldProblems: providedFieldProblems,\n schema: providedSchema\n } = props;\n const rules = providedRules ?? {};\n const formatters = providedFormatters ?? {};\n const defaultData = providedDefaultData ?? {};\n const fieldProblems = providedFieldProblems ?? {};\n const schema = providedSchema ?? [];\n\n const { i18n } = useCoreContext();\n\n const validator = useMemo(() => new Validator(rules, i18n), [rules]);\n\n /** Formats and validates a field */\n const processField = ({ key, value, mode }, fieldContext) => {\n // Find a formatting function either stored under 'key' or a level deeper under a 'formatter' property\n const formatter = formatters?.[key];\n const formatterFn = isFormatterObject(formatter) ? formatter.formatterFn : formatter;\n const formattedValue = formatterFn && typeof formatterFn === 'function' ? formatterFn(value ?? '', fieldContext) : value;\n\n const validationResult = validator.validate({ key, value: formattedValue, mode }, fieldContext);\n return [formattedValue, validationResult];\n };\n\n const [state, dispatch] = useReducer<FormState<FormSchema>, any, any>(\n getReducer(processField),\n { defaultData, schema, processField, fieldProblems },\n init\n );\n const isValid = useMemo(() => state.schema.reduce((acc, val) => acc && state.valid[val], true), [state.schema, state.valid]);\n\n const getTargetValue = (key, e) => {\n if (!e.target) return e;\n\n if (e.target.type === 'checkbox') {\n return !state.data[key];\n }\n return e.target.value;\n };\n\n /** Formats, validates, and stores a new value for a form field */\n const handleChangeFor = (key, mode) => {\n return e => {\n const value = getTargetValue(key, e);\n dispatch({ type: 'updateField', key, value, mode });\n };\n };\n\n /** Validates every field in the form OR just those in selectedSchema */\n const triggerValidation = useCallback((selectedSchema = null) => {\n dispatch({ type: 'validateForm', selectedSchema });\n }, []);\n\n const setErrors = useCallback((key, value) => dispatch({ type: 'setErrors', key, value }), []);\n const setValid = useCallback((key, value) => dispatch({ type: 'setValid', key, value }), []);\n const setData = useCallback((key, value) => dispatch({ type: 'setData', key, value }), []);\n const mergeData = useCallback(data => dispatch({ type: 'mergeData', data }), []);\n const setSchema = useCallback(schema => dispatch({ type: 'setSchema', schema, defaultData }), [state.schema]);\n const mergeForm = useCallback(formValue => dispatch({ type: 'mergeForm', formValue }), []);\n const setFieldProblems = useCallback(fieldProblems => dispatch({ type: 'setFieldProblems', fieldProblems }), [state.schema]);\n\n // Set reducer fields problems if fieldProblems prop changes\n useEffect(() => {\n setFieldProblems(fieldProblems ?? {});\n }, [JSON.stringify(fieldProblems)]);\n\n return {\n handleChangeFor,\n triggerValidation,\n setSchema,\n setData,\n mergeData,\n setValid,\n setErrors,\n isValid,\n mergeForm,\n setFieldProblems,\n schema: state.schema,\n valid: state.valid,\n errors: state.errors,\n data: state.data,\n fieldProblems: state.fieldProblems\n };\n}\n\nexport default useForm;\n"],"names":["useForm","props","rules","providedRules","formatters","providedFormatters","defaultData","providedDefaultData","fieldProblems","providedFieldProblems","schema","providedSchema","i18n","useCoreContext","validator","useMemo","Validator","processField","key","value","mode","fieldContext","formatter","formatterFn","isFormatterObject","formattedValue","validate","state","dispatch","useReducer","getReducer","init","isValid","reduce","acc","val","valid","triggerValidation","useCallback","selectedSchema","type","setErrors","setValid","setData","mergeData","data","setSchema","mergeForm","formValue","setFieldProblems","useEffect","JSON","stringify","handleChangeFor","e","target","getTargetValue","errors"],"mappings":"qRAUA,SAASA,EAAoBC,GAEzB,MACIC,MAAOC,EACPC,WAAYC,EACZC,YAAaC,EACbC,cAAeC,EACfC,OAAQC,GACRV,EACEC,EAAQC,GAAiB,CAAA,EACzBC,EAAaC,GAAsB,CAAA,EACnCC,EAAcC,GAAuB,CAAA,EACrCC,EAAgBC,GAAyB,CAAA,EACzCC,EAASC,GAAkB,IAE3BC,KAAEA,GAASC,IAEXC,EAAYC,EAAQ,IAAM,IAAIC,EAAUd,EAAOU,GAAO,CAACV,IAGvDe,EAAe,EAAGC,MAAKC,QAAOC,QAAQC,KAExC,MAAMC,EAAYlB,IAAac,GACzBK,EA3Bd,SAA2BD,GACvB,OAAOA,GAAa,gBAAiBA,CACzC,CAyB4BE,CAAkBF,GAAaA,EAAUC,YAAcD,EACrEG,EAAiBF,GAAsC,mBAAhBA,EAA6BA,EAAYJ,GAAS,GAAIE,GAAgBF,EAGnH,MAAO,CAACM,EADiBX,EAAUY,SAAS,CAAER,MAAKC,MAAOM,EAAgBL,QAAQC,MAI/EM,EAAOC,GAAYC,EACtBC,EAAWb,GACX,CAAEX,cAAaI,SAAQO,eAAcT,iBACrCuB,GAEEC,EAAUjB,EAAQ,IAAMY,EAAMjB,OAAOuB,OAAO,CAACC,EAAKC,IAAQD,GAAOP,EAAMS,MAAMD,IAAM,GAAO,CAACR,EAAMjB,OAAQiB,EAAMS,QAoB/GC,EAAoBC,EAAY,CAACC,EAAiB,QACpDX,EAAS,CAAEY,KAAM,eAAgBD,oBAClC,IAEGE,EAAYH,EAAY,CAACpB,EAAKC,IAAUS,EAAS,CAAEY,KAAM,YAAatB,MAAKC,UAAU,IACrFuB,EAAWJ,EAAY,CAACpB,EAAKC,IAAUS,EAAS,CAAEY,KAAM,WAAYtB,MAAKC,UAAU,IACnFwB,EAAUL,EAAY,CAACpB,EAAKC,IAAUS,EAAS,CAAEY,KAAM,UAAWtB,MAAKC,UAAU,IACjFyB,EAAYN,EAAYO,GAAQjB,EAAS,CAAEY,KAAM,YAAaK,SAAS,IACvEC,EAAYR,EAAY5B,GAAUkB,EAAS,CAAEY,KAAM,YAAa9B,SAAQJ,gBAAgB,CAACqB,EAAMjB,SAC/FqC,EAAYT,EAAYU,GAAapB,EAAS,CAAEY,KAAM,YAAaQ,cAAc,IACjFC,EAAmBX,EAAY9B,GAAiBoB,EAAS,CAAEY,KAAM,mBAAoBhC,kBAAkB,CAACmB,EAAMjB,SAOpH,OAJAwC,EAAU,KACND,EAAiBzC,GAAiB,KACnC,CAAC2C,KAAKC,UAAU5C,KAEZ,CACH6C,gBA1BoB,CAACnC,EAAKE,IACnBkC,IACH,MAAMnC,EAZS,EAACD,EAAKoC,IACpBA,EAAEC,OAEe,aAAlBD,EAAEC,OAAOf,MACDb,EAAMkB,KAAK3B,GAEhBoC,EAAEC,OAAOpC,MALMmC,EAWJE,CAAetC,EAAKoC,GAClC1B,EAAS,CAAEY,KAAM,cAAetB,MAAKC,QAAOC,UAwBhDiB,oBACAS,YACAH,UACAC,YACAF,WACAD,YACAT,UACAe,YACAE,mBACAvC,OAAQiB,EAAMjB,OACd0B,MAAOT,EAAMS,MACbqB,OAAQ9B,EAAM8B,OACdZ,KAAMlB,EAAMkB,KACZrC,cAAemB,EAAMnB,cAE7B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createElement as t}from"../../external/preact/dist/preact.js";import o from"./components/CardInput/CardInput.js";import e from"../../utils/browserInfo.js";import{triggerBinLookUp as n}from"../internal/SecuredFields/binLookup/triggerBinLookUp.js";import{fieldTypeToSnakeCase as i,isSecuredField as s}from"../internal/SecuredFields/utils.js";import{reject as r,notFalsy as a}from"../../utils/commonUtils.js";import{shouldIncludeInstallmentsInPaymentData as l}from"./components/CardInput/utils.js";import d from"../internal/ClickToPay/services/create-clicktopay-service.js";import u from"./components/ClickToPayWrapper.js";import{TxVariants as c}from"../tx-variants.js";import{UIElement as p}from"../internal/UIElement/UIElement.js";import h from"../internal/PayButton/PayButton.js";import m,{IMPLEMENTATION_ERROR as y}from"../../core/Errors/AdyenCheckoutError.js";import f from"./components/CardInput/defaultProps.js";import{AnalyticsInfoEvent as v,InfoEventType as b}from"../../core/Analytics/events/AnalyticsInfoEvent.js";function g(t,o,e){return o in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}function P(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{},n=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.forEach(function(o){g(t,o,e[o])})}return t}function C(t,o){return o=null!=o?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):function(t){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);o.push.apply(o,e)}return o}(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}),t}class S extends p{setStatus(t,o){var e,n;return(null===(e=this.componentRef)||void 0===e?void 0:e.setStatus)&&this.componentRef.setStatus(t,o),(null===(n=this.clickToPayRef)||void 0===n?void 0:n.setStatus)&&this.clickToPayRef.setStatus(t),this}getPaymentMethodConfigFromResponse(t){var o;return(null==t?void 0:t.fundingSource)?null===(o=this.core.paymentMethodsResponse)||void 0===o?void 0:o.findByFundingSource(t.type,t.fundingSource):super.getPaymentMethodConfigFromResponse(t)}formatProps(t){var o,e,n,i,s,r,l,d,u,p,h,v,b,g,S,k,R,w,B,O,T,j,I;const M=null!==(o=null===(r=t.session)||void 0===r||null===(s=r.configuration)||void 0===s?void 0:s.enableStoreDetails)&&void 0!==o?o:t.enableStoreDetails,A=!(0===(null===(l=t.amount)||void 0===l?void 0:l.value))&&M,F=t.storedPaymentMethodId||t.id,N=F&&(null==t||null===(d=t.supportedShopperInteractions)||void 0===d?void 0:d.includes("Ecommerce"));if(F&&!N)throw new m(y,"You are trying to create a storedCard from a stored PM that does not support Ecommerce interactions");const D=t.installmentOptions;t.session&&a(D)&&console.warn("WARNING: You have defined installments configuration on the Card component, but you are using a /sessions integration.\nWith this integration, installments configuration must be defined when you create the session. Any configuration defined elsewhere will be ignored.\n\n");const E=t.session?null!==(e=null===(p=t.session)||void 0===p||null===(u=p.configuration)||void 0===u?void 0:u.installmentOptions)&&void 0!==e?e:f.installmentOptions:D;return P(C(P({},t),{holderNameRequired:!!t.hasHolderName&&t.holderNameRequired,hasCVC:!(t.brand&&"bcmc"===t.brand||t.hideCVC),billingAddressRequired:!t.storedPaymentMethodId&&t.billingAddressRequired,billingAddressMode:t.onAddressLookup?f.billingAddressMode:t.billingAddressMode,brand:null!==(n=t.brand)&&void 0!==n?n:c.card,countryCode:t.countryCode?t.countryCode.toLowerCase():null,configuration:C(P({},t.configuration),{socialSecurityNumberMode:null!==(i=null===(h=t.configuration)||void 0===h?void 0:h.socialSecurityNumberMode)&&void 0!==i?i:"auto"}),brandsConfiguration:t.brandsConfiguration||(null===(v=t.configuration)||void 0===v?void 0:v.brandsConfiguration)||{},icon:t.icon||(null===(b=t.configuration)||void 0===b?void 0:b.icon),installmentOptions:E,enableStoreDetails:M,showStoreDetailsCheckbox:A,clickToPayConfiguration:C(P({},t.clickToPayConfiguration),{disableOtpAutoFocus:(null===(g=t.clickToPayConfiguration)||void 0===g?void 0:g.disableOtpAutoFocus)||!1,shopperEmail:(null===(S=t.clickToPayConfiguration)||void 0===S?void 0:S.shopperEmail)||(null===(R=this.core.options)||void 0===R||null===(k=R.session)||void 0===k?void 0:k.shopperEmail),telephoneNumber:(null===(w=t.clickToPayConfiguration)||void 0===w?void 0:w.telephoneNumber)||(null===(O=this.core.options)||void 0===O||null===(B=O.session)||void 0===B?void 0:B.telephoneNumber),locale:(null===(T=t.clickToPayConfiguration)||void 0===T?void 0:T.locale)||(null===(I=t.i18n)||void 0===I||null===(j=I.locale)||void 0===j?void 0:j.replace("-","_"))})}),F&&{storedPaymentMethodId:F})}formatData(){var t;const o=this.state.selectedBrandValue;return C(P({paymentMethod:P({type:S.type},this.state.data,this.props.storedPaymentMethodId&&{storedPaymentMethodId:this.props.storedPaymentMethodId,holderName:null!==(t=this.props.holderName)&&void 0!==t?t:""},o&&{brand:o},this.props.fundingSource&&{fundingSource:this.props.fundingSource},this.state.fastlaneData&&{fastlaneData:btoa(JSON.stringify(this.state.fastlaneData))})},this.state.billingAddress&&{billingAddress:this.state.billingAddress},this.state.socialSecurityNumber&&{socialSecurityNumber:this.state.socialSecurityNumber},this.storePaymentMethodPayload,l(this.state.installments)&&{installments:this.state.installments}),{browserInfo:this.browserInfo,origin:!!window&&window.location.origin})}beforeRender(t){if(null==t?void 0:t.originalAction)return;const o=new v(P({type:b.rendered,component:this.type,configData:C(P({},t),{showPayButton:this.props.showPayButton})},(null==t?void 0:t.oneClick)&&{isStoredPaymentMethod:!0,brand:t.brand}));this.analytics.sendAnalytics(o)}updateStyles(t){var o;return(null===(o=this.componentRef)||void 0===o?void 0:o.updateStyles)&&this.componentRef.updateStyles(t),this}setFocusOn(t){var o;return(null===(o=this.componentRef)||void 0===o?void 0:o.setFocusOn)&&this.componentRef.setFocusOn(t),this}processBinLookupResponse(t,o=!1){var e;return(null===(e=this.componentRef)||void 0===e?void 0:e.processBinLookupResponse)&&this.componentRef.processBinLookupResponse(t,o),this}handleUnsupportedCard(t){var o;return(null===(o=this.componentRef)||void 0===o?void 0:o.handleUnsupportedCard)&&this.componentRef.handleUnsupportedCard(t),this}onBinLookup(t){if(!t.isReset){var o,e;const n=r("supportedBrandsRaw").from(t);null===(o=(e=this.props).onBinLookup)||void 0===o||o.call(e,n)}}get storePaymentMethodPayload(){var t,o;if((null===(t=this.props.storedPaymentMethodId)||void 0===t?void 0:t.length)>0)return{};if(0===(null===(o=this.props.amount)||void 0===o?void 0:o.value))return this.props.enableStoreDetails?{storePaymentMethod:!0}:{};return this.props.showStoreDetailsCheckbox&&void 0!==this.state.storePaymentMethod?{storePaymentMethod:Boolean(this.state.storePaymentMethod)}:{}}get isValid(){return!!this.state.isValid}get icon(){var t;return null!==(t=this.props.icon)&&void 0!==t?t:this.resources.getImage()(this.props.brand)}get brands(){const{brands:t,brandsConfiguration:o}=this.props;return t?t.map(t=>{var e,n;return{icon:null!==(e=null==o||null===(n=o[t])||void 0===n?void 0:n.icon)&&void 0!==e?e:this.props.modules.resources.getImage()(t),name:t}}):[]}get displayName(){return this.props.storedPaymentMethodId?`•••• ${this.props.lastFour}`:this.props.name||S.type}get accessibleName(){return(this.props.name||S.type)+(this.props.storedPaymentMethodId?" "+this.props.i18n.get("creditCard.storedCard.description.ariaLabel").replace("%@",this.props.lastFour):"")}get browserInfo(){return e()}renderCardInput(e=!0){return t(o,C(P({setComponentRef:this.setComponentRef},this.props,this.state),{onSubmitAnalytics:this.submitAnalytics,onChange:this.setState,onSubmit:this.submit,handleKeyPress:this.handleKeyPress,payButton:this.payButton,onBrand:this.onBrand,onBinValue:this.onBinValue,brand:this.props.brand,brandsIcons:this.brands,isPayButtonPrimaryVariant:e,resources:this.resources,onFocus:this.onFocus,onBlur:this.onBlur,onConfigSuccess:this.onConfigSuccess}))}componentToRender(){return t(u,{configuration:this.props.clickToPayConfiguration,clickToPayService:this.clickToPayService,isStandaloneComponent:!1,setClickToPayRef:this.setClickToPayRef,onSetStatus:this.setElementStatus,onSubmit:this.handleClickToPaySubmit,onError:this.handleError},t=>this.renderCardInput(t))}constructor(o,e){var r;(super(o,e),g(this,"clickToPayService",void 0),g(this,"clickToPayRef",null),g(this,"setClickToPayRef",t=>{this.clickToPayRef=t}),g(this,"onBrand",t=>{var o,e;null===(o=(e=this.props).onBrand)||void 0===o||o.call(e,t)}),g(this,"handleClickToPaySubmit",t=>{this.setState({data:P({},t),valid:{},errors:{},isValid:!0}),this.submit()}),g(this,"onConfigSuccess",t=>{var o,e;const n=new v({component:this.type,type:b.configured});this.submitAnalytics(n),null===(o=(e=this.props).onConfigSuccess)||void 0===o||o.call(e,t)}),g(this,"onFocus",t=>{const o=new v({component:this.type,type:b.focus,target:i(t.fieldType)});var e,n,r,a;(this.submitAnalytics(o),s(t.fieldType))?null===(e=(n=this.props).onFocus)||void 0===e||e.call(n,t.event):null===(r=(a=this.props).onFocus)||void 0===r||r.call(a,t)}),g(this,"onBlur",t=>{const o=new v({component:this.type,type:b.unfocus,target:i(t.fieldType)});var e,n,r,a;(this.submitAnalytics(o),s(t.fieldType))?null===(e=(n=this.props).onBlur)||void 0===e||e.call(n,t.event):null===(r=(a=this.props).onBlur)||void 0===r||r.call(a,t)}),g(this,"onBinValue",n(this)),g(this,"payButton",o=>{var e,n;const i=0===(null===(e=this.props.amount)||void 0===e?void 0:e.value),s=(null===(n=this.props.storedPaymentMethodId)||void 0===n?void 0:n.length)>0;return t(h,C(P({},o),{label:i&&!s?this.props.i18n.get("payButton.saveDetails"):"",onClick:this.submit}))}),e&&!e._disableClickToPay&&"prepaid"!==this.props.fundingSource)&&(this.clickToPayService=d(this.props.configuration,this.props.clickToPayConfiguration,this.props.environment,this.analytics),null===(r=this.clickToPayService)||void 0===r||r.initialize())}}g(S,"type",c.scheme),g(S,"defaultProps",P({showFormInstruction:!0,_disableClickToPay:!1,doBinLookup:!0},r(["type","setComponentRef"]).from(f)));export{S as CardElement,S as default};
|
|
1
|
+
import{createElement as t}from"../../external/preact/dist/preact.js";import o from"./components/CardInput/CardInput.js";import e from"../../utils/browserInfo.js";import{triggerBinLookUp as n}from"../internal/SecuredFields/binLookup/triggerBinLookUp.js";import{fieldTypeToSnakeCase as i,isSecuredField as s}from"../internal/SecuredFields/utils.js";import{reject as r,notFalsy as a}from"../../utils/commonUtils.js";import{shouldIncludeInstallmentsInPaymentData as l}from"./components/CardInput/utils.js";import d from"../internal/ClickToPay/services/create-clicktopay-service.js";import u from"./components/ClickToPayWrapper.js";import{TxVariants as c}from"../tx-variants.js";import{UIElement as p}from"../internal/UIElement/UIElement.js";import h from"../internal/PayButton/PayButton.js";import m,{IMPLEMENTATION_ERROR as y}from"../../core/Errors/AdyenCheckoutError.js";import f from"./components/CardInput/defaultProps.js";import{AnalyticsInfoEvent as v,InfoEventType as b}from"../../core/Analytics/events/AnalyticsInfoEvent.js";function g(t,o,e){return o in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}function P(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{},n=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.forEach(function(o){g(t,o,e[o])})}return t}function C(t,o){return o=null!=o?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):function(t){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);o.push.apply(o,e)}return o}(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}),t}class S extends p{setStatus(t,o){var e,n;return(null===(e=this.componentRef)||void 0===e?void 0:e.setStatus)&&this.componentRef.setStatus(t,o),(null===(n=this.clickToPayRef)||void 0===n?void 0:n.setStatus)&&this.clickToPayRef.setStatus(t),this}getPaymentMethodConfigFromResponse(t){var o;return(null==t?void 0:t.fundingSource)?null===(o=this.core.paymentMethodsResponse)||void 0===o?void 0:o.findByFundingSource(t.type,t.fundingSource):super.getPaymentMethodConfigFromResponse(t)}formatProps(t){var o,e,n,i,s,r,l,d,u,p,h,v,b,g,S,k,w,R,B,O,T,j,I;const M=null!==(o=null===(r=t.session)||void 0===r||null===(s=r.configuration)||void 0===s?void 0:s.enableStoreDetails)&&void 0!==o?o:t.enableStoreDetails,A=!(0===(null===(l=t.amount)||void 0===l?void 0:l.value))&&M,D=t.storedPaymentMethodId||t.id,F=D&&(null==t||null===(d=t.supportedShopperInteractions)||void 0===d?void 0:d.includes("Ecommerce"));if(D&&!F)throw new m(y,"You are trying to create a storedCard from a stored PM that does not support Ecommerce interactions");const N=t.installmentOptions;t.session&&a(N)&&console.warn("WARNING: You have defined installments configuration on the Card component, but you are using a /sessions integration.\nWith this integration, installments configuration must be defined when you create the session. Any configuration defined elsewhere will be ignored.\n\n");const E=t.session?null!==(e=null===(p=t.session)||void 0===p||null===(u=p.configuration)||void 0===u?void 0:u.installmentOptions)&&void 0!==e?e:f.installmentOptions:N;return P(C(P({},t),{holderNameRequired:!!t.hasHolderName&&t.holderNameRequired,hasCVC:!(t.brand&&"bcmc"===t.brand||t.hideCVC),billingAddressRequired:!t.storedPaymentMethodId&&t.billingAddressRequired,billingAddressMode:t.onAddressLookup?f.billingAddressMode:t.billingAddressMode,brand:null!==(n=t.brand)&&void 0!==n?n:c.card,countryCode:t.countryCode?t.countryCode.toLowerCase():null,configuration:C(P({},t.configuration),{socialSecurityNumberMode:null!==(i=null===(h=t.configuration)||void 0===h?void 0:h.socialSecurityNumberMode)&&void 0!==i?i:"auto"}),brandsConfiguration:t.brandsConfiguration||(null===(v=t.configuration)||void 0===v?void 0:v.brandsConfiguration)||{},icon:t.icon||(null===(b=t.configuration)||void 0===b?void 0:b.icon),installmentOptions:E,enableStoreDetails:M,showStoreDetailsCheckbox:A,clickToPayConfiguration:C(P({},t.clickToPayConfiguration),{disableOtpAutoFocus:(null===(g=t.clickToPayConfiguration)||void 0===g?void 0:g.disableOtpAutoFocus)||!1,shopperEmail:(null===(S=t.clickToPayConfiguration)||void 0===S?void 0:S.shopperEmail)||(null===(w=this.core.options)||void 0===w||null===(k=w.session)||void 0===k?void 0:k.shopperEmail),telephoneNumber:(null===(R=t.clickToPayConfiguration)||void 0===R?void 0:R.telephoneNumber)||(null===(O=this.core.options)||void 0===O||null===(B=O.session)||void 0===B?void 0:B.telephoneNumber),locale:(null===(T=t.clickToPayConfiguration)||void 0===T?void 0:T.locale)||(null===(I=t.i18n)||void 0===I||null===(j=I.locale)||void 0===j?void 0:j.replace("-","_"))})}),D&&{storedPaymentMethodId:D})}formatData(){var t;const o=this.state.selectedBrandValue;return C(P({paymentMethod:P({type:S.type},this.state.data,this.props.storedPaymentMethodId&&{storedPaymentMethodId:this.props.storedPaymentMethodId,holderName:null!==(t=this.props.holderName)&&void 0!==t?t:""},o&&{brand:o},this.props.fundingSource&&{fundingSource:this.props.fundingSource},this.state.fastlaneData&&{fastlaneData:btoa(JSON.stringify(this.state.fastlaneData))})},this.state.billingAddress&&{billingAddress:this.state.billingAddress},this.state.socialSecurityNumber&&{socialSecurityNumber:this.state.socialSecurityNumber},this.storePaymentMethodPayload,l(this.state.installments)&&{installments:this.state.installments}),{browserInfo:this.browserInfo,origin:!!window&&window.location.origin})}beforeRender(t){if(null==t?void 0:t.originalAction)return;const o=new v(P({type:b.rendered,component:this.type,configData:C(P({},t),{showPayButton:this.props.showPayButton})},(null==t?void 0:t.oneClick)&&{isStoredPaymentMethod:!0,brand:t.brand}));this.analytics.sendAnalytics(o)}updateStyles(t){var o;return(null===(o=this.componentRef)||void 0===o?void 0:o.updateStyles)&&this.componentRef.updateStyles(t),this}setFocusOn(t){var o;return(null===(o=this.componentRef)||void 0===o?void 0:o.setFocusOn)&&this.componentRef.setFocusOn(t),this}processBinLookupResponse(t,o=!1){var e;return(null===(e=this.componentRef)||void 0===e?void 0:e.processBinLookupResponse)&&this.componentRef.processBinLookupResponse(t,o),this}handleUnsupportedCard(t){var o;return(null===(o=this.componentRef)||void 0===o?void 0:o.handleUnsupportedCard)&&this.componentRef.handleUnsupportedCard(t),this}onBinLookup(t){if(!t.isReset){var o,e;const n=r("supportedBrandsRaw").from(t);null===(o=(e=this.props).onBinLookup)||void 0===o||o.call(e,n)}}get storePaymentMethodPayload(){var t,o;if((null===(t=this.props.storedPaymentMethodId)||void 0===t?void 0:t.length)>0)return{};if(0===(null===(o=this.props.amount)||void 0===o?void 0:o.value))return this.props.enableStoreDetails?{storePaymentMethod:!0}:{};return this.props.showStoreDetailsCheckbox&&void 0!==this.state.storePaymentMethod?{storePaymentMethod:Boolean(this.state.storePaymentMethod)}:{}}get isValid(){return!!this.state.isValid}get icon(){var t;return null!==(t=this.props.icon)&&void 0!==t?t:this.resources.getImage()(this.props.brand)}get brands(){const{brands:t,brandsConfiguration:o}=this.props;return t?t.map(t=>{var e,n;return{icon:null!==(e=null==o||null===(n=o[t])||void 0===n?void 0:n.icon)&&void 0!==e?e:this.props.modules.resources.getImage()(t),name:t}}):[]}get displayName(){return this.props.storedPaymentMethodId?`•••• ${this.props.lastFour}`:this.props.name||S.type}get accessibleName(){return(this.props.name||S.type)+(this.props.storedPaymentMethodId?" "+this.props.i18n.get("creditCard.storedCard.description.ariaLabel").replace("%@",this.props.lastFour):"")}get browserInfo(){return e()}renderCardInput(e=!0){return t(o,C(P({setComponentRef:this.setComponentRef},this.props,this.state),{onSubmitAnalytics:this.submitAnalytics,onChange:this.setState,onSubmit:this.submit,handleKeyDown:this.handleKeyDown,payButton:this.payButton,onBrand:this.onBrand,onBinValue:this.onBinValue,brand:this.props.brand,brandsIcons:this.brands,isPayButtonPrimaryVariant:e,resources:this.resources,onFocus:this.onFocus,onBlur:this.onBlur,onConfigSuccess:this.onConfigSuccess}))}componentToRender(){return t(u,{configuration:this.props.clickToPayConfiguration,clickToPayService:this.clickToPayService,isStandaloneComponent:!1,setClickToPayRef:this.setClickToPayRef,onSetStatus:this.setElementStatus,onSubmit:this.handleClickToPaySubmit,onError:this.handleError},t=>this.renderCardInput(t))}constructor(o,e){var r;(super(o,e),g(this,"clickToPayService",void 0),g(this,"clickToPayRef",null),g(this,"setClickToPayRef",t=>{this.clickToPayRef=t}),g(this,"onBrand",t=>{var o,e;null===(o=(e=this.props).onBrand)||void 0===o||o.call(e,t)}),g(this,"handleClickToPaySubmit",t=>{this.setState({data:P({},t),valid:{},errors:{},isValid:!0}),this.submit()}),g(this,"onConfigSuccess",t=>{var o,e;const n=new v({component:this.type,type:b.configured});this.submitAnalytics(n),null===(o=(e=this.props).onConfigSuccess)||void 0===o||o.call(e,t)}),g(this,"onFocus",t=>{const o=new v({component:this.type,type:b.focus,target:i(t.fieldType)});var e,n,r,a;(this.submitAnalytics(o),s(t.fieldType))?null===(e=(n=this.props).onFocus)||void 0===e||e.call(n,t.event):null===(r=(a=this.props).onFocus)||void 0===r||r.call(a,t)}),g(this,"onBlur",t=>{const o=new v({component:this.type,type:b.unfocus,target:i(t.fieldType)});var e,n,r,a;(this.submitAnalytics(o),s(t.fieldType))?null===(e=(n=this.props).onBlur)||void 0===e||e.call(n,t.event):null===(r=(a=this.props).onBlur)||void 0===r||r.call(a,t)}),g(this,"onBinValue",n(this)),g(this,"payButton",o=>{var e,n;const i=0===(null===(e=this.props.amount)||void 0===e?void 0:e.value),s=(null===(n=this.props.storedPaymentMethodId)||void 0===n?void 0:n.length)>0;return t(h,C(P({},o),{label:i&&!s?this.props.i18n.get("payButton.saveDetails"):"",onClick:this.submit}))}),e&&!e._disableClickToPay&&"prepaid"!==this.props.fundingSource)&&(this.clickToPayService=d(this.props.configuration,this.props.clickToPayConfiguration,this.props.environment,this.analytics),null===(r=this.clickToPayService)||void 0===r||r.initialize())}}g(S,"type",c.scheme),g(S,"defaultProps",P({showFormInstruction:!0,_disableClickToPay:!1,doBinLookup:!0},r(["type","setComponentRef"]).from(f)));export{S as CardElement,S as default};
|
|
2
2
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../../../src/components/Card/Card.tsx"],"sourcesContent":["import { h } from 'preact';\nimport CardInput from './components/CardInput';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport { BinLookupResponse, CardElementData, CardConfiguration } from './types';\nimport { triggerBinLookUp } from '../internal/SecuredFields/binLookup/triggerBinLookUp';\nimport { CardBinLookupData, CardConfigSuccessData, CardFocusData } from '../internal/SecuredFields/lib/types';\nimport { fieldTypeToSnakeCase, isSecuredField } from '../internal/SecuredFields/utils';\nimport { notFalsy, reject } from '../../utils/commonUtils';\nimport { shouldIncludeInstallmentsInPaymentData } from './components/CardInput/utils';\nimport createClickToPayService from '../internal/ClickToPay/services/create-clicktopay-service';\nimport { ClickToPayCheckoutPayload, IClickToPayService } from '../internal/ClickToPay/services/types';\nimport ClickToPayWrapper from './components/ClickToPayWrapper';\nimport { ComponentFocusObject, PaymentMethodBrand } from '../../types/global-types';\nimport { TxVariants } from '../tx-variants';\nimport type { ComponentMethodsRef, UIElementStatus } from '../internal/UIElement/types';\nimport UIElement from '../internal/UIElement';\nimport PayButton from '../internal/PayButton';\nimport type { ICore } from '../../core/types';\nimport AdyenCheckoutError, { IMPLEMENTATION_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport CardInputDefaultProps from './components/CardInput/defaultProps';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../core/Analytics/events/AnalyticsInfoEvent';\nimport { InstallmentOptions } from './components/CardInput/components/Installments/Installments';\n\nexport class CardElement extends UIElement<CardConfiguration> {\n public static readonly type: TxVariants = TxVariants.scheme;\n\n private readonly clickToPayService: IClickToPayService | null;\n\n /**\n * Reference to the 'ClickToPayComponent'\n */\n private clickToPayRef: ComponentMethodsRef | null = null;\n\n constructor(checkout: ICore, props?: CardConfiguration) {\n super(checkout, props);\n\n if (props && !props._disableClickToPay && this.props.fundingSource !== 'prepaid') {\n this.clickToPayService = createClickToPayService(\n this.props.configuration,\n this.props.clickToPayConfiguration,\n this.props.environment,\n this.analytics\n );\n\n void this.clickToPayService?.initialize();\n }\n }\n\n protected static readonly defaultProps = {\n showFormInstruction: true,\n _disableClickToPay: false,\n doBinLookup: true,\n // Merge most of CardInput's defaultProps\n ...reject(['type', 'setComponentRef']).from(CardInputDefaultProps)\n };\n\n public setStatus(status: UIElementStatus, props?): this {\n if (this.componentRef?.setStatus) {\n this.componentRef.setStatus(status, props);\n }\n if (this.clickToPayRef?.setStatus) {\n this.clickToPayRef.setStatus(status);\n }\n return this;\n }\n\n private readonly setClickToPayRef = (ref: ComponentMethodsRef) => {\n this.clickToPayRef = ref;\n };\n\n // This is the most self contained way of handling funding source matching\n // Alternatives would be to override getPaymentMethodConfigFromResponse and change it's signature\n protected override getPaymentMethodConfigFromResponse(componentProps: CardConfiguration) {\n if (componentProps?.fundingSource) {\n return this.core.paymentMethodsResponse?.findByFundingSource(componentProps.type, componentProps.fundingSource);\n }\n\n return super.getPaymentMethodConfigFromResponse(componentProps);\n }\n\n formatProps(props: CardConfiguration): CardConfiguration {\n // The value from a session should be used, before falling back to the merchant configuration\n const enableStoreDetails = props.session?.configuration?.enableStoreDetails ?? props.enableStoreDetails;\n\n const isZeroAuth = props.amount?.value === 0;\n const showStoreDetailsCheckbox = isZeroAuth ? false : enableStoreDetails;\n\n const storedCardID = props.storedPaymentMethodId || props.id; // check if we've been passed a (checkout) processed storedCard or one that merchant has pulled from the PMs response\n const isEcommerceStoredCard = storedCardID && props?.supportedShopperInteractions?.includes('Ecommerce'); // If we have a storedCard does it support Ecommerce (it might not if the merchant has pulled it from the PMs response)\n\n // If we have a storedPM but it doesn't support Ecommerce - we can't make a storedCard component from it\n if (storedCardID && !isEcommerceStoredCard) {\n // TODO - Decide if an error is too severe? Would a console.warning suffice?\n throw new AdyenCheckoutError(\n IMPLEMENTATION_ERROR,\n 'You are trying to create a storedCard from a stored PM that does not support Ecommerce interactions'\n );\n }\n\n // Take the configuration set on the card component - which is either merchant defined or default (empty object)\n // @ts-ignore 'installmentOptions' is optional on CardConfiguration (the merchant-facing type), but by this point\n // UIElement.buildElementProps has already merged CardInputDefaultProps.installmentOptions ({}) into props\n // before formatProps() is called, so the value is always defined here.\n const merchantInstallmentOptions: InstallmentOptions = props.installmentOptions;\n\n if (props.session && notFalsy(merchantInstallmentOptions)) {\n console.warn(\n 'WARNING: You have defined installments configuration on the Card component, but you are using a /sessions integration.\\nWith this integration, installments configuration must be defined when you create the session. Any configuration defined elsewhere will be ignored.\\n\\n'\n );\n }\n\n // In a session scenario, only the session's own installments configuration is used; otherwise fall back to the merchant configuration / default\n const shownInstallmentOptions: InstallmentOptions = props.session\n ? (props.session?.configuration?.installmentOptions ?? CardInputDefaultProps.installmentOptions)\n : merchantInstallmentOptions;\n\n return {\n ...props,\n // Mismatch between hasHolderName & holderNameRequired which can mean card can never be valid\n holderNameRequired: !props.hasHolderName ? false : props.holderNameRequired,\n // False for *stored* BCMC cards & if merchant explicitly wants to hide the CVC field\n hasCVC: !((props.brand && props.brand === 'bcmc') || props.hideCVC),\n // billingAddressRequired only available for non-stored cards\n billingAddressRequired: props.storedPaymentMethodId ? false : props.billingAddressRequired,\n // edge case where merchant has defined both an onAddressLookup callback AND set billingAddressMode: 'partial' - which leads to some strange behaviour in the address UI\n billingAddressMode: props.onAddressLookup ? CardInputDefaultProps.billingAddressMode : props.billingAddressMode,\n /** props.brand will be specified in the case of a StoredCard or a Bancontact component, for a regular Card we default it to 'card' */\n brand: props.brand ?? TxVariants.card,\n countryCode: props.countryCode ? props.countryCode.toLowerCase() : null,\n // Required for transition period (until configuration object becomes the norm)\n // - if merchant has defined value directly in props, use this instead\n configuration: {\n ...props.configuration,\n socialSecurityNumberMode: props.configuration?.socialSecurityNumberMode ?? 'auto'\n },\n brandsConfiguration: props.brandsConfiguration || props.configuration?.brandsConfiguration || {},\n icon: props.icon || props.configuration?.icon,\n installmentOptions: shownInstallmentOptions,\n enableStoreDetails,\n showStoreDetailsCheckbox,\n /**\n * Click to Pay configuration\n * - If email is set explicitly in the configuration, then it can override the one used in the session creation\n */\n clickToPayConfiguration: {\n ...props.clickToPayConfiguration,\n disableOtpAutoFocus: props.clickToPayConfiguration?.disableOtpAutoFocus || false,\n shopperEmail: props.clickToPayConfiguration?.shopperEmail || this.core.options?.session?.shopperEmail,\n telephoneNumber: props.clickToPayConfiguration?.telephoneNumber || this.core.options?.session?.telephoneNumber,\n locale: props.clickToPayConfiguration?.locale || props.i18n?.locale?.replace('-', '_')\n },\n ...(storedCardID && { storedPaymentMethodId: storedCardID })\n };\n }\n\n /**\n * Formats the component data output\n */\n formatData(): CardElementData {\n /**\n * this.state.selectedBrandValue will be set when:\n * - /binLookup detects a single brand,\n * - when /binLookup detects a dual-branded card and the shopper makes a brand selection\n * - or, in the case of a storedCard\n */\n const cardBrand = this.state.selectedBrandValue;\n\n return {\n paymentMethod: {\n type: CardElement.type,\n ...this.state.data,\n ...(this.props.storedPaymentMethodId && {\n storedPaymentMethodId: this.props.storedPaymentMethodId,\n holderName: this.props.holderName ?? ''\n }),\n ...(cardBrand && { brand: cardBrand }),\n ...(this.props.fundingSource && { fundingSource: this.props.fundingSource }),\n ...(this.state.fastlaneData && { fastlaneData: btoa(JSON.stringify(this.state.fastlaneData)) })\n },\n ...(this.state.billingAddress && { billingAddress: this.state.billingAddress }),\n ...(this.state.socialSecurityNumber && { socialSecurityNumber: this.state.socialSecurityNumber }),\n ...this.storePaymentMethodPayload,\n ...(shouldIncludeInstallmentsInPaymentData(this.state.installments) && { installments: this.state.installments }),\n browserInfo: this.browserInfo,\n origin: !!window && window.location.origin\n };\n }\n\n protected override beforeRender(configSetByMerchant?: CardConfiguration): void {\n // We don't send 'rendered' events when rendering actions\n if (configSetByMerchant?.originalAction) {\n return;\n }\n\n const event = new AnalyticsInfoEvent({\n type: InfoEventType.rendered,\n component: this.type,\n configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n ...(configSetByMerchant?.oneClick && {\n isStoredPaymentMethod: true,\n brand: configSetByMerchant.brand\n })\n });\n\n this.analytics.sendAnalytics(event);\n }\n\n updateStyles(stylesObj) {\n if (this.componentRef?.updateStyles) this.componentRef.updateStyles(stylesObj);\n return this;\n }\n\n setFocusOn(fieldName) {\n if (this.componentRef?.setFocusOn) this.componentRef.setFocusOn(fieldName);\n return this;\n }\n\n public onBrand = event => {\n this.props.onBrand?.(event);\n };\n\n processBinLookupResponse(binLookupResponse: BinLookupResponse | null, isReset = false) {\n if (this.componentRef?.processBinLookupResponse) this.componentRef.processBinLookupResponse(binLookupResponse, isReset);\n return this;\n }\n\n handleUnsupportedCard(errObj) {\n if (this.componentRef?.handleUnsupportedCard) this.componentRef.handleUnsupportedCard(errObj);\n return this;\n }\n\n private readonly handleClickToPaySubmit = (payload: ClickToPayCheckoutPayload) => {\n this.setState({ data: { ...payload }, valid: {}, errors: {}, isValid: true });\n this.submit();\n };\n\n onBinLookup(obj: CardBinLookupData) {\n // Handler for regular card comp doesn't need this 'raw' data or to know about 'resets'\n if (!obj.isReset) {\n const nuObj = reject('supportedBrandsRaw').from(obj);\n this.props.onBinLookup?.(nuObj);\n }\n }\n\n private readonly onConfigSuccess = (obj: CardConfigSuccessData) => {\n const event = new AnalyticsInfoEvent({ component: this.type, type: InfoEventType.configured });\n this.submitAnalytics(event);\n\n this.props.onConfigSuccess?.(obj);\n };\n\n private readonly onFocus = (obj: ComponentFocusObject) => {\n const event = new AnalyticsInfoEvent({\n component: this.type,\n type: InfoEventType.focus,\n target: fieldTypeToSnakeCase(obj.fieldType) as UiTarget\n });\n this.submitAnalytics(event);\n\n // Call merchant defined callback\n if (isSecuredField(obj.fieldType)) {\n this.props.onFocus?.(obj.event as CardFocusData);\n } else {\n this.props.onFocus?.(obj);\n }\n };\n\n private readonly onBlur = (obj: ComponentFocusObject) => {\n const event = new AnalyticsInfoEvent({\n component: this.type,\n type: InfoEventType.unfocus,\n target: fieldTypeToSnakeCase(obj.fieldType) as UiTarget\n });\n this.submitAnalytics(event);\n\n // Call merchant defined callback\n if (isSecuredField(obj.fieldType)) {\n this.props.onBlur?.(obj.event as CardFocusData);\n } else {\n this.props.onBlur?.(obj);\n }\n };\n\n public onBinValue = triggerBinLookUp(this);\n\n get storePaymentMethodPayload() {\n const isStoredCard = this.props.storedPaymentMethodId?.length > 0;\n if (isStoredCard) {\n return {};\n }\n\n /**\n * For regular card, zero auth payments, we store the payment method, *if* the configuration says we should:\n * - For sessions, this means if the session has been created with storePaymentMethodMode: 'askForConsent'\n * - For the advanced flow, this means if the merchant has still set enableStoreDetails: true\n *\n * What we are doing is.. if for a normal payment we would show the \"Save for my next payment\" checkbox,\n * for a zero-auth payment we effectively click the checkbox on behalf of the shopper.\n */\n const isZeroAuth = this.props.amount?.value === 0;\n if (isZeroAuth) {\n return this.props.enableStoreDetails ? { storePaymentMethod: true } : {};\n }\n\n // For regular card, non-zero auth payments, we store the payment method based on the checkbox value.\n const includeStorePaymentMethod = this.props.showStoreDetailsCheckbox && typeof this.state.storePaymentMethod !== 'undefined';\n return includeStorePaymentMethod ? { storePaymentMethod: Boolean(this.state.storePaymentMethod) } : {};\n }\n\n get isValid() {\n return !!this.state.isValid;\n }\n\n get icon() {\n return this.props.icon ?? this.resources.getImage()(this.props.brand);\n }\n\n get brands(): PaymentMethodBrand[] {\n const { brands, brandsConfiguration } = this.props;\n if (brands) {\n return brands.map(brand => {\n const brandIcon = brandsConfiguration?.[brand]?.icon ?? this.props.modules.resources.getImage()(brand);\n return { icon: brandIcon, name: brand };\n });\n }\n\n return [];\n }\n\n get displayName(): string {\n if (this.props.storedPaymentMethodId) {\n return `•••• ${this.props.lastFour}`;\n }\n\n return this.props.name || CardElement.type;\n }\n\n get accessibleName(): string {\n // Use display name, unless it's a stored payment method, there inform user\n return (\n (this.props.name || CardElement.type) +\n (this.props.storedPaymentMethodId\n ? ' ' + this.props.i18n.get('creditCard.storedCard.description.ariaLabel').replace('%@', this.props.lastFour)\n : '')\n );\n }\n\n get browserInfo() {\n return collectBrowserInfo();\n }\n\n protected override payButton = (props: PayButtonProps): h.JSX.Element => {\n const isZeroAuth = this.props.amount?.value === 0;\n const isStoredCard = this.props.storedPaymentMethodId?.length > 0;\n return <PayButton {...props} label={isZeroAuth && !isStoredCard ? this.props.i18n.get('payButton.saveDetails') : ''} onClick={this.submit} />;\n };\n\n private renderCardInput(isCardPrimaryInput = true): h.JSX.Element {\n return (\n <CardInput\n setComponentRef={this.setComponentRef}\n {...this.props}\n {...this.state}\n onSubmitAnalytics={this.submitAnalytics}\n onChange={this.setState}\n onSubmit={this.submit}\n handleKeyPress={this.handleKeyPress}\n payButton={this.payButton}\n onBrand={this.onBrand}\n onBinValue={this.onBinValue}\n brand={this.props.brand}\n brandsIcons={this.brands}\n isPayButtonPrimaryVariant={isCardPrimaryInput}\n resources={this.resources}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onConfigSuccess={this.onConfigSuccess}\n />\n );\n }\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <ClickToPayWrapper\n configuration={this.props.clickToPayConfiguration}\n clickToPayService={this.clickToPayService}\n isStandaloneComponent={false}\n setClickToPayRef={this.setClickToPayRef}\n onSetStatus={this.setElementStatus}\n onSubmit={this.handleClickToPaySubmit}\n onError={this.handleError}\n >\n {isCardPrimaryInput => this.renderCardInput(isCardPrimaryInput)}\n </ClickToPayWrapper>\n );\n }\n}\n\nexport default CardElement;\n"],"names":["CardElement","UIElement","setStatus","status","props","_this_componentRef","_this_clickToPayRef","this","componentRef","clickToPayRef","getPaymentMethodConfigFromResponse","componentProps","_this_core_paymentMethodsResponse","fundingSource","core","paymentMethodsResponse","findByFundingSource","type","super","formatProps","_this_core_options_session","_this_core_options","_this_core_options_session1","_this_core_options1","enableStoreDetails","session","configuration","_ref","showStoreDetailsCheckbox","amount","value","storedCardID","storedPaymentMethodId","id","isEcommerceStoredCard","supportedShopperInteractions","includes","AdyenCheckoutError","IMPLEMENTATION_ERROR","merchantInstallmentOptions","installmentOptions","notFalsy","console","warn","shownInstallmentOptions","_ref1","CardInputDefaultProps","_object_spread","_object_spread_props","holderNameRequired","hasHolderName","hasCVC","brand","hideCVC","billingAddressRequired","billingAddressMode","onAddressLookup","TxVariants","card","countryCode","toLowerCase","socialSecurityNumberMode","_ref2","brandsConfiguration","icon","clickToPayConfiguration","disableOtpAutoFocus","shopperEmail","options","telephoneNumber","locale","i18n","replace","formatData","_this_props_holderName","cardBrand","state","selectedBrandValue","paymentMethod","data","holderName","fastlaneData","btoa","JSON","stringify","billingAddress","socialSecurityNumber","storePaymentMethodPayload","shouldIncludeInstallmentsInPaymentData","installments","browserInfo","origin","window","location","beforeRender","configSetByMerchant","originalAction","event","AnalyticsInfoEvent","InfoEventType","rendered","component","configData","showPayButton","oneClick","isStoredPaymentMethod","analytics","sendAnalytics","updateStyles","stylesObj","setFocusOn","fieldName","processBinLookupResponse","binLookupResponse","isReset","handleUnsupportedCard","errObj","onBinLookup","obj","_this_props_onBinLookup","_this_props","nuObj","reject","from","call","_this_props_storedPaymentMethodId","_this_props_amount","length","storePaymentMethod","Boolean","isValid","_this_props_icon","resources","getImage","brands","map","brandIcon","modules","name","displayName","lastFour","accessibleName","get","collectBrowserInfo","renderCardInput","isCardPrimaryInput","h","CardInput","setComponentRef","onSubmitAnalytics","submitAnalytics","onChange","setState","onSubmit","submit","handleKeyPress","payButton","onBrand","onBinValue","brandsIcons","isPayButtonPrimaryVariant","onFocus","onBlur","onConfigSuccess","componentToRender","ClickToPayWrapper","clickToPayService","isStandaloneComponent","setClickToPayRef","onSetStatus","setElementStatus","handleClickToPaySubmit","onError","handleError","constructor","checkout","_this_clickToPayService","_define_property","ref","_this_props_onBrand","payload","valid","errors","_this_props_onConfigSuccess","configured","focus","target","fieldTypeToSnakeCase","fieldType","_this_props_onFocus","_this_props_onFocus1","_this_props1","isSecuredField","unfocus","_this_props_onBlur","_this_props_onBlur1","triggerBinLookUp","isZeroAuth","isStoredCard","PayButton","label","onClick","_disableClickToPay","createClickToPayService","environment","initialize","scheme","defaultProps","showFormInstruction","doBinLookup"],"mappings":"8yDAwBO,MAAMA,UAAoBC,EAiCtBC,SAAAA,CAAUC,EAAyBC,OAClCC,EAGAC,EAGJ,eANID,EAAAE,KAAKC,wBAALH,OAAA,EAAAA,EAAmBH,YACnBK,KAAKC,aAAaN,UAAUC,EAAQC,YAEpCE,EAAAC,KAAKE,yBAALH,OAAA,EAAAA,EA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KAAKH,MAAMyB,cAAX,IAAAiG,OAAA,EAAAA,EAAmBhG,OAChCwK,GAA+C,QAAhCzE,EAAAtH,KAAKH,MAAM4B,6BAAX,IAAA6F,OAAA,EAAAA,EAAkCE,QAAS,EAChE,OAAOmB,EAACqD,EAAAA,EAAAA,EAAAA,CAAAA,EAAcnM,GAAAA,CAAOoM,MAAOH,IAAeC,EAAe/L,KAAKH,MAAMmE,KAAKuE,IAAI,yBAA2B,GAAI2D,QAASlM,KAAKmJ,YA9T/HtJ,IAAUA,EAAMsM,oBAAmD,YAA7BnM,KAAKH,MAAMS,iBACjDN,KAAK+J,kBAAoBqC,EACrBpM,KAAKH,MAAMsB,cACXnB,KAAKH,MAAM6D,wBACX1D,KAAKH,MAAMwM,YACXrM,KAAKmG,WAGkB,QAAtBsE,EAAAzK,KAAK+J,yBAAL,IAAAU,GAAAA,EAAwB6B,aAErC,EAtBA5B,EADSjL,EACciB,OAAmBwC,EAAWqJ,QAwBrD7B,EAzBSjL,EAyBiB+M,eAAehK,EAAA,CACrCiK,qBAAqB,EACrBN,oBAAoB,EACpBO,aAAa,GAEVvF,EAAO,CAAC,OAAQ,oBAAoBC,KAAK7E"}
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../../src/components/Card/Card.tsx"],"sourcesContent":["import { h } from 'preact';\nimport CardInput from './components/CardInput';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport { BinLookupResponse, CardElementData, CardConfiguration } from './types';\nimport { triggerBinLookUp } from '../internal/SecuredFields/binLookup/triggerBinLookUp';\nimport { CardBinLookupData, CardConfigSuccessData, CardFocusData } from '../internal/SecuredFields/lib/types';\nimport { fieldTypeToSnakeCase, isSecuredField } from '../internal/SecuredFields/utils';\nimport { notFalsy, reject } from '../../utils/commonUtils';\nimport { shouldIncludeInstallmentsInPaymentData } from './components/CardInput/utils';\nimport createClickToPayService from '../internal/ClickToPay/services/create-clicktopay-service';\nimport { ClickToPayCheckoutPayload, IClickToPayService } from '../internal/ClickToPay/services/types';\nimport ClickToPayWrapper from './components/ClickToPayWrapper';\nimport { ComponentFocusObject, PaymentMethodBrand } from '../../types/global-types';\nimport { TxVariants } from '../tx-variants';\nimport type { ComponentMethodsRef, UIElementStatus } from '../internal/UIElement/types';\nimport UIElement from '../internal/UIElement';\nimport PayButton from '../internal/PayButton';\nimport type { ICore } from '../../core/types';\nimport AdyenCheckoutError, { IMPLEMENTATION_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport CardInputDefaultProps from './components/CardInput/defaultProps';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../core/Analytics/events/AnalyticsInfoEvent';\nimport { InstallmentOptions } from './components/CardInput/components/Installments/Installments';\n\nexport class CardElement extends UIElement<CardConfiguration> {\n public static readonly type: TxVariants = TxVariants.scheme;\n\n private readonly clickToPayService: IClickToPayService | null;\n\n /**\n * Reference to the 'ClickToPayComponent'\n */\n private clickToPayRef: ComponentMethodsRef | null = null;\n\n constructor(checkout: ICore, props?: CardConfiguration) {\n super(checkout, props);\n\n if (props && !props._disableClickToPay && this.props.fundingSource !== 'prepaid') {\n this.clickToPayService = createClickToPayService(\n this.props.configuration,\n this.props.clickToPayConfiguration,\n this.props.environment,\n this.analytics\n );\n\n void this.clickToPayService?.initialize();\n }\n }\n\n protected static readonly defaultProps = {\n showFormInstruction: true,\n _disableClickToPay: false,\n doBinLookup: true,\n // Merge most of CardInput's defaultProps\n ...reject(['type', 'setComponentRef']).from(CardInputDefaultProps)\n };\n\n public setStatus(status: UIElementStatus, props?): this {\n if (this.componentRef?.setStatus) {\n this.componentRef.setStatus(status, props);\n }\n if (this.clickToPayRef?.setStatus) {\n this.clickToPayRef.setStatus(status);\n }\n return this;\n }\n\n private readonly setClickToPayRef = (ref: ComponentMethodsRef) => {\n this.clickToPayRef = ref;\n };\n\n // This is the most self contained way of handling funding source matching\n // Alternatives would be to override getPaymentMethodConfigFromResponse and change it's signature\n protected override getPaymentMethodConfigFromResponse(componentProps: CardConfiguration) {\n if (componentProps?.fundingSource) {\n return this.core.paymentMethodsResponse?.findByFundingSource(componentProps.type, componentProps.fundingSource);\n }\n\n return super.getPaymentMethodConfigFromResponse(componentProps);\n }\n\n formatProps(props: CardConfiguration): CardConfiguration {\n // The value from a session should be used, before falling back to the merchant configuration\n const enableStoreDetails = props.session?.configuration?.enableStoreDetails ?? props.enableStoreDetails;\n\n const isZeroAuth = props.amount?.value === 0;\n const showStoreDetailsCheckbox = isZeroAuth ? false : enableStoreDetails;\n\n const storedCardID = props.storedPaymentMethodId || props.id; // check if we've been passed a (checkout) processed storedCard or one that merchant has pulled from the PMs response\n const isEcommerceStoredCard = storedCardID && props?.supportedShopperInteractions?.includes('Ecommerce'); // If we have a storedCard does it support Ecommerce (it might not if the merchant has pulled it from the PMs response)\n\n // If we have a storedPM but it doesn't support Ecommerce - we can't make a storedCard component from it\n if (storedCardID && !isEcommerceStoredCard) {\n // TODO - Decide if an error is too severe? Would a console.warning suffice?\n throw new AdyenCheckoutError(\n IMPLEMENTATION_ERROR,\n 'You are trying to create a storedCard from a stored PM that does not support Ecommerce interactions'\n );\n }\n\n // Take the configuration set on the card component - which is either merchant defined or default (empty object)\n // @ts-ignore 'installmentOptions' is optional on CardConfiguration (the merchant-facing type), but by this point\n // UIElement.buildElementProps has already merged CardInputDefaultProps.installmentOptions ({}) into props\n // before formatProps() is called, so the value is always defined here.\n const merchantInstallmentOptions: InstallmentOptions = props.installmentOptions;\n\n if (props.session && notFalsy(merchantInstallmentOptions)) {\n console.warn(\n 'WARNING: You have defined installments configuration on the Card component, but you are using a /sessions integration.\\nWith this integration, installments configuration must be defined when you create the session. Any configuration defined elsewhere will be ignored.\\n\\n'\n );\n }\n\n // In a session scenario, only the session's own installments configuration is used; otherwise fall back to the merchant configuration / default\n const shownInstallmentOptions: InstallmentOptions = props.session\n ? (props.session?.configuration?.installmentOptions ?? CardInputDefaultProps.installmentOptions)\n : merchantInstallmentOptions;\n\n return {\n ...props,\n // Mismatch between hasHolderName & holderNameRequired which can mean card can never be valid\n holderNameRequired: !props.hasHolderName ? false : props.holderNameRequired,\n // False for *stored* BCMC cards & if merchant explicitly wants to hide the CVC field\n hasCVC: !((props.brand && props.brand === 'bcmc') || props.hideCVC),\n // billingAddressRequired only available for non-stored cards\n billingAddressRequired: props.storedPaymentMethodId ? false : props.billingAddressRequired,\n // edge case where merchant has defined both an onAddressLookup callback AND set billingAddressMode: 'partial' - which leads to some strange behaviour in the address UI\n billingAddressMode: props.onAddressLookup ? CardInputDefaultProps.billingAddressMode : props.billingAddressMode,\n /** props.brand will be specified in the case of a StoredCard or a Bancontact component, for a regular Card we default it to 'card' */\n brand: props.brand ?? TxVariants.card,\n countryCode: props.countryCode ? props.countryCode.toLowerCase() : null,\n // Required for transition period (until configuration object becomes the norm)\n // - if merchant has defined value directly in props, use this instead\n configuration: {\n ...props.configuration,\n socialSecurityNumberMode: props.configuration?.socialSecurityNumberMode ?? 'auto'\n },\n brandsConfiguration: props.brandsConfiguration || props.configuration?.brandsConfiguration || {},\n icon: props.icon || props.configuration?.icon,\n installmentOptions: shownInstallmentOptions,\n enableStoreDetails,\n showStoreDetailsCheckbox,\n /**\n * Click to Pay configuration\n * - If email is set explicitly in the configuration, then it can override the one used in the session creation\n */\n clickToPayConfiguration: {\n ...props.clickToPayConfiguration,\n disableOtpAutoFocus: props.clickToPayConfiguration?.disableOtpAutoFocus || false,\n shopperEmail: props.clickToPayConfiguration?.shopperEmail || this.core.options?.session?.shopperEmail,\n telephoneNumber: props.clickToPayConfiguration?.telephoneNumber || this.core.options?.session?.telephoneNumber,\n locale: props.clickToPayConfiguration?.locale || props.i18n?.locale?.replace('-', '_')\n },\n ...(storedCardID && { storedPaymentMethodId: storedCardID })\n };\n }\n\n /**\n * Formats the component data output\n */\n formatData(): CardElementData {\n /**\n * this.state.selectedBrandValue will be set when:\n * - /binLookup detects a single brand,\n * - when /binLookup detects a dual-branded card and the shopper makes a brand selection\n * - or, in the case of a storedCard\n */\n const cardBrand = this.state.selectedBrandValue;\n\n return {\n paymentMethod: {\n type: CardElement.type,\n ...this.state.data,\n ...(this.props.storedPaymentMethodId && {\n storedPaymentMethodId: this.props.storedPaymentMethodId,\n holderName: this.props.holderName ?? ''\n }),\n ...(cardBrand && { brand: cardBrand }),\n ...(this.props.fundingSource && { fundingSource: this.props.fundingSource }),\n ...(this.state.fastlaneData && { fastlaneData: btoa(JSON.stringify(this.state.fastlaneData)) })\n },\n ...(this.state.billingAddress && { billingAddress: this.state.billingAddress }),\n ...(this.state.socialSecurityNumber && { socialSecurityNumber: this.state.socialSecurityNumber }),\n ...this.storePaymentMethodPayload,\n ...(shouldIncludeInstallmentsInPaymentData(this.state.installments) && { installments: this.state.installments }),\n browserInfo: this.browserInfo,\n origin: !!window && window.location.origin\n };\n }\n\n protected override beforeRender(configSetByMerchant?: CardConfiguration): void {\n // We don't send 'rendered' events when rendering actions\n if (configSetByMerchant?.originalAction) {\n return;\n }\n\n const event = new AnalyticsInfoEvent({\n type: InfoEventType.rendered,\n component: this.type,\n configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n ...(configSetByMerchant?.oneClick && {\n isStoredPaymentMethod: true,\n brand: configSetByMerchant.brand\n })\n });\n\n this.analytics.sendAnalytics(event);\n }\n\n updateStyles(stylesObj) {\n if (this.componentRef?.updateStyles) this.componentRef.updateStyles(stylesObj);\n return this;\n }\n\n setFocusOn(fieldName) {\n if (this.componentRef?.setFocusOn) this.componentRef.setFocusOn(fieldName);\n return this;\n }\n\n public onBrand = event => {\n this.props.onBrand?.(event);\n };\n\n processBinLookupResponse(binLookupResponse: BinLookupResponse | null, isReset = false) {\n if (this.componentRef?.processBinLookupResponse) this.componentRef.processBinLookupResponse(binLookupResponse, isReset);\n return this;\n }\n\n handleUnsupportedCard(errObj) {\n if (this.componentRef?.handleUnsupportedCard) this.componentRef.handleUnsupportedCard(errObj);\n return this;\n }\n\n private readonly handleClickToPaySubmit = (payload: ClickToPayCheckoutPayload) => {\n this.setState({ data: { ...payload }, valid: {}, errors: {}, isValid: true });\n this.submit();\n };\n\n onBinLookup(obj: CardBinLookupData) {\n // Handler for regular card comp doesn't need this 'raw' data or to know about 'resets'\n if (!obj.isReset) {\n const nuObj = reject('supportedBrandsRaw').from(obj);\n this.props.onBinLookup?.(nuObj);\n }\n }\n\n private readonly onConfigSuccess = (obj: CardConfigSuccessData) => {\n const event = new AnalyticsInfoEvent({ component: this.type, type: InfoEventType.configured });\n this.submitAnalytics(event);\n\n this.props.onConfigSuccess?.(obj);\n };\n\n private readonly onFocus = (obj: ComponentFocusObject) => {\n const event = new AnalyticsInfoEvent({\n component: this.type,\n type: InfoEventType.focus,\n target: fieldTypeToSnakeCase(obj.fieldType) as UiTarget\n });\n this.submitAnalytics(event);\n\n // Call merchant defined callback\n if (isSecuredField(obj.fieldType)) {\n this.props.onFocus?.(obj.event as CardFocusData);\n } else {\n this.props.onFocus?.(obj);\n }\n };\n\n private readonly onBlur = (obj: ComponentFocusObject) => {\n const event = new AnalyticsInfoEvent({\n component: this.type,\n type: InfoEventType.unfocus,\n target: fieldTypeToSnakeCase(obj.fieldType) as UiTarget\n });\n this.submitAnalytics(event);\n\n // Call merchant defined callback\n if (isSecuredField(obj.fieldType)) {\n this.props.onBlur?.(obj.event as CardFocusData);\n } else {\n this.props.onBlur?.(obj);\n }\n };\n\n public onBinValue = triggerBinLookUp(this);\n\n get storePaymentMethodPayload() {\n const isStoredCard = this.props.storedPaymentMethodId?.length > 0;\n if (isStoredCard) {\n return {};\n }\n\n /**\n * For regular card, zero auth payments, we store the payment method, *if* the configuration says we should:\n * - For sessions, this means if the session has been created with storePaymentMethodMode: 'askForConsent'\n * - For the advanced flow, this means if the merchant has still set enableStoreDetails: true\n *\n * What we are doing is.. if for a normal payment we would show the \"Save for my next payment\" checkbox,\n * for a zero-auth payment we effectively click the checkbox on behalf of the shopper.\n */\n const isZeroAuth = this.props.amount?.value === 0;\n if (isZeroAuth) {\n return this.props.enableStoreDetails ? { storePaymentMethod: true } : {};\n }\n\n // For regular card, non-zero auth payments, we store the payment method based on the checkbox value.\n const includeStorePaymentMethod = this.props.showStoreDetailsCheckbox && typeof this.state.storePaymentMethod !== 'undefined';\n return includeStorePaymentMethod ? { storePaymentMethod: Boolean(this.state.storePaymentMethod) } : {};\n }\n\n get isValid() {\n return !!this.state.isValid;\n }\n\n get icon() {\n return this.props.icon ?? this.resources.getImage()(this.props.brand);\n }\n\n get brands(): PaymentMethodBrand[] {\n const { brands, brandsConfiguration } = this.props;\n if (brands) {\n return brands.map(brand => {\n const brandIcon = brandsConfiguration?.[brand]?.icon ?? this.props.modules.resources.getImage()(brand);\n return { icon: brandIcon, name: brand };\n });\n }\n\n return [];\n }\n\n get displayName(): string {\n if (this.props.storedPaymentMethodId) {\n return `•••• ${this.props.lastFour}`;\n }\n\n return this.props.name || CardElement.type;\n }\n\n get accessibleName(): string {\n // Use display name, unless it's a stored payment method, there inform user\n return (\n (this.props.name || CardElement.type) +\n (this.props.storedPaymentMethodId\n ? ' ' + this.props.i18n.get('creditCard.storedCard.description.ariaLabel').replace('%@', this.props.lastFour)\n : '')\n );\n }\n\n get browserInfo() {\n return collectBrowserInfo();\n }\n\n protected override payButton = (props: PayButtonProps): h.JSX.Element => {\n const isZeroAuth = this.props.amount?.value === 0;\n const isStoredCard = this.props.storedPaymentMethodId?.length > 0;\n return <PayButton {...props} label={isZeroAuth && !isStoredCard ? this.props.i18n.get('payButton.saveDetails') : ''} onClick={this.submit} />;\n };\n\n private renderCardInput(isCardPrimaryInput = true): h.JSX.Element {\n return (\n <CardInput\n setComponentRef={this.setComponentRef}\n {...this.props}\n {...this.state}\n onSubmitAnalytics={this.submitAnalytics}\n onChange={this.setState}\n onSubmit={this.submit}\n handleKeyDown={this.handleKeyDown}\n payButton={this.payButton}\n onBrand={this.onBrand}\n onBinValue={this.onBinValue}\n brand={this.props.brand}\n brandsIcons={this.brands}\n isPayButtonPrimaryVariant={isCardPrimaryInput}\n resources={this.resources}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onConfigSuccess={this.onConfigSuccess}\n />\n );\n }\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <ClickToPayWrapper\n configuration={this.props.clickToPayConfiguration}\n clickToPayService={this.clickToPayService}\n isStandaloneComponent={false}\n setClickToPayRef={this.setClickToPayRef}\n onSetStatus={this.setElementStatus}\n onSubmit={this.handleClickToPaySubmit}\n onError={this.handleError}\n >\n {isCardPrimaryInput => this.renderCardInput(isCardPrimaryInput)}\n </ClickToPayWrapper>\n );\n }\n}\n\nexport default CardElement;\n"],"names":["CardElement","UIElement","setStatus","status","props","_this_componentRef","_this_clickToPayRef","this","componentRef","clickToPayRef","getPaymentMethodConfigFromResponse","componentProps","_this_core_paymentMethodsResponse","fundingSource","core","paymentMethodsResponse","findByFundingSource","type","super","formatProps","_this_core_options_session","_this_core_options","_this_core_options_session1","_this_core_options1","enableStoreDetails","session","configuration","_ref","showStoreDetailsCheckbox","amount","value","storedCardID","storedPaymentMethodId","id","isEcommerceStoredCard","supportedShopperInteractions","includes","AdyenCheckoutError","IMPLEMENTATION_ERROR","merchantInstallmentOptions","installmentOptions","notFalsy","console","warn","shownInstallmentOptions","_ref1","CardInputDefaultProps","_object_spread","_object_spread_props","holderNameRequired","hasHolderName","hasCVC","brand","hideCVC","billingAddressRequired","billingAddressMode","onAddressLookup","TxVariants","card","countryCode","toLowerCase","socialSecurityNumberMode","_ref2","brandsConfiguration","icon","clickToPayConfiguration","disableOtpAutoFocus","shopperEmail","options","telephoneNumber","locale","i18n","replace","formatData","_this_props_holderName","cardBrand","state","selectedBrandValue","paymentMethod","data","holderName","fastlaneData","btoa","JSON","stringify","billingAddress","socialSecurityNumber","storePaymentMethodPayload","shouldIncludeInstallmentsInPaymentData","installments","browserInfo","origin","window","location","beforeRender","configSetByMerchant","originalAction","event","AnalyticsInfoEvent","InfoEventType","rendered","component","configData","showPayButton","oneClick","isStoredPaymentMethod","analytics","sendAnalytics","updateStyles","stylesObj","setFocusOn","fieldName","processBinLookupResponse","binLookupResponse","isReset","handleUnsupportedCard","errObj","onBinLookup","obj","_this_props_onBinLookup","_this_props","nuObj","reject","from","call","_this_props_storedPaymentMethodId","_this_props_amount","length","storePaymentMethod","Boolean","isValid","_this_props_icon","resources","getImage","brands","map","brandIcon","modules","name","displayName","lastFour","accessibleName","get","collectBrowserInfo","renderCardInput","isCardPrimaryInput","h","CardInput","setComponentRef","onSubmitAnalytics","submitAnalytics","onChange","setState","onSubmit","submit","handleKeyDown","payButton","onBrand","onBinValue","brandsIcons","isPayButtonPrimaryVariant","onFocus","onBlur","onConfigSuccess","componentToRender","ClickToPayWrapper","clickToPayService","isStandaloneComponent","setClickToPayRef","onSetStatus","setElementStatus","handleClickToPaySubmit","onError","handleError","constructor","checkout","_this_clickToPayService","_define_property","ref","_this_props_onBrand","payload","valid","errors","_this_props_onConfigSuccess","configured","focus","target","fieldTypeToSnakeCase","fieldType","_this_props_onFocus","_this_props_onFocus1","_this_props1","isSecuredField","unfocus","_this_props_onBlur","_this_props_onBlur1","triggerBinLookUp","isZeroAuth","isStoredCard","PayButton","label","onClick","_disableClickToPay","createClickToPayService","environment","initialize","scheme","defaultProps","showFormInstruction","doBinLookup"],"mappings":"8yDAwBO,MAAMA,UAAoBC,EAiCtBC,SAAAA,CAAUC,EAAyBC,OAClCC,EAGAC,EAGJ,eANID,EAAAE,KAAKC,wBAALH,OAAA,EAAAA,EAAmBH,YACnBK,KAAKC,aAAaN,UAAUC,EAAQC,YAEpCE,EAAAC,KAAKE,yBAALH,OAAA,EAAAA,EAAoBJ,YACpBK,KAAKE,cAAcP,UAAUC,GAE1BI,IACX,CAQmBG,kCAAAA,CAAmCC,GAEvC,IAAAC,EADX,OAAID,aAAAA,EAAAA,EAAgBE,eACuB,QAAhCD,EAAAL,KAAKO,KAAKC,8BAAV,IAAAH,OAAA,EAAAA,EAAkCI,oBAAoBL,EAAeM,KAAMN,EAAeE,eAG9FK,MAAMR,mCAA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,MAAMmE,KAAKuE,IAAI,yBAA2B,GAAI2D,QAASlM,KAAKmJ,YA9T/HtJ,IAAUA,EAAMsM,oBAAmD,YAA7BnM,KAAKH,MAAMS,iBACjDN,KAAK+J,kBAAoBqC,EACrBpM,KAAKH,MAAMsB,cACXnB,KAAKH,MAAM6D,wBACX1D,KAAKH,MAAMwM,YACXrM,KAAKmG,WAGkB,QAAtBsE,EAAAzK,KAAK+J,yBAAL,IAAAU,GAAAA,EAAwB6B,aAErC,EAtBA5B,EADSjL,EACciB,OAAmBwC,EAAWqJ,QAwBrD7B,EAzBSjL,EAyBiB+M,eAAehK,EAAA,CACrCiK,qBAAqB,EACrBN,oBAAoB,EACpBO,aAAa,GAEVvF,EAAO,CAAC,OAAQ,oBAAoBC,KAAK7E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createElement as e,Fragment as r}from"../../../../external/preact/dist/preact.js";import{useRef as t,useMemo as n,useState as o,useCallback as s,useEffect as i}from"../../../../external/preact/hooks/dist/hooks.js";import a from"../../../internal/SecuredFields/SFP/SecuredFieldsProvider.js";import l from"./defaultProps.js";import{AddressModeOptions as d}from"./types.js";import{DATE_POLICY_REQUIRED as u,CVC_POLICY_REQUIRED as c,ENCRYPTED_CARD_NUMBER as m}from"../../../internal/SecuredFields/lib/constants.js";import{cardInputValidationRules as p,cardInputFormatters as y,getRuleByNameAndMode as f}from"./validate.js";import b from"../../../internal/SecuredFields/binLookup/extensions.js";import h from"../../../../utils/useForm/useForm.js";import"../../../internal/SecuredFields/lib/CSF/utils/userAgent.js";import{handlePartialAddressMode as S,shouldShowInstallmentsComponent as g,extractPropsForSFP as N,getLayout as v,requiresDualBrandSelection as A,extractPropsForCardFields as j}from"./utils.js";import C from"../../../internal/Address/Specifications.js";import{StoredCardFieldsWrapper as F}from"./components/StoredCardFieldsWrapper.js";import{CardFieldsWrapper as O}from"./components/CardFieldsWrapper.js";import{getAutoJumpHandler as P,getFocusHandler as w,getAddressHandler as E}from"./handlers.js";import k from"../../../../_virtual/index.js";import{getPartialAddressValidationRules as x}from"../../../internal/Address/validate.js";import B from"../../../../core/Context/useImage.js";import{getArrayDifferences as R}from"../../../../utils/arrayUtils.js";import I from"../../../internal/FormInstruction/FormInstruction.js";import{PREFIX as D}from"../../../internal/Icon/constants.js";import V from"./useSRPanelForCardInputErrors.js";import q from"../Fastlane/FastlaneSignup.js";import{fieldTypeToSnakeCase as M}from"../../../internal/SecuredFields/utils.js";import{getErrorMessageFromCode as _}from"../../../../core/Errors/utils.js";import{SF_ErrorCodes as L}from"../../../../core/Errors/constants.js";import{usePrevious as T}from"../../../../utils/hookUtils.js";import{AnalyticsInfoEvent as K,InfoEventType as U,UiTarget as H}from"../../../../core/Analytics/events/AnalyticsInfoEvent.js";import{useAmount as z}from"../../../../core/Context/AmountProvider.js";import{DUAL_BRANDS_THAT_NEED_SELECTION_MECHANISM as W}from"../../constants.js";function $(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function G(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){$(e,r,t[r])})}return e}function J(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}const Q=l=>{var $,Q,X,Y,Z,ee,re;const te=t(null),ne=t(!1),oe=B(),se=t(null),ie=e=>{se.current=e},ae=t({});Object.keys(ae.current).length||l.setComponentRef(ae.current);const le=t(0),de=t(!1),ue=n(()=>new C(l.specifications),[l.specifications]),{amount:ce}=z();ae.current.sfp=te;const[me,pe]=o("ready"),[ye,fe]=o({}),[be,he]=o(G({},l.holderNameRequired&&{holderName:!1})),[Se,ge]=o(G({},l.hasHolderName&&{holderName:null!==($=null===(Y=l.data)||void 0===Y?void 0:Y.holderName)&&void 0!==$?$:""})),[Ne,ve]=o(""),[Ae,je]=o(!1),[Ce,Fe]=o(u),[Oe,Pe]=o(c),[we,Ee]=o(null),[ke,xe]=o([]),[Be,Re]=o(l.storedPaymentMethodId?l.brand:""),Ie=l.billingAddressMode!==d.none&&l.billingAddressRequired,De=S(l.billingAddressMode),Ve=t(De&&(null===(ee=l.data)||void 0===ee||null===(Z=ee.billingAddress)||void 0===Z?void 0:Z.country)),[qe,Me]=o(!1),[_e,Le]=o(Ie&&null!==(Q=null===(re=l.data)||void 0===re?void 0:re.billingAddress)&&void 0!==Q?Q:null),[Te,Ke]=o(!1),[Ue,He]=o(""),[ze,We]=o({value:null}),[$e,Ge]=o(null),[Je,Qe]=o("card"),[Xe,Ye]=o(!1),{handleChangeFor:Ze,triggerValidation:er,data:rr,valid:tr,errors:nr,setSchema:or,setData:sr,setValid:ir,setErrors:ar}=h({schema:[],defaultData:l.data,formatters:y,rules:p}),lr=g({installmentOptions:l.installmentOptions,fundingSource:l.fundingSource,amount:ce}),dr=null===(X=l.showInstallmentAmounts)||void 0===X||X,ur="kr"===(null!=we?we:l.countryCode),cr=!!l.configuration.koreanAuthenticationRequired&&ur,mr=Te&&"auto"===l.configuration.socialSecurityNumberMode||"show"===l.configuration.socialSecurityNumberMode,pr=(e,r)=>{l.onFocus({fieldType:e,event:r})},yr=(e,r)=>{l.onBlur({fieldType:e,event:r})},fr=s(e=>{Qe(e.brand),l.onBrand(e)},[]),br=w(ve,pr,yr),hr=()=>v(G({props:l,showKCP:cr,showBrazilianSSN:mr},l.billingAddressRequired&&{countrySpecificSchemas:ue.getAddressSchemaForCountry(null==_e?void 0:_e.country),billingAddressRequiredFields:l.billingAddressRequiredFields})),Sr=s(e=>{const r="webInternalElement"!==e.fieldType?e.fieldType:e.name;Ge(r)},[]),gr=E(sr,ir,ar),Nr=P(de,te,hr()),vr=s(e=>{Ar(e)},[Xe,Ye]),Ar=e=>{e.status&&("loading"==e.status?Ye(!1):Ye(!0))},jr=n(()=>b(l,{sfp:te},{dualBrandSelectElements:ke,setDualBrandSelectElements:xe,setSelectedBrandValue:Re,issuingCountryCode:we,setIssuingCountryCode:Ee},le),[ke,we]);ae.current.showValidation=()=>{ne.current=!0,null==Or||Or(),te.current.showValidation(),er(["holderName","socialSecurityNumber","taxNumber"]),(null==se?void 0:se.current)&&se.current.showValidation()},ae.current.processBinLookupResponse=(e,r)=>{jr.processBinLookup(e,r)},ae.current.setStatus=pe,i(()=>(ae.current.setFocusOn=te.current.setFocusOn,ae.current.updateStyles=te.current.updateStyles,ae.current.handleUnsupportedCard=te.current.handleUnsupportedCard,()=>{te.current.destroy()}),[]),i(()=>{const e=[...l.hasHolderName?["holderName"]:[],...mr?["socialSecurityNumber"]:[],...cr?["taxNumber"]:[],...Ie?["billingAddress"]:[]];or(e)},[l.hasHolderName,mr,cr]),i(()=>{var e;ge(J(G({},Se),{holderName:null!==(e=rr.holderName)&&void 0!==e?e:"",taxNumber:rr.taxNumber})),He(rr.socialSecurityNumber),Ie&&Le(G({},rr.billingAddress)),he(J(G({},be),{holderName:!l.holderNameRequired||tr.holderName,socialSecurityNumber:!!tr.socialSecurityNumber&&tr.socialSecurityNumber,taxNumber:!!tr.taxNumber&&tr.taxNumber,billingAddress:!!tr.billingAddress&&tr.billingAddress}));const r=!!nr.billingAddress&&Object.entries(nr.billingAddress).reduce((e,[,r])=>e||null!=r,!1);fe(J(G({},ye),{holderName:l.holderNameRequired&&nr.holderName?nr.holderName:null,socialSecurityNumber:mr&&nr.socialSecurityNumber?nr.socialSecurityNumber:null,taxNumber:cr&&nr.taxNumber?nr.taxNumber:null,billingAddress:Ie&&r?nr.billingAddress:null}))},[rr,tr,nr]);const{sortedErrorList:Cr,previousSortedErrors:Fr,clearSRPanel:Or}=V({errors:ye,props:l,isValidating:ne,retrieveLayout:hr,specifications:ue,billingAddress:_e,sfp:te});i(()=>{if(Cr){const e=R(Cr,Fr,"field");null==e||e.forEach(e=>{const r=new K({component:l.type,type:U.validationError,target:M(e.field),validationErrorCode:e.errorCode,validationErrorMessage:_(e.errorCode,L)});l.onSubmitAnalytics(r)})}},[Cr]),i(()=>{const e=!!be.holderName,r=Ae,t=!Ie||!!be.billingAddress,n=!cr||!!be.taxNumber&&!!be.encryptedPassword,o=!mr||!!be.socialSecurityNumber,s=r&&e&&t&&n&&o,i=te.current.mapErrorsToValidationRuleResult(),a=G({},ye,i);l.onChange({data:Se,valid:be,errors:a,isValid:s,billingAddress:_e,selectedBrandValue:Be,storePaymentMethod:qe,socialSecurityNumber:Ue,installments:ze})},[Se,be,ye,Be,qe,ze]),i(()=>{if(ke.length>0&&ke){const e=ke.map(e=>e.id),r=e[0],t=e.toString();if(!!ke&&A(W,ke,"id")){const e=new K({component:l.type,type:U.displayed,target:H.dualBrandButton,brand:r,configData:{dualBrands:t}});l.onSubmitAnalytics(e)}}},[ke]);const Pr=T(Be);i(()=>{if((null==Pr?void 0:Pr.length)&&(null==Be?void 0:Be.length)){const e=new K({component:l.type,type:U.selected,target:H.dualBrandButton,brand:Be});l.onSubmitAnalytics(e)}},[Be]);const wr=l.storedPaymentMethodId?F:O;return e(r,null,e(a,J(G({ref:te},N(l)),{styles:G({},l.styles),koreanAuthenticationRequired:l.configuration.koreanAuthenticationRequired,hasKoreanFields:!(!l.configuration.koreanAuthenticationRequired||"kr"!==l.countryCode),onSubmitAnalytics:l.onSubmitAnalytics,onChange:(e,r)=>{if(e.autoCompleteName){if(!l.hasHolderName)return;const r=f("holderName","blur"),t=(null==r?void 0:r(e.autoCompleteName,null))?e.autoCompleteName:null;return void(t&&(sr("holderName",t),ir("holderName",!0),ar("holderName",null)))}var t;l.autoFocus&&le.current>0&&"handleOnFieldValid"===(null==r?void 0:r.event)&&(null==r?void 0:r.fieldType)===m&&e.valid.encryptedCardNumber&&Nr(),ge(G({},Se,e.data)),fe(G({},ye,(t=e.errors)?{encryptedCardNumber:!!t.encryptedCardNumber,encryptedExpiryDate:!!t.encryptedExpiryDate,encryptedSecurityCode:!!t.encryptedSecurityCode,encryptedPassword:!!t.encryptedPassword}:{})),he(G({},be,e.valid)),je(e.isSfpValid),Pe(e.cvcPolicy),Ke(e.showSocialSecurityNumber),Fe(e.expiryDatePolicy)},onBrand:fr,onFocus:br,onStateUpdate:vr,type:l.brand,componentType:l.type,disableIOSArrowKeys:l.disableIOSArrowKeys?Sr:null,render:({setRootNode:r,setFocusOn:t},n)=>{var o;return e("div",{ref:r,className:k({"adyen-checkout__card-input":!0,"adyen-checkout-card-input__wrapper":!0,[`adyen-checkout__card-input--${null!==(o=l.fundingSource)&&void 0!==o?o:"credit"}`]:!0,"adyen-checkout__card-input--loading":"loading"===me}),role:"form"},Xe&&e(I,null),e(wr,J(G({},j(l)),{data:Se,valid:be,errors:ye,handleChangeFor:Ze,focusedElement:Ne,setFocusOn:t,sfpState:n,cvcPolicy:Oe,hasInstallments:lr,showAmountsInInstallments:dr,handleInstallments:We,brandsIcons:l.brandsIcons,formData:rr,formErrors:nr,formValid:tr,expiryDatePolicy:Ce,dualBrandSelectElements:ke,extensions:jr,selectedBrandValue:Be,showKCP:cr,showBrazilianSSN:mr,socialSecurityNumber:Ue,handleOnStoreDetails:Me,setAddressRef:ie,billingAddress:_e,billingAddressValidationRules:De&&x(Ve.current),partialAddressSchema:De,handleAddress:gr,onAddressLookup:l.onAddressLookup,onAddressSelected:l.onAddressSelected,addressSearchDebounceMs:l.addressSearchDebounceMs,iOSFocusedField:$e,onFieldFocusAnalytics:pr,onFieldBlurAnalytics:yr})))}})),l.fastlaneConfiguration&&e(q,J(G({},l.fastlaneConfiguration),{currentDetectedBrand:Je,onChange:l.onChange,onSubmitAnalytics:l.onSubmitAnalytics,type:l.type})),Xe&&l.showPayButton&&l.payButton({status:me,variant:l.isPayButtonPrimaryVariant?"primary":"secondary",icon:oe({imageFolder:"components/"})(`${D}lock`)}))};Q.defaultProps=l;export{Q as default};
|
|
1
|
+
import{createElement as e,Fragment as r}from"../../../../external/preact/dist/preact.js";import{useRef as t,useMemo as n,useState as o,useCallback as s,useEffect as i}from"../../../../external/preact/hooks/dist/hooks.js";import a from"../../../internal/SecuredFields/SFP/SecuredFieldsProvider.js";import l from"./defaultProps.js";import{AddressModeOptions as d}from"./types.js";import{DATE_POLICY_REQUIRED as u,CVC_POLICY_REQUIRED as c,ENCRYPTED_CARD_NUMBER as m}from"../../../internal/SecuredFields/lib/constants.js";import{cardInputValidationRules as p,cardInputFormatters as y,getRuleByNameAndMode as f}from"./validate.js";import b from"../../../internal/SecuredFields/binLookup/extensions.js";import h from"../../../../utils/useForm/useForm.js";import"../../../internal/SecuredFields/lib/CSF/utils/userAgent.js";import{handlePartialAddressMode as S,shouldShowInstallmentsComponent as g,extractPropsForSFP as N,getLayout as v,requiresDualBrandSelection as A,extractPropsForCardFields as j}from"./utils.js";import C from"../../../internal/Address/Specifications.js";import{StoredCardFieldsWrapper as F}from"./components/StoredCardFieldsWrapper.js";import{CardFieldsWrapper as O}from"./components/CardFieldsWrapper.js";import{getAutoJumpHandler as P,getFocusHandler as w,getAddressHandler as E}from"./handlers.js";import k from"../../../../_virtual/index.js";import{getPartialAddressValidationRules as x}from"../../../internal/Address/validate.js";import B from"../../../../core/Context/useImage.js";import{getArrayDifferences as R}from"../../../../utils/arrayUtils.js";import I from"../../../internal/FormInstruction/FormInstruction.js";import{PREFIX as D}from"../../../internal/Icon/constants.js";import V from"./useSRPanelForCardInputErrors.js";import q from"../Fastlane/FastlaneSignup.js";import{fieldTypeToSnakeCase as M}from"../../../internal/SecuredFields/utils.js";import{getErrorMessageFromCode as _}from"../../../../core/Errors/utils.js";import{SF_ErrorCodes as L}from"../../../../core/Errors/constants.js";import{usePrevious as T}from"../../../../utils/hookUtils.js";import{AnalyticsInfoEvent as U,InfoEventType as K,UiTarget as H}from"../../../../core/Analytics/events/AnalyticsInfoEvent.js";import{useAmount as z}from"../../../../core/Context/AmountProvider.js";import{DUAL_BRANDS_THAT_NEED_SELECTION_MECHANISM as W}from"../../constants.js";function $(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function G(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){$(e,r,t[r])})}return e}function J(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}const Q=l=>{var $,Q,X,Y,Z,ee,re;const te=t(null),ne=t(!1),oe=B(),se=t(null),ie=e=>{se.current=e},ae=t({});Object.keys(ae.current).length||l.setComponentRef(ae.current);const le=t(0),de=t(!1),ue=n(()=>new C(l.specifications),[l.specifications]),{amount:ce}=z();ae.current.sfp=te;const[me,pe]=o("ready"),[ye,fe]=o({}),[be,he]=o(G({},l.holderNameRequired&&{holderName:!1})),[Se,ge]=o(G({},l.hasHolderName&&{holderName:null!==($=null===(Z=l.data)||void 0===Z?void 0:Z.holderName)&&void 0!==$?$:""})),[Ne,ve]=o(""),[Ae,je]=o(!1),[Ce,Fe]=o(u),[Oe,Pe]=o(c),[we,Ee]=o(null),[ke,xe]=o([]),[Be,Re]=o(l.storedPaymentMethodId?l.brand:""),Ie=l.billingAddressMode!==d.none&&l.billingAddressRequired,De=S(l.billingAddressMode),Ve=null!==(Q=null===(ee=l.data)||void 0===ee?void 0:ee.billingAddress)&&void 0!==Q?Q:null,qe=t(De&&null!==(X=null==Ve||null===(re=Ve.country)||void 0===re?void 0:re.toUpperCase())&&void 0!==X?X:null),[Me,_e]=o(!1),[Le,Te]=o(Ie?Ve:null),[Ue,Ke]=o(!1),[He,ze]=o(""),[We,$e]=o({value:null}),[Ge,Je]=o(null),[Qe,Xe]=o("card"),[Ye,Ze]=o(!1),{handleChangeFor:er,triggerValidation:rr,data:tr,valid:nr,errors:or,setSchema:sr,setData:ir,setValid:ar,setErrors:lr}=h({schema:[],defaultData:l.data,formatters:y,rules:p}),dr=g({installmentOptions:l.installmentOptions,fundingSource:l.fundingSource,amount:ce}),ur=null===(Y=l.showInstallmentAmounts)||void 0===Y||Y,cr="kr"===(null!=we?we:l.countryCode),mr=!!l.configuration.koreanAuthenticationRequired&&cr,pr=Ue&&"auto"===l.configuration.socialSecurityNumberMode||"show"===l.configuration.socialSecurityNumberMode,yr=(e,r)=>{l.onFocus({fieldType:e,event:r})},fr=(e,r)=>{l.onBlur({fieldType:e,event:r})},br=s(e=>{Xe(e.brand),l.onBrand(e)},[]),hr=w(ve,yr,fr),Sr=()=>v(G({props:l,showKCP:mr,showBrazilianSSN:pr},l.billingAddressRequired&&{countrySpecificSchemas:ue.getAddressSchemaForCountry(null==Le?void 0:Le.country),billingAddressRequiredFields:l.billingAddressRequiredFields})),gr=s(e=>{const r="webInternalElement"!==e.fieldType?e.fieldType:e.name;Je(r)},[]),Nr=E(ir,ar,lr),vr=P(de,te,Sr()),Ar=s(e=>{jr(e)},[Ye,Ze]),jr=e=>{e.status&&("loading"==e.status?Ze(!1):Ze(!0))},Cr=n(()=>b(l,{sfp:te},{dualBrandSelectElements:ke,setDualBrandSelectElements:xe,setSelectedBrandValue:Re,issuingCountryCode:we,setIssuingCountryCode:Ee},le),[ke,we]);ae.current.showValidation=()=>{ne.current=!0,null==Pr||Pr(),te.current.showValidation(),rr(["holderName","socialSecurityNumber","taxNumber"]),(null==se?void 0:se.current)&&se.current.showValidation()},ae.current.processBinLookupResponse=(e,r)=>{Cr.processBinLookup(e,r)},ae.current.setStatus=pe,i(()=>(ae.current.setFocusOn=te.current.setFocusOn,ae.current.updateStyles=te.current.updateStyles,ae.current.handleUnsupportedCard=te.current.handleUnsupportedCard,()=>{te.current.destroy()}),[]),i(()=>{const e=[...l.hasHolderName?["holderName"]:[],...pr?["socialSecurityNumber"]:[],...mr?["taxNumber"]:[],...Ie?["billingAddress"]:[]];sr(e)},[l.hasHolderName,pr,mr]),i(()=>{var e;ge(J(G({},Se),{holderName:null!==(e=tr.holderName)&&void 0!==e?e:"",taxNumber:tr.taxNumber})),ze(tr.socialSecurityNumber),Ie&&Te(G({},tr.billingAddress)),he(J(G({},be),{holderName:!l.holderNameRequired||nr.holderName,socialSecurityNumber:!!nr.socialSecurityNumber&&nr.socialSecurityNumber,taxNumber:!!nr.taxNumber&&nr.taxNumber,billingAddress:!!nr.billingAddress&&nr.billingAddress}));const r=!!or.billingAddress&&Object.entries(or.billingAddress).reduce((e,[,r])=>e||null!=r,!1);fe(J(G({},ye),{holderName:l.holderNameRequired&&or.holderName?or.holderName:null,socialSecurityNumber:pr&&or.socialSecurityNumber?or.socialSecurityNumber:null,taxNumber:mr&&or.taxNumber?or.taxNumber:null,billingAddress:Ie&&r?or.billingAddress:null}))},[tr,nr,or]);const{sortedErrorList:Fr,previousSortedErrors:Or,clearSRPanel:Pr}=V({errors:ye,props:l,isValidating:ne,retrieveLayout:Sr,specifications:ue,billingAddress:Le,sfp:te});i(()=>{if(Fr){const e=R(Fr,Or,"field");null==e||e.forEach(e=>{const r=new U({component:l.type,type:K.validationError,target:M(e.field),validationErrorCode:e.errorCode,validationErrorMessage:_(e.errorCode,L)});l.onSubmitAnalytics(r)})}},[Fr]),i(()=>{const e=!!be.holderName,r=Ae,t=!Ie||!!be.billingAddress,n=!mr||!!be.taxNumber&&!!be.encryptedPassword,o=!pr||!!be.socialSecurityNumber,s=r&&e&&t&&n&&o,i=te.current.mapErrorsToValidationRuleResult(),a=G({},ye,i);l.onChange({data:Se,valid:be,errors:a,isValid:s,billingAddress:Le,selectedBrandValue:Be,storePaymentMethod:Me,socialSecurityNumber:He,installments:We})},[Se,be,ye,Be,Me,We]),i(()=>{if(ke.length>0&&ke){const e=ke.map(e=>e.id),r=e[0],t=e.toString();if(!!ke&&A(W,ke,"id")){const e=new U({component:l.type,type:K.displayed,target:H.dualBrandButton,brand:r,configData:{dualBrands:t}});l.onSubmitAnalytics(e)}}},[ke]);const wr=T(Be);i(()=>{if((null==wr?void 0:wr.length)&&(null==Be?void 0:Be.length)){const e=new U({component:l.type,type:K.selected,target:H.dualBrandButton,brand:Be});l.onSubmitAnalytics(e)}},[Be]);const Er=l.storedPaymentMethodId?F:O;return e(r,null,e(a,J(G({ref:te},N(l)),{styles:G({},l.styles),koreanAuthenticationRequired:l.configuration.koreanAuthenticationRequired,hasKoreanFields:!(!l.configuration.koreanAuthenticationRequired||"kr"!==l.countryCode),onSubmitAnalytics:l.onSubmitAnalytics,onChange:(e,r)=>{if(e.autoCompleteName){if(!l.hasHolderName)return;const r=f("holderName","blur"),t=(null==r?void 0:r(e.autoCompleteName,null))?e.autoCompleteName:null;return void(t&&(ir("holderName",t),ar("holderName",!0),lr("holderName",null)))}var t;l.autoFocus&&le.current>0&&"handleOnFieldValid"===(null==r?void 0:r.event)&&(null==r?void 0:r.fieldType)===m&&e.valid.encryptedCardNumber&&vr(),ge(G({},Se,e.data)),fe(G({},ye,(t=e.errors)?{encryptedCardNumber:!!t.encryptedCardNumber,encryptedExpiryDate:!!t.encryptedExpiryDate,encryptedSecurityCode:!!t.encryptedSecurityCode,encryptedPassword:!!t.encryptedPassword}:{})),he(G({},be,e.valid)),je(e.isSfpValid),Pe(e.cvcPolicy),Ke(e.showSocialSecurityNumber),Fe(e.expiryDatePolicy)},onBrand:br,onFocus:hr,onStateUpdate:Ar,type:l.brand,componentType:l.type,disableIOSArrowKeys:l.disableIOSArrowKeys?gr:null,render:({setRootNode:r,setFocusOn:t},n)=>{var o;return e("div",{ref:r,className:k({"adyen-checkout__card-input":!0,"adyen-checkout-card-input__wrapper":!0,[`adyen-checkout__card-input--${null!==(o=l.fundingSource)&&void 0!==o?o:"credit"}`]:!0,"adyen-checkout__card-input--loading":"loading"===me}),role:"form"},Ye&&e(I,null),e(Er,J(G({},j(l)),{data:Se,valid:be,errors:ye,handleChangeFor:er,focusedElement:Ne,setFocusOn:t,sfpState:n,cvcPolicy:Oe,hasInstallments:dr,showAmountsInInstallments:ur,handleInstallments:$e,brandsIcons:l.brandsIcons,formData:tr,formErrors:or,formValid:nr,expiryDatePolicy:Ce,dualBrandSelectElements:ke,extensions:Cr,selectedBrandValue:Be,showKCP:mr,showBrazilianSSN:pr,socialSecurityNumber:He,handleOnStoreDetails:_e,setAddressRef:ie,billingAddress:Le,billingAddressValidationRules:De&&x(qe.current),partialAddressSchema:De,handleAddress:Nr,onAddressLookup:l.onAddressLookup,onAddressSelected:l.onAddressSelected,addressSearchDebounceMs:l.addressSearchDebounceMs,iOSFocusedField:Ge,onFieldFocusAnalytics:yr,onFieldBlurAnalytics:fr})))}})),l.fastlaneConfiguration&&e(q,J(G({},l.fastlaneConfiguration),{currentDetectedBrand:Qe,onChange:l.onChange,onSubmitAnalytics:l.onSubmitAnalytics,type:l.type})),Ye&&l.showPayButton&&l.payButton({status:me,variant:l.isPayButtonPrimaryVariant?"primary":"secondary",icon:oe({imageFolder:"components/"})(`${D}lock`)}))};Q.defaultProps=l;export{Q as default};
|
|
2
2
|
//# sourceMappingURL=CardInput.js.map
|