Payment Request
When authorising /payments or /preauths it is recommended to use paymentSession.
Make sure you are using Web SDK Version 0.0.34 (or higher).
From the Web SDK integration guide, you have completed the following:
- You do not need to include the amount or currency fields in your request body.
To make a transaction:
- Define the paymentConfiguration object for the payment or preAuth:
Ensure the details used when creating the paymentSession match the values set in the following configuration:
See below for more details on the parameters that create the paymentConfiguration object:
2. In a function, add the invokePaymentcall. This will invoke a payment using the paymentSession and paymentConfiguration
To invoke a preAuth, change the above code to .invokePreauth
3. To call the function (in step 2 above) to invoke the payment or preAuth, add the onclickattribute to the payment button <div>: <button id="submit-payment-button" onclick="handlePaymentButtonClick()"> Pay Now </button>