Customize the Hosted Payment Page
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}
- 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 site > Merchant Tools > Ordering > Payment Processors.
-
Select
site
> Merchant Tools > Ordering > Payment Methods.
- 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.
For example, hooks.json. -
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.
For example, CSCAdyenHostedPaymentPage.js.
-
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
Infocenter Retirement: On June 30, 2023, the Infocenter was retired, and documentation currently hosted on the Infocenter will be published to Salesforce Help, Commerce Cloud Developer Center, and Salesforce B2C Commerce Developer Documentation Resources. For more information, see the release note.