SFCC Cartridge
...
Mapping Samples
Adyen
3 min
overview as outlined in the validation overview, forter requests information about the payment credit card being used for an order including credit card expiration month credit card expiration year credit card bin credit card cvv result/response (i e "m" for "match", "x" for "no match") credit card avs result/response (i e "m" for "match" or "p" for "pass") note that this data does not need to be saved in your sfcc storefront but can still be passed to forter securely via the sfcc cartridge as forter retains pci level 1 compliance for all incoming server requests enabling additional adyen data in your cartridge in cases of adyen client side encryption https //docs adyen com/classic integration/cse integration ecommerce between submission and authorization, some of the above data points including credit card bin or card expiry may need to be manually enabled in your adyen admin panel this can be done by logging into your adyen admin panel and going to account => api urls => additional data in api response and toggling the following fields to be enabled raw acquirer result cardholder name card bin card summary expiry date mapping credit card auth response to the order ds file depending on your sfcc architecture (controllers, sfra, or pipelines), you will likely need to map the authorization response on the payment instrument to the order ds file function fortercreditcard(auth, cc) { var processorresponsecode = "", processorresponsetext = ""; // format the expiration month from 1 to 01, etc if (cc creditcardexpirationmonth tostring() length == 1) { var creditcardexpmonth = "0" + cc creditcardexpirationmonth tostring(); } else { var creditcardexpmonth = cc creditcardexpirationmonth tostring(); } this nameoncard = cc creditcardholder; this cardbrand = cc creditcardtype; if (cc creditcardnumber substring(0,6) indexof(' ') > 1) { this bin = session forms billing paymentmethods creditcard number value tostring() substring(0,6); } else { this bin = cc creditcardnumber tostring() substring(0,6); } this lastfourdigits = cc creditcardnumberlastdigits; this expirationmonth = card expirationmonth tostring(); this expirationyear = card expiryyear tostring(); this verificationresults = {}; this verificationresults avsfullresult = auth avsresultcode tostring(); this verificationresults cvvresult = auth cvcresultcode tostring(); this verificationresults authorizationcode = auth authorizationcode; this paymentgatewaydata = {}; this paymentgatewaydata gatewayname = "adyen credit"; // adjust based on your processor this paymentgatewaydata gatewaytransactionid = auth pspreference tostring(); // adyen 16 digit psp reference value processorresponsecode = auth(); processorresponsetext = auth exact message tostring(); this verificationresults processorresponsecode = processorresponsecode; this verificationresults processorresponsetext = processorresponsetext; }