{% extends "layout.twig" %}

{% set title = gateway.name~": Response" %}
{% block content %}

    {% if response.isSuccessful() %}
        <div class="alert alert-success">Congratulations, your request was successful!</div>
    {% elseif response.isRedirect() %}
        <div class="alert alert-info">Your request requires redirect to an off-site payment page.</div>

        <p><a href="{{ response.redirectUrl }}" class="btn btn-success">Redirect Now</a></p>
    {% else %}
        <div class="alert alert-error">Sorry, your request failed.</div>
    {% endif %}

    <p>The response object had the following to say:</p>

    <p><b>$request->isSuccessful()</b></p>
    <pre>{{ response.isSuccessful() ? "true" : "false" }}</pre>

    <p><b>$request->isRedirect()</b></p>
    <pre>{{ response.isRedirect() ? "true" : "false" }}</pre>

    <p><b>$request->getMessage()</b></p>
    <pre>{{ response.message }}</pre>

    <p><b>$request->getGatewayReference()</b></p>
    <pre>{{ response.gatewayReference }}</pre>

    <p><b>$request->getData()</b></p>
    <pre>{{ dump(response.data) }}</pre>

{% endblock %}

{% extends "layout.twig" %}

{% set title = gateway.name~": Response" %}
{% block content %}

    {% if response.isSuccessful() %}
        <div class="alert alert-success">Congratulations, your request was successful!</div>
    {% elseif response.isRedirect() %}
        <div class="alert alert-info">Your request requires redirect to an off-site payment page.</div>

        <p><a href="{{ response.redirectUrl }}" class="btn btn-success">Redirect Now</a></p>
    {% else %}
        <div class="alert alert-error">Sorry, your request failed.</div>
    {% endif %}

    <p>The response object had the following to say:</p>

    <p><b>$request->isSuccessful()</b></p>
    <pre>{{ response.isSuccessful() ? "true" : "false" }}</pre>

    <p><b>$request->isRedirect()</b></p>
    <pre>{{ response.isRedirect() ? "true" : "false" }}</pre>

    {% if response.redirectUrl is defined %}
        <p><b>$request->getRedirectUrl()</b></p>
        <pre>{{ response.redirectUrl }}</pre>
    {% endif %}

    {% if response.formData is defined %}
        <p><b>$request->getFormData()</b></p>
        <pre>{{ dump(response.formData) }}</pre>
    {% endif %}

    <p><b>$request->getMessage()</b></p>
    <pre>{{ response.message }}</pre>

    <p><b>$request->getGatewayReference()</b></p>
    <pre>{{ response.gatewayReference }}</pre>

    <p><b>$request->getData()</b></p>
    <pre>{{ dump(response.data) }}</pre>

{% endblock %}

Add getRedirectUrl() and getFormData() to example app display
Add getRedirectUrl() and getFormData() to example app display
