Adding the Payment Form
Last updated
Last updated
Follow the below steps to add the payment form into your website using Clearent’s JavaScript SDK solution:
Add the div
provided to you into your code to contain the payment form.
Add the script
tag into the JavaScript SDK library.
Add the Global Callback Handlers into your code
Add the Global Callback Handlers into your code to receive the success or error messages from the JavaScript SDK. You can also add the Promises to receive the success or error messages alternate to avoid global callback handlers.
Call the init
method using the baseUrl
and pk
provided to you for your sandbox.
After into your website, the cardholders can enter the payment information using the form.