Defining the return URLs depending on the payment result
Use the optional fields presented in the table below to create a customized payment form.
If no URL is specified in the form, the value populated in the Expert Back Office will be used.
Field name | Description | Format | Value |
---|---|---|---|
vads_url_cancel | URL to which the buyer will be redirected upon clicking on “Cancel and return to shop” before proceeding to the payment. | ans..1024 | E.g.: http://demo.com/cancel.php |
vads_url_error | URL to which the buyer will be redirected in case of a processing error on the payment gateway. | ans..1024 | E.g.: http://demo.com/error.php |
vads_url_refused | URL to which the buyer will be redirected in case of a declined payment after having clicked on “Return to shop”. | ans..1024 | E.g.: http://demo.com/refused.php |
vads_url_success | URL to which the buyer will be redirected in case of an accepted payment after having clicked on “Return to shop”. | ans..1024 | E.g.: http://demo.com/success.php |
Example of a payment form with configuration of a return URL depending on the payment result:
<form method="POST" action="https://secure.lyra.com/vads-payment/"> <input type="hidden" name="vads_action_mode" value="INTERACTIVE" /> <input type="hidden" name="vads_amount" value="3000" /> <input type="hidden" name="vads_capture_delay" value="0" /> <input type="hidden" name="vads_ctx_mode" value="PRODUCTION" /> <input type="hidden" name="vads_currency" value="978" /> <input type="hidden" name="vads_page_action" value="PAYMENT" /> <input type="hidden" name="vads_payment_config" value="SINGLE" /> <input type="hidden" name="vads_site_id" value="12345678" /> <input type="hidden" name="vads_trans_date" value="20191126101407" /> <input type="hidden" name="vads_trans_id" value="pm197W" /> <input type="hidden" name="vads_url_cancel" value="http://demo.com/cancel.php" /> <input type="hidden" name="vads_url_error" value="http://demo.com/error.php" /> <input type="hidden" name="vads_url_refused" value="http://demo.com/refused.php" /> <input type="hidden" name="vads_url_success" value="http://demo.com/success.php" /> <input type="hidden" name="vads_version" value="V2" /> <input type="hidden" name="signature" value="lZIHzigiwCc6+uLStp8I5DQnbSqXu63Jtfo6Saeq3Mc="/> <input type="submit" name="pay" value="Pay"/> </form>