Pagsmile JavaScript
By integrating our JS library, it is a safer and more convenient way to use our services
Add the pagsmile.js file to your website
It is not recommended to cache this js locally
Create Pagsmile-specific form components
Ensure that the following fields exist in the existing form, and add the data-checkout attribute according to the format.
Parameter | Required | Description |
---|---|---|
pagsmileCardNumber | yes | card number |
pagsmileSecurityCode | yes | security code |
pagsmileCardExpirationYear | yes | expiration year (4 digits) |
pagsmileCardExpirationMonth | yes | expiration month (2 digits) |
pagsmileCardholderName | yes | holder name |
pagsmileDocType | no | holder id type |
pagsmileDocNumber | no | holder id number |
And add the following two components to the original form.
Monitor form submission events
Call before the original website submission event: Pagsmile.createToken function, pass in the form element and update the above two hidden fields.
Bring the above two parameters and place an order
The example code can be obtained from here (right click -> save as)
Last updated