UNPKG

@adyen/adyen-web

Version:

[![npm](https://img.shields.io/npm/v/@adyen/adyen-web.svg)](https://www.npmjs.com/package/@adyen/adyen-web)

3 lines (2 loc) 583 B
import{SF_FIELDS_MAP as t,ENCRYPTED_SECURITY_CODE as e,GIFT_CARD as c,ENCRYPTED_SECURITY_CODE_3_DIGITS as a,ENCRYPTED_SECURITY_CODE_4_DIGITS as s}from"../constants.js";var r=(r,d,i,o)=>{const n={...r},u={};switch(i){case"ach":case c:break;default:if(o===e)u[a]=d.get("creditCard.securityCode.contextualText.3digits"),u[s]=d.get("creditCard.securityCode.contextualText.4digits");else{const e=`creditCard.${t[o]}.contextualText`,c=d.get(e);c!==e&&(u[o]=c)}}return Object.keys(u).length&&(n.contextualTexts=u),n};export{r as default}; //# sourceMappingURL=addContextTranslations.js.map