CyberSource SiteGenesis Controllers LINK Cartridge 3DS2
CyberSource SiteGenesis Controllers LINK Cartridge 3DS2
1
Table of Contents
1. CyberSource Cartridge Overview....................................................................................................................2
2. Payer Authentication.......................................................................................................................................2
Payer Authentication Service..........................................................................................................................6
3. Change Logs....................................................................................................................................................8
4. Support French Processor..............................................................................................................................11
The CyberSource package contains four cartridges. A core cartridge (int_cybersource) that contains core API
integrations, including the building and handling of API requests, and parsing responses into objects usable by
the storefront. The two legacy architecture cartridges (int_cybersource_pipelines,
int_cybersource_controllers) each contain sets of wrappers that connect the core code to their respective
SFCC platforms. Version 18.1 and higher of the CyberSource cartridge package adds a fourth cartridge
(int_cybersource_sfra/ LINK_cybersource), which combines a modified version of the core code that exists in
the int_cybersource, along with the necessary hooks, extensions, and wrappers to connect this code to the
SFRA storefront.
2. Payer Authentication
The CyberSource LINK Cartridge 19.3.0 provides support for the latest 3D Secure 2.x specification. Upgrading
your Payer Authentication integration from the legacy 3D Secure 1.0 specification to 2.x will allow for better
authentication rates from issuers and meet PSD2 regulatory requirements for Strong Customer Authentication
(SCA) in Europe.
The following is a high-level architectural diagram of how the Payer Authentication integration works:
2
Implementation of 3DS2.x
<Reference Generic section on CyberSource LINK Cartridge Version 19.3.0 integration guide document >
Template – summary.isml
Below changes are generic for Secure Accpetance/Klarna_credit/Device fingerprint
3
{dw.order.PaymentMgr.getPaymentMethod(paymentInstr.paymentMethod).ID==CybersourceConstants.METHOD_SA_IFRAME}
">
<isset name="summaryaction" value="${URLUtils.https('COSummary-SubmitOrder')}" scope="page"
/>
<isset name="isIFrame" value="${true}" scope="page" />
<iselseif condition="$
{CybersourceConstants.KLARNA_PAYMENT_METHOD.equals(dw.order.PaymentMgr.getPaymentMethod(paymentInstr.payment
Method).ID)}" >
<isset name="klarnarequired" value="${true}" scope="page"/>
</isif>
</isloop>
</isif>
<isif condition="${!empty(LineCntr)}">
<isreportcheckout checkoutstep="${5}" checkoutname="$
{'OrderSummary'}"/>
.....
. . . <existing code>. . .
....
<iscomment>RENDER COUPON/ORDER DISCOUNTS</iscomment>
<isloop items="${LineCntr.couponLineItems}"
var="couponLineItem" status="cliloopstate">
4
....
. . <existing code>. .
....
<td class="item-total">
<isif condition="$
{couponLineItem.applied}">
<span class="coupon-applied">$
{Resource.msg('summary.applied','checkout',null)}</span>
<iselse/>
<span class="coupon-not-applied">$
{Resource.msg('summary.notapplied','checkout',null)}</span>
</isif>
</td>
</tr>
</isif>
</isloop>
<isloop items="${LineCntr.priceAdjustments}"
var="priceAdjustment" status="cliloopstate">
6.Update with below section for Klarna/Secure acceptance Iframe and device fingerprint and cardinal script related
changes
<div class="order-summary-footer">
<div class="place-order-totals">
<isordertotals p_lineitemctnr="${LineCntr}" p_showshipmentinfo="${false}"
p_shipmenteditable="${false}" p_totallabel="${Resource.msg('summary.ordertotal','checkout',null)}"/>
</div>
<isif condition="${!empty(klarnarequired) && klarnarequired}" >
<div id="klarna_container"></div>
<div id="auth_button"></div>
<input type="hidden" id="processorToken" name="processorToken" value=$
{session.privacy.processorToken}/>
</isif>
<isif condition="${!empty(pdict.Basket)}">
<form action="${summaryaction}" method="post" class="submit-order"
name="submitOrder">
<fieldset>
<div class="form-row">
<a class="back-to-cart <isif condition="${!
empty(klarnarequired) && klarnarequired}"> hide</isif>" href="${URLUtils.url('Cart-Show')}">
<isprint value="$
{Resource.msg('summary.editcart','checkout',null)}" encoding="off" />
</a>
<isif condition="${!empty(klarnarequired) &&
klarnarequired}" >
5
<input type="hidden" id="klarnaAuthToken"
name="klarnaAuthToken"/>
</isif>
<button class="button-fancy-large <isif condition="${!
empty(klarnarequired) && klarnarequired}"> hide</isif>" type="submit" name="submit" value="$
{Resource.msg('global.submitorder','locale',null)}">
$
{Resource.msg('global.submitorder','locale',null)}
</button>
</div>
<input type="hidden" name="$
{dw.web.CSRFProtection.getTokenName()}" value="${dw.web.CSRFProtection.generateToken()}"/>
<input type="hidden" id="DFReferenceId" name="DFReferenceId" />
</fieldset>
</form>
</isif>
</div>
<isif condition="${dw.system.Site.getCurrent().getCustomPreferenceValue('CsDeviceFingerprintEnabled')}">
<isinclude url="${URLUtils.url('CYBCredit-IncludeDigitalFingerprint')}"/>
</isif>
<isif condition="${isIFrame}">
<isinclude template="secureacceptance/secureAcceptanceIframeSummmary"/>
</isif>
<isif condition="${pdict.iscardinal }">
<isinclude template="cardinal/songbird"/>
</isif>
</isdecorate>
6
app.getView({Order: placeOrderResult.Order,
AcsURL:placeOrderResult.AcsURL,
PAReq:placeOrderResult.PAReq,
PAXID: placeOrderResult.PAXID,
authenticationTransactionID : placeOrderResult.authenticationTransactionID,
jwtToken:jwtToken,
orderstring :orderstring
}).render('cart/cardinalpayerauthentication');
}
}
7
COBilling.Start();
}
});
var order = "";
var jwtToken ="";
var iscardinal = false;
var selectedPaymentMethod = cart.getPaymentInstruments()[0].paymentMethod;
if(selectedPaymentMethod.equals(CybersourceConstants.METHOD_CREDIT_CARD) ||
selectedPaymentMethod.equals(CybersourceConstants.METHOD_SA_SILENTPOST)
|| selectedPaymentMethod.equals(CybersourceConstants.METHOD_VISA_CHECKOUT))
{
var jwtUtil = require('int_cybersource/cartridge/scripts/cardinal/JWTBuilder');
var cardinalUtil = require('int_cybersource/cartridge/scripts/cardinal/CardinalUtils');
jwtToken = jwtUtil.generateTokenWithKey();
var OrderObject = cardinalUtil.getOrderObject(cart);
order = JSON.stringify(OrderObject);
iscardinal = true;
}
3. Change Logs
9
payerAuthValidateReply response
(specificationVersion,directoryServerTransactionID)
are set to responseObject.
M int_cybersource/cartridge/scripts/ 1.CreateRequestData method modified for proper
secureacceptance/helper/ functioning of secure acceptance payment.
SecureAcceptanceHelper.js 2. In AuthorizeCreditCard method,
authenticationTransactionID from payer enroll
service session.privacy.process3DRequestParent
set to true are forwarded for 3DS 2.0 Redirection .
M int_cybersource/cartridge/scripts/ 1. In PayerAuthEnrollCCAuthRequest method
visacheckout/façade/VisaCheckoutFacade.js authenticationTransactionID from
payerAuthEnrollReply response is set to
responseObject required for cardinal script continue
function. 2.
processorTransactionId from payments.validated
event in cardinal script is passed to
payerauthvalidation service and null check for
PaRes value in PayerAuthValidationCCAuthRequest
method.
M int_cybersource/cartridge/scripts/ processorTransactionId from payments.validated
visacheckout/helper/VisaCheckoutHelper.js event in cardinal script is passed to
PayerAuthValidationCCAuthRequest method in
payerAuthValidation method.
A int_cybersource/cartridge/templates/default/ This isml contains script and required html dom
cardinal/songbird.isml elements and cardinal events configured for
initialising the cardinal script.
A int_cybersource/cartridge/templates/default/ This isml contains script and required html dom
cart/cardinalpayerauthentication.isml elements and cardinal events configured for
initialising the cardinal script and cardinal continue
function to start a transaction.
M int_cybersource/cartridge/templates/default/ cybersource-custom.js script file is added which
secureacceptance/ opens an SA-Iframe in the summary page.
secureAcceptanceIframeSummary.isml
M int_cybersource/cartridge/webreferences/ wsdl properties modified for updating the
CyberSourceTransaction.wsdl cybersource endpoint.
A int_cybersource/cartridge/webreferences/ new XSD file for updated cybersource endpoint
CyberSourceTransaction_1.155.xsd
M int_cybersource_controllers/cartridge/scripts/ In Process3DRequestParent method,
Cybersource.js processorTransactionId returned by cardinal
commerce script is fetched from
httpParameterMap in the request received and an
empty check is added for it and it is passed to
payerauthvalidation services based on the
paymentinstrument.
A configuration/PayerAuth-Meta.xml
10
4. Support French Processor
https://github.com/SalesforceCommerceCloud/link_cybersource/commit/
6f0b66980ce7e60ffb135b65b94d173fe6027c64
https://github.com/SalesforceCommerceCloud/link_cybersource/commit/
97d2fc51084bb9a88b66101e75b5bbc91329ba14
https://github.com/SalesforceCommerceCloud/link_cybersource/commit/
dc7dc3ef176673b1247b49d2f0e54fbe90d2be8b
11