Functions
paygreenjs
variable has many methods.
Example :
window.addEventListener("load", function () {
paygreenjs.setLanguage("en");
});
Name | Description |
---|---|
init | Init the payment form. Take ParamsType as parameter. See here |
unmount | Unmount the form. Accept a boolean parameter to unsubsribe events (default false ) |
useInstrument | Use an instrument to complete the actual payment flow. Accept an instrument ID as paramter. |
status | Give the actual state of flows |
submitPayment | Manually submit the payment form. |
focus | Change the actual field focus. Accept an enum as parameter pan | cvv | exp |
on | Listen an event. Accept two parameters, first the name of the event, second the callback |
off | Remove an event listener previoulsy attached |
Events | List all available events |
updateConsent | Change the actual state of the consent. Accept a boolean true/false parameter which represents if the user's consentment is implicit. (If you do not display the check box used to collect user consent for reuse of the instrument. Be sure to respect the CNIL recommendations regarding consent) |
setPaymentMethod | Change the payment method of the actual flow. Accepts string like the init params paymentMethod |
setLanguage | Change the current language of PGJS. Take language as param example: setLanguage("en") |
version | Show current version |
Updated about 2 months ago