Skip to main content
Skip table of contents

Show Authorization Form

In this final step, the init method of the FlexCapture object must be called, sending as first parameter the DOM element where the Form elements will be injected. Likewise, the other parameters available in the method are:

  • reqCallback: Mandatory function that is executed at the end of the process, which includes the response.

  • startCallback: Optional function that is executed when the pay/send button is clicked.

  • errorOnPayCallback: Optional function that is executed when there is an uncontrolled error after clicking on the pay/send button.

CODE
function reqCallback(response) {
    console.log("-------Response-------");
    console.log(response);
}
function startCallback() {
    console.log("-------Click to pay-------");
}
function errorOnPayCallback() {
    console.log("-------Error at time of payment-------");
}

capture.init(document.querySelector('#demo'), reqCallback, startCallback, errorOnPayCallback);

Continue to Authorization Form Input Parameters ➡️

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.