HPP Samples and Demo

iFrame Sample HTML

HTML

                        
    <html>
        <head>
            <title>Merchant Frame Version</title>
        </head>
        <body>
            <h1>Merchant XYZ</h1>
            <p>Customer Checkout</p>
            <form action="https://<Hosted Payments Url>" method="post" target="hp_iframe" name="form_iframe">
                <input type="hidden" name="hp_merchant_id" value="your merchant id"/>
                <input type="hidden" name="hp_amount" value="12.00"/>
                <input type="hidden" name="hp_cmd" value="process"/> <!-- process or savepayment -->
                <input type="hidden" name="hp_method" value="ccard"/> <!-- ccard or echeck -->
                <input type="hidden" name="hp_txntype" value="sale"/> <!-- sale or auth or postauth -->
                <input type="hidden" name="hp_layout" value="frame"/> <!-- frame -->
                <input type="hidden" name="hp_frameborder" value="1"/> <!-- 1 or 0 -->
                <!-- save payment flags when hp_cmd is process -->
                <input type="hidden" name="hp_save_payment" value="0"/> <!-- 1:save or 0:not save, if it is 1 
                                                                             hp_save_customer or hp_customer_token is required-->
                <input type="hidden" name="hp_save_customer" value="0"/> <!-- 1:save or 0:not save -->
                <!-- save payment with existing customer -->
                <input type="hidden" name="hp_customer_token" value=""/>
            </form>
            <iframe name="hp_iframe" id="hp_iframe" width="300px" height="470px" scrolling="auto"
            frameborder="0" allowTransparency="true"></iframe>
            <script type="text/javascript">
            document.form_iframe.submit();
            </script></form>
        </body>
    </html>