Integration Guide

Table Of Contents
35
Integrating iFrame in Your Website
Integrating iFrame
3. Ensure that the target name matches the iFrame name, as highlighted in the example below:
<iframe name="hss_iframe" width="570px" height="540px"></iframe>
<form style="display:none" target="hss_iframe" name="form_iframe"
method="post"
action="https://securepayments.paypal.com/cgi-bin/acquiringweb">
4. Submit the form using JavaScript. For example:
<script type="text/javascript">
document.form_iframe.submit();
</script>
Example of Manual Integration
The complete example as per the above steps is as follows:
<iframe name="hss_iframe" width="570px" height="540px"></iframe>
<form style="display:none" target="hss_iframe" name="form_iframe"
method="post"
action="https://securepayments.paypal.com/cgi-bin/acquiringweb">
<input type="hidden" name="cmd" value="_hosted-payment">
<input type="hidden" name="subtotal" value="50">
<input type="hidden" name="business" value="HNZ3QZMCPBAAA">
<input type="hidden" name="paymentaction" value="sale">
<input type="hidden" name="template" value="templateD">
<input type="hidden" name="return"
value="https://yourwebsite.com/receipt_page.html">
</form>
<script type="text/javascript">
document.form_iframe.submit();
</script>
API Integration
To integrate the compact payment form in your website using the API, refer to “Using the
Button Manager API with Hosted Solution Checkout” on page 40.
N OTE: Use template=templateD for this type of integration.
There are two options in the response to initiate the Hosted Solution payment flow:
Using URL Returned in the Response
Using Form POST