CyberSource Cartridge Storefront Reference Architecture Integration Guide
CyberSource Cartridge Storefront Reference Architecture Integration Guide
Cybersource
Storefront Reference Architecture
Cybersource Storefront Reference Architecture
Copyright
©2024 Cybersource Corporation. All rights reserved. Cybersource Corporation (“Cybersource”) furnishes this document and the
software described in this document under the applicable agreement between the reader of this document (“You”) and Cybersource
(“Agreement"“. You may use this document and/or software only in accordance with the terms of the Agreement.
Except as expressly set forth in the Agreement, the information in this document is subject to change without notice and should not
be interpreted as a guarantee or warranty by Cybersource. Cybersource assumes no responsibilityor liability for any errors that may
appear in this document. The copyrighted software that accompanies this document is licensed to You for use only in strict accordance
with the Agreement. You should read the Agreement carefully before using the software.
Except as permitted by the Agreement, you may not reproduce any part of this document, store this document in a retrieval system,
or transmit this document, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written
consent of Cybersource.
By accepting this document, you acknowledge and accept that you are responsible for and assume liability for the functionality,
maintenance and availability of your software and network. At all times, it is your responsibility to ensure the accuracy, technical
sufficiency and functionality of your software, network, plug-ins, configurations, applications, code, application program interfaces
(APIs), software development kits and all other technology (“Your Network”). You are responsible for Your Network’s ability to use
and/or access the Cybersource network, any Cybersource API and receive the benefit of Cybersource’s services. You are
responsible for all costs, fees, expenses and liabilities associated with Your Network’s ability to access and interface with the
Cybersource network and receive the benefit of Cybersource’s services. Cybersource will not be responsible or liable for loss or
costs associated with or that results from Your Network’s inability to connect to or process transactions on the Cybersource network.
Trademarks
Authorize.Net, eCheck.Net, and The Power of Payment are registered trademarks of Cybersource Corporation. Cybersource,
Cybersource Payment Manager, Cybersource Risk Manager, Cybersource Decision Manager, and Cybersource Connect are
trademarks and/or service marks of Cybersource Corporation. Visa, Visa International, Cybersource, the Visa logo, and the
Cybersource logo are the registered trademarks of Visa International in the United States and other countries. Bank America and the
Bank America logo are the registered trademarks of Bank of America in the United States and other countries. All other trademarks,
service marks, registered marks, or registered service marks are the property of their respective owners.
Confidentiality Notice
This document is furnished to you solely in your capacity as a client of Cybersource and as a participant in the Visa payments
system.
By accepting this document, you acknowledge that the information contained herein (the “Information”) is confidential and subject
to the confidentiality restrictions contained in Visa's operating regulations and/or other confidentiality agreements, which limit your
use of the Information. You agree to keep the Information confidential and not to use the Information for any purpose other than its
intended purpose and in your capacity as a customer of Cybersource or as a participant in the Visa payments system. The
Information may only be disseminated within your organization on a need-to-know basis to enable your participation in the Visa
payments system. Please be advised that the Information may constitute material non-public information under U.S. federal
securities laws and that purchasing or selling securities of Visa Inc. while being aware of material non-public information would
constitute a violation of applicable U.S. federal securities laws.
Contents
1. Introduction ................................................................................................................... 1
2. Cybersource SFRA Cartridge Architecture .......................................................................... 1
3. Install the Cartridge and Setup Workspace ....................................................................... 2
3.1. Install the Cartridge................................................................................................................................................. 2
3.2. Setup workspace ..................................................................................................................................................... 2
3.3. Build and Upload the code ...................................................................................................................................... 2
1. Introduction
• Description: Cybersource, a Visa solution, is the only global, modular payment management platform
built on secure Visa infrastructure with the payment reach and fraud insights of a massive $500B+
global processing network. You can find out more about what Cybersource does here.
• Categories: Payment Processing, Fraud Detection, Address Validation, Tax Computation
• Version: 24.1.1
• Compatibility: This version of the Cybersource cartridge is not compatible with versions of
SFRA higher than Release 7.0. This version can be found on the Master branch of the SFRA repository
in July 2024. This version is compatible with Salesforce B2C Commerce 21.2 release.
Contact
• Global Partner Solutions - CS: [email protected]
1
Cybersource Storefront Reference Architecture
NOTE: If you are using different IDE, refer respective developer guide to setup the workspace.
2
4. Configure the Cartridge
Prerequisite
If you are new to Cybersource, and would like to start using Cybersource Cartridge quickly, begin by signing
up for a Sandbox Account.
You will also need to create an API Key and API Shared Secret Key that you can use to authenticate
requests to our sandbox server. Follow same steps to generate Production keyand shared secret.
3
Cybersource Merchant ID Cybersource Merchant ID
CyberSource Merchant Key Cybersource SOAP Key. Follow the link for directions.
CyberSource Disable Debug Some trace information will be stored in the impex folder on the
logging server with the order ID as the name.
4
5. Configure the Payment method
5.1. Credit Card Authorization
Overview
The CC Auth service is integrated via the SFRA OOTB dynamically generated
app.payment.processor.cybersource_credit hook. The cybersource_credit hook is registered in the
hooks.json file with script ./cartridge/scripts/hooks/payment/processor/cybersource_credit. This script
acts as a wrapper to the core Cybersource Authorization code. Behind this wrapper, an API request is
constructed, sent to Cybersource, and the response parsed. In the case of a successful authorization
(response code 100), the hook returns a JSON object without an error. All other response codes received
result in an error being present in the return object, triggering the storefront to display an error
message, and not create the order. Actions taken when making the Authorization call are as follows:
1. Creates Cybersource authorization request using ship-to, bill-to, credit card data, and purchase total
data from the current basket.
2. If authorize Payer is configured, then make the authorize payer request. If not, ignore and continue
with the authorization request.
3. Create a credit card authorization request.
4. If DAV is enabled, set up DAV business rules, as needed.
5. Set up AVS if enabled.
6. Make the service call to Cybersource via the SOAP API.
7. If Delivery Address Verification is enabled, then:
a. Capture pertinent DAV result information & DAV Reason Code. Update shipping address if a
suggestion was returned and the ‘CS DAV Update Shipping Address with DAV Suggestion’ site
preference is enabled.
b. If DAV fails and DAV On Failure is set to ‘REJECT’, then exit immediately withrejection response
8. If DAV On Failure is set to ‘APPROVE’ and the DAV Reason Code is a failure code (not 100), then: a. Exit
immediately with declined or review response, as merchant defines
9. Capture pertinent AVS information.
10. Capture Fraud response in a session variable to be handled later.
11. Validate authorization reason code and set corresponding values, based on Authresponse code.
Implementation
Cybersource Cartridge supports the following ways of processing Credit Card
a. Secure Acceptance Hosted Checkout – iFrame
b. Secure Acceptance Redirect
c. Secure Acceptance Checkout API
d. Secure Acceptance Flex Microform
e. Direct Cybersource Payment API
Prerequsite
In the Business Manager, go to Merchant Tools > Ordering > Payment Methods andselect CREDIT_CARD.
And in CREDIT_CARD details, double check if Payment Processor = "CYBERSOURCE_CREDIT"
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_SecureAcceptance
and set values for the parameter:
6
SA_Redirect_AccessKey Secure Acceptance Redirect Access Key. Get the access key from
above step.
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_SecureAcceptance
and set values for the parameter:
Secure_Acceptance_Token_Create_End Secure_Acceptance_Token_Create_E
point ndpoint.
Secure_Acceptance_Token_Update_ Secure_Acceptance_Token_Update_E
Endpoint ndpoint.
7
CsCvnDeclineFlags Cybersource Ignore CVN Result (CVN).
Step 1: In Business Manager, go to Administration > Operations > Services and click on the
‘CybersourceFlexToken’ Credentials. Ensure the appropriate URL is set for the environment you are
configuring:
Test: https://apitest.cybersource.com/flex/v1/keys?format=JWT
Production: https://api.cybersource.com/flex/v1/keys?format=JWT
Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in “4.2:
Upload metadata” or import "metadata/sfra_meta/meta/Cybersource_SecureAcceptance.xml" in
Business Manager (Administration > Site Development > Import & Export)
Step 3: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_SecureAcceptance
and set values for the parameter:
Step 4: Navigate to ‘Administration > Global Preferences > Locales’ and ensure the local ‘en_US’ is
present. If not present, create a new local with the following information:
• Language Code: en
• Country Code: US
• XML Code: en-US
• ISO-3 Language: eng
• ISO-3 Country: USA
• Fallback Locale: English(en)
Once present, select the ‘en_US’ local, and navigate to the ‘Regional Settings’ tab. In the ‘Long Date
Pattern’ field, enter the sting: EEE, dd MMM yyyy HH:mm:ss
8
5.1.5. To Setup Direct Cybersource SOAP API
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import "metadata/sfra_meta/meta/Cybersource_SecureAcceptance.xml"
inBusiness Manager (Administration > Site Development > Import & Export)
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_SecureAcceptance
and set values for the parameter:
Upgrade to 3DS2.0
If you are currently using CYBS cartridge and would like to upgrade to 3DS2.0, please refer doc
CyberSource Storefront Reference Architecture LINK Cartridge 3DS2.docx under cartridge
documentation folder.
Proposed Approach:
Automatically retry the transaction adding Payer Auth Mandate Challenge (code 04) to force cardholder
SCA challenge. This flow should appear seamless to the card holder
Site Preferences:
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import "metadata/sfra_meta/meta/Cybersource_PayerAuthentication.xml"
inBusiness Manager (Administration > Site Development > Import & Export)
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >
Cybersource_PayerAuthentication and set values for the following parameters:
Field Description
Set the value for IsSCAEnabled to yes to use Strong Customer Authentication feature.
9
5.2. Apple Pay
5.2.1. Create a merchant identifier in Apple Portal
A merchant identifier uniquely identifies you to Apple Pay as a merchant who can accept payments. You
can use the same merchant identifier for multiple native and web apps. It neverexpires.
1. Go to Apple portal: https://help.apple.com/developer-
account/#/devb2e62b839?sub=dev103e030bb
2. In Certificates, Identifiers & Profiles, select Identifiers from the sidebar, then click theAdd button
(+) in the upper-left corner.
3. Select Merchant IDs, then click Continue.
4. Enter the merchant description and identifier name, then click Continue.
5. Review the settings, then click Register.
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > Apple Pay and set values for the
following parameters:
Field Description
5.3. PayPal
Cybersource Cartridge supports the following for PayPal:
a. PayPal Express
b. PayPal Credit
c. PayPal Billing Agreement
Prerequisite
Prior to development phase, there are a generic set of configurations that a development team needs to
account for. These configurations include:
1. PayPal developer account
2. PayPal sandbox account
11
3. Linking developer and sandbox account. On creating a PayPal developer account, get in touch with the
Cybersource team, share the developer account details and get the developers’ details configured on
Cybersource (BackOffice Configuration tool). Share the following keys with Cybersource:
• ClientID (paypalgateway_client_key) - Follow this link to generate.
• Secret (paypalgateway_secret_phrase) - Follow this link to generate.
• Merchant Account ID (paypalgateway_mid) – Follow this link to generate.
• Merchant email (paypalgateway_merchant_email) - Follow this link to generate.
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > Cybersource_Paypal
and set values for the parameter:
Field Description
Paypal Order Type The type of authorization to follow for PayPal orders. Select STANDARD for
Authorize & Capture or select CUSTOM for just Authorize
12
5.3.2. To setup PayPal Credit
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import "metadata/sfra_meta/meta/Cybersource_Paypal.xml" in Business
Manager (Administration > Site Development > Import & Export).
Field Description
Paypal Order Type The type of authorization to follow for PayPal orders. Select STANDARD for
Authorize & Capture or select CUSTOM for just Authorize
Paypal If this set to true, then address of buyer will be override by the shipping address
Address Override provided in shipping page
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > Cybersource_Paypal
and set values for the parameter:
Field Descri
ption
Billing Agreement Effectively enables or disables the PayPal Billing Agreement.
Paypal Order Type The type of authorization to follow for PayPal orders. Select STANDARD
for Authorize & Capture or select CUSTOM for just Authorize
Go to Merchant Tools > Site Preferences > Custom Preferences > Cybersource: Decision Manager
Configuration and set values for the parameter:
Field Description
Decision Manager Enable for Paypal Enable or disable Decision Manager for PayPal transactions.
13
5.4. Google Pay
Prerequisite:
Before proceeding to BM configuration, a Merchant Account needs to be created with Google.Please
follow the link to create the merchant account with google.
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import "metadata/sfra_meta/meta/Cybersource_GooglePay.xml" in
BusinessManager (Administration > Site Development > Import & Export).
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_GooglePay and set
values for the parameter:
Field Description
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import "metadata/sfra_meta/meta/Cybersource_VisaCheckout.xml" in
Business Manager (Administration > Site Development > Import & Export).
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_VisaCheckout and
set values for the parameter:
Field Description
cybVisaSdkJsLibrary Sandbox: https://sandbox-
assets.secure.checkout.visa.com/checkout-
widget/resources/js/integration/v1/sdk.js
Live: https://assets.secure.checkout.visa.com/checkout-
14
widget/resources/js/integration/v1/sdk.js
Live: https://secure.checkout.visa.com/wallet-services-
web/xo/button.png
15
To setup Decision Manager for Visa Checkout
Refer to this link if you want to setup Decision Manager feature for ”Visa Checkout”transactions.
Go to Merchant Tools > Site Preferences > Custom Preferences > Cybersource: Decision Manager
Configuration and set values for the parameter:
Field Description
CS Decision Manager Enable Enable or disable Decision Manager for Visa Checkout transactions.
16
Bank Transfer functionality is specific to PMs with sale and check status service.
SFRA makes the call to Cybersource Sale service to authorize the purchase amount. A secondary call is
made to check a Status service to determine result of the authorization, andthe subsequent Order creation
or failure.
Implementation
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import "metadata/sfra_meta/meta/Cybersource_BankTransfer.xml" in
BusinessManager (Administration > Site Development > Import & Export).
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_BankTransfer and
set values for the parameter:
Field Description
Step 3: Go to Merchant Tools > Ordering > Payments Methods > BANK_TRANSFER and setvalues for the
parameter:
Field Description
17
Field Description
Decision Manager Enable for Bank Enable or disable Decision Manager for Bank Transfer
Transfer transactions.
Table 19: Decision Manager for Bank Transfer
5.7. Alipay
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: upload metadata” or import "metadata/sfra_meta/meta/Cybersource_Alipay.xml" in Business
Manager (Administration > Site Development > Import & Export).
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > Cybersource_Alipay
and set values for the parameter:
Field Descripti
on
apPaymentType Alipay Payment Type for Domestic as well as International Payment
Step 3: Under 'Merchant Tools > Ordering > Payment Methods' Make sure the ‘ALIPAY’payment method
is enabled and configured to use the ‘CYBERSOURCE_ALIPAY’ paymentprocessor.
5.8. Klarna
Different countries and specific currencies could be configured to run Klarna with different Merchant
Id/Key specific to different sites. Functional flows would be similar on different sites.
Step 1: Merchant Id/Key could be configured at Merchant Tools -> Ordering -> Payment Methods ->
Klarna. In this release, Klarna has been supported for US, UK and Germany with different sites and
corresponding Merchant Ids/Key.
Step 2: On the Payment Methods page, Select the locale (language) you want to set up, thenselect the
Klarna payment method.
Step 3: Enter the merchantID and merchantKey field in Cybersource Credentials section of payment
method. If you leave these empty, the service will fall back to the values you entered in the CS core site
preferences.
Step 4: Select the appropriate bill-to language setting under the ‘Klarna’ custom attribute
group.
Step 5: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: upload metadata” or import "metadata/sfra_meta/meta/Cybersource_Klarna.xml" in Business
Manager (Administration > Site Development > Import & Export).
18
Step 6: Go to Merchant Tools > Site Preferences > Custom Preferences > Cybersource_Klarna
and set values for the parameter:
Field Description
Klarna JS API Path Klarna JS API Library Path
Klarna Decision Manager Required Enable or Disable Decision Manager for Klarna transactions.
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > Cybersource_Klarna
and set values for the parameter:
Field Description
Test Reconciliation ID for WeChat Pay Sets the status of the AP SALE such as settled, pending,
abandoned, or failed
19
6. Configure Features (OPTIONAL)
6.1. Tax Calculation
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_TaxConfiguration
and set values for the parameter:
Field Description
CS Tax Calculation Enabled Enable or disable Cybersource tax service
CS Tax Calculation No Nexus States List List of States to not charge tax in
CS Tax Calculation Default Product Tax Code Default tax code used when tax code is not set on
a product
CS Tax Calculation Purchase Order Acceptance Purchase order acceptance state code
City
CS Tax Calculation Purchase Order Acceptance Zip Purchase order acceptance zip code
Code
CS Tax Calculation Purchase Order Acceptance Purchase order acceptance country code
Country Code
CS Tax Calculation Purchase Order Origin City Purchase order origin city
CS Tax Calculation Purchase Order Origin Purchase order origin state code
StateCode
CS Tax Calculation Purchase Order Origin ZipCode Purchase order origin zip code
CS Tax Calculation Purchase Order Origin Country Purchase order origin country code
Code
20
CS Tax Calculation ShipFrom Country Code Ship from country code
Step 2: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import
"metadata/sfra_meta/meta/Cybersource_DeliveryAddressVerification.xml" in BusinessManager
(Administration > Site Development > Import & Export)
Step 3: Go to Merchant Tools > Site Preferences > Custom Preferences >
Cybersource_DeliveryAddressVerification and set values for the parameter:
Field Description
CS DAV Delivery Address Verification Enabled Enable or disable the DAV service.
CS DAV Update Shipping Address with DAV Update the shipping address with the CS
Suggestion suggestion, if found.
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >
Cybersource_DeliveryAddressVerification and set values for the parameter:
Field Description
CS AVS Decline Flags Leave empty to follow CS default decline flag strategy Enter flags separated by
commas to overwrite the default flag rules
21
6.4. Device Fingerprint
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” orimport "metadata/sfra_meta/meta/Cybersource_DeviceFingerprint.xml" in
Business Manager (Administration > Site Development > Import & Export)
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_DeviceFingerprint
and set values for the parameter:
Field Description
CS Device Fingerprint URL pointing to JS that generates and retrieves the fingerprint
ThreatMetrix URL
CS Device Fingerprint Time To Live Time, in milliseconds between generating a new fingerprint for
any given customer session
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_DecisionManager
and set values for the parameter:
Field Description
CS Decision Manager Enabled Enable or Disable Decision Manager for Credit card transactions.
Step 3: SFRA storefront versions 3.2.0 or lower contain a hook that interfere with this service.While the
hook manager has been updated in later versions of SFRA to prevent this, the CS cartridge is not yet
compatible with those storefront versions. As suggested by SFCC, manual removal of the following hook
from SFRA is required for this integration to function properly.
Remove
{
"name": "app.fraud.detection",
"script": "./cartridge/scripts/hooks/fraudDetection"
}
22
From app_storefront_base/hooks.json
Step 4: To enable Decision Manager Order Update Job: Decision Manager Order Update Job uses a REST
API to retrieve order decisions from Cybersource and update the order confirmation status in SFCC.
To Integrate this job into your site, follow the below steps:
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import “metadata/sfra_meta/jobs.xml” in Business Manager (Administration
>Operations > Import & Export)
Step 2: Navigate to ‘Administration > Operations > Job’. Select the Job ‘CyberSource:Decision Manager
Order Update’.
Step 3: Select the “Job Steps” tab. Select the Sites you want the Job to run on, from the
‘Scope’ button.
Field Description
SAFlexKeyID Key ID. Work with CS to generate this value or Follow link to generate keys.
SAFlexSharedSecret Shared secret. Work with CS to generate this value or Follow link to generate
secret.
Step 5: Navigate to the ‘Schedule and History’ tab and configure the frequency you would like
the job to run.
Step 7: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_DecisionManager
set values for the parameter:
CS Decision Manager Cybersource: Decision Number of hours the job will look back for
OrderUpdate Lookback time Manager new decisions. CS does not support lookbacks
over 24 hours. Do not set above 24
Secure Acceptance Flex Host Cybersource: Secure Host Name. CS can provide this value
Name Acceptance
Step 8: When moving to a production environment, the URL for the API call needs to be updated. This can
be done in:
Administration > Operations > Services > Service Credentials > ConversionDetailReport – Details
23
6.6. Payment Tokenization
Refer to this link to learn about Cybersource’s Token Management service.
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import "metadata/sfra_meta/meta/Cybersource_Tokenization.xml" in
Business Manager (Administration > Site Development > Import & Export)
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences >Cybersource_Tokenization and
set values for the parameter:
Field Description
SavedCardLimitFrame Provide the number of cards that can be saved in a certain time
period
SavedCardLimitTimeFrame Provide the number of hours that saved card attempts are counted
Field Description
CS Subscription Tokens Enabled Enable or Disable the option to generate subscription tokens
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make capture requests is in the form of a single function:
24
CCCaptureRequest(requestID, merchantRefCode, paymentType, purchaseTotal, currency)
This function can be found in the script ‘scripts/facade/CardFacade.js’. A working example of how to use
this function can be found in the CYBServicesTesting-CaptureService controller. You will first get an
instance of the CardFacade object, and make the call as follows:
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes. For detailed
explanations of all possible fields and values, reference the Officials Cybesource documentation for the
CCCapture Service.
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make capture requests is in the form of a single function:
VCCaptureRequest(requestID, merchantRefCode, paymentType, purchaseTotal, currency, orderid)
var VisaCheckoutFacade =
require('~/cartridge/scripts/visacheckout/facade/VisaCheckoutFacade');
var serviceResponse = VisaCheckoutFacade.VCCaptureRequest(requestID,
merchantRefCode, paymentType, paymentTotal, currency, orderid);
The resulting serviceResponse object will contain the full response object generated by the request. The
25
contents of this object will determine your logic in handling errors and successes.
6.8.3. PayPal
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import "metadata/sfra_meta/meta/Cybersource.xml" in Business Manager
(Administration > Site Development > Import & Export)
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make capture requests is in the form of a single function:
PayPalCaptureService(requestID, merchantRefCode, paymentType, purchaseTotal, currency)
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes.
26
paymentType Payment Type used for the Authorization
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make capture requests is in the form of a single function:
GPCaptureRequest(requestID, merchantRefCode, paymentType, purchaseTotal, currency)
var MobileCheckoutFacade =
require('~/cartridge/scripts/mobilepayments/facade/MobilePaymentFacade');
var serviceResponse = MobileCheckoutFacade.GPCaptureRequest(requestID,
merchantRefCode, paymentType, paymentTotal, currency);
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes.
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make auth reversal requests is in the form of a single function:
CCAuthReversalService(requestID, merchantRefCode, paymentType, currency, amount)
This function can be found in the script ‘scripts/facade/CardFacade.js’. A working example of how to use
this function can be found in the CYBServicesTesting-CCAuthReversalService controller. You will first get
an instance of the CardFacade object, and make the call as follows:
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes.For detailed explanations
of all possible fields and values, reference the Official Cybersource documentation for the CCAuthReversal
Service.
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make auth reversal requests is in the form of a singlefunction:
VCAuthReversalService(requestID, merchantRefCode, paymentType, currency, amount, orderid)
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes.
6.9.3 PayPal
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import "metadata/sfra_meta/meta/Cybersource.xml" in Business Manager
(Administration > Site Development > Import & Export)
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make auth reversal requests is in the form of a singlefunction:
PayPalReversalService(requestID, merchantRefCode, paymentType, purchaseTotal, currency)
var PayPalFacade =
require('~/cartridge/scripts/paypal/facade/PayPalFacade');
var serviceResponse = PayPalFacade.PayPalReversalService(requestID,
merchantRefCode, paymentType, amount, currency);
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes.
29
Parameter Name Description
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make auth reversal requests is in the form of a singlefunction:
GPAuthReversalService(requestID, merchantRefCode, paymentType, currency, amount)
var MobileCheckoutFacade =
require('~/cartridge/scripts/mobilepayments/facade/MobilePaymentFacade');
var serviceResponse = MobileCheckoutFacade.GPAuthReversalService(requestID,
merchantRefCode, paymentType, currency, amount);
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes.
30
currency Currency code (ex. ‘USD’)
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make credit requests is in the form of a single function:
CCCreditRequest(requestID, merchantRefCode, paymentType, purchaseTotal, currency)
This function can be found in the script ‘scripts/facade/CardFacade.js’. A working example of how to use
this function can be found in the CYBServicesTesting-CreditService controller. Youwill first get an instance
of the CardFacade object, and make the call as follows:
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes.For detailed explanations
of all possible fields and values, reference the Official Cybersource documentation for the CCCredit
Service.
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
31
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make credit requests is in the form of a single function:
VCCreditRequest(requestID, merchantRefCode, paymentType, purchaseTotal, currency, orderid)
var VisaCheckoutFacade =
require('~/cartridge/scripts/visacheckout/facade/VisaCheckoutFacade');
serviceResponse = VisaCheckoutFacade.VCCreditRequest(requestID,
merchantRefCode, paymentType, paymentTotal, currency, orderid);
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes.
6.10.3. PayPal
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import "metadata/sfra_meta/meta/Cybersource.xml" in Business Manager
(Administration > Site Development > Import & Export)
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make credit requests is in the form of a single function:
PayPalRefundService(requestID, merchantRefCode, paymentType, amount, currency)
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes. For detailed
explanations of all possible fields and values, reference the Official Cybersource documentation for the
CCCredit Service.
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make credit requests is in the form of a single function:
GPCreditRequest(requestID, merchantRefCode, paymentType, purchaseTotal, currency)
var MobileCheckoutFacade =
require('~/cartridge/scripts/mobilepayments/facade/MobilePaymentFacade');
serviceResponse = MobileCheckoutFacade.GPCreditRequest(requestID,
merchantRefCode, paymentType, paymentTotal, currency, orderid);
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes.
33
requestID Transaction ID obtained from the initial Authorization
6.10.5. BankTransfer
Step 1: Upload Cybersource metadata in Business Manager. Otherwise follow the steps mentioned in
“4.2: Upload metadata” or import "metadata/sfra_meta/meta/Cybersource.xml" in Business Manager
(Administration > Site Development > Import & Export)
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make credit requests is in the form of a single function:
BanktransferRefundService(requestID, merchantRefCode, paymentType, amount, currency)
var BanktransferFacade =
require('~/cartridge/scripts/banktransfer/facade/BankTransferFacade');
var serviceResponse = BanktransferFacade.BanktransferRefundService(requestID,
merchantRefCode, paymentType, paymentTotal, currency);
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes.
Step 2: Go to Merchant Tools > Site Preferences > Custom Preferences > CyberSource and Enter
CyberSource Merchant ID, CyberSource Merchant Key values.
Step 3: The interface you will use to make credit requests is in the form of a single function:
AliPayRefundService(requestID, merchantRefCode, paymentType, amount, currency)
This function can be found in the script ‘scripts/alipay/facade/AlipayFacade.js’. A working example ofhow
to use this function can be found in the CYBServicesTesting-CreditService controller. You will first get an
instance of the AliPayFacade object, and make the call as follows:
The resulting serviceResponse object will contain the full response object generated by the request. The
contents of this object will determine your logic in handling errors and successes.
You can copy the ‘scripts/hooks/modifyRequestExample’ script from this cartridge into your own to use
as a template for extending and modifying service request objects. Note, every hookmust return a valid
request object for the given service. It is recommended that you reference the Cybersource
documentation for details on the exact nature of any fields you wish to customize or add.
35
Step 2: The following hooks are available for you to define in this file:Modify Request hooks
36
7. Test and Go Live
Test your integration, and configure your live account, so you can start processing live transactions.
The sandbox simulates the live payment gateway. The sandbox never processes an actual payment. We
do not submit sandbox transactions to financial institutions for processing. The sandbox environment is
completely separate from the production environment, and it requires separate credentials. If you use
your production credentials in the sandbox or vice versa, you get a 401 HTTP error.
Use our test card numbers to make test payments: > The following test credit card numbers work only in
the sandbox. If no expiration date is provided, use any expiration date after today’s date. If the card
verification code is required and is not provided, use any 3-digit combination for Visa, Mastercard,
Discover, Diners Club and JCB; use a 4-digit combination forAmerican Express.
To manage your evaluation account, log in to the Test Business Center and do the following: -View test
transactions. - Access administrator users and access privileges. - Create roles with predefined access
permissions. - View reports.
Important Cybersource recommends that you submit all banking information and required integration
services in advance of going live. Doing so will speed up your merchant account configuration.
37
8. Upgrade Steps
Upgrade from 24.1.0 to 24.1.1:
Please follow the below steps to upgrade your cartridge version from 24.1.0 to 24.1.1.
1. Cartridge version 24.1.1 supports SFRA v7.0
2. Cybersource’s Storefront Reference Architecture Cartridge can be installed from Salesforce
Commerce Cloud’s marketplace link.
3. Upload metadata
-> Cybersource cartridge installed from App Exchange comes with metadata to import
38
9. Release Notes
Version 24.1.1 (July, 2024)
• Upgraded the cartridge to support SFRA v7.0.
• Fixed card duplication in tokenization flow.
39
Management.
• Added Transaction Type and Transaction Id for PayPal payment to support PayPal payment for
Salesforce Order Management.
• Fixed a Decision Manager issue for Visa Checkout.
• Fixed a Decision Manager issue for Credit card transactions.
• Upgraded the Cybersource WSDL version to 1.192.
40
• Removed inline styles and separate them out into css files.
• Replaced importpackage() with require().
• Replaced the deprecated webreference package with webreference2 package.
41
• Update 3DS to version 2.0 utilizing Cardinal Cruise.
42