Opening Payment Page by using a Command
You can open Payment Page by using the following JavaScript command:
EPayWidget.run(configObj, method);
here:
Here is an example of opening Payment Page by using the JavaScript command:- configObj is a JavaScript object which contains all the required payment parameters. For the list of all the parameters you can include in the object see Payment Page invocation parameters.
- method is HTTP request method. This is optional parameter. Supported values are GET (default) and POST.
EPayWidget.run( { payment_id: 'X03936', // Payment ID payment_amount: 2035, // Amount payment_currency: 'USD', // Currency project_id: 123, // project ID signature: 'YWb6Z20ByxpQ30hfTI.....' }, // Signature 'post')
In this example, the configObj object code is highlighted in bold and contains payment ID, payment amount, payment currency, project ID, and signature. For more information about signing payments, see Signature generation and verification
To set up the size of the page inserted in the iframe, pass the width and height values in the redirect_window_height and redirect_window_width parameters included in the payment_methods_options object in the request or Payment Page opening:
payment_methods_options={"redirect_window_height": 1200, "redirect_window_width": 1200}