Customize Customer Service Center to modify the behavior of your system's business
logic to render the hosted payment page.
-
Add your cartridge containing the code to be hosted.
- Use custom client logic to render the hosted payment page.
- Configure hosted payment pages. Use the hook with either
dw.csc.hosted_payment_pages.{payment_method_id} or
dw.csc.hosted_payment_pages.{payment_processor_id}
For example, see this
sample cartridge
-
Configure the hosted payment page with either
dw.csc.hosted_payment_pages.{payment_method_id} or
dw.csc.hosted_payment_pages.{payment_processor_id}.
-
Select .
-
Select .
-
On the Payment Method's page, select Yes to enable the
payment method.
-
In the Payments Method's detail section, select the payment processor from the
Payment Processor dropdown. For example, Adyen.
-
Click Apply.
-
To test the hosted payment page, click the test card number link. For example, Adyen Test Card Number.
-
To enable the hosted payment page endpoint in your cartridge: add the {"name":
"dw.csc.hosted_payment_pages.Adyen", "script": "./hpp/adyen.ds"}
- The hook extension ".Adyen" tells Customer Service Center that it's a hosted payment
page's payment method. Add with the ID as a normal payment method in Business
Manager.
- The script file specifies the controller and start node.
-
The controller function in Customer Service Center makes a call to prepare the hosted
payment page with the needed properties and redirects to a template in the cartridge. The
template contains the form that sends the prepared data to the hosted payment page.
-
From the hosted payment page, the payment success redirect is configured to the Confirm
node in the controller when the payment is successful. Similarly, you can configure other
controller endpoints for more hosted payment pages to Customer Service Center
interactions.
Salesforce Commerce Cloud Adyen Cartridge Examples