
31
Integrating iFrame in Your Website
Integrating iFrame
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="total" value="50.00">
<input type="hidden" name="partner" value="PayPalUK">
<input type="hidden" name="vendor" value="vendorname">
<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 36.
NOTE: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
Komentarze do niniejszej Instrukcji