
Integrating iFrame in Your Website
Integrating iFrame
30
Integrating iFrame
Choose one of the following methods to integrate the compact payment form in your website:
HTML Integration
API Integration
IMPORTANT:For optimal performance, PayPal recommends that you load the iFrame asset
before other assets such as images and JavaScripts. If there are too many
assets running on your payment page when you load iFrame, the request for
the iFrame may not be placed or might get delayed. This may result in the
buyers seeing a blank iFrame.
HTML Integration
To manually integrate the compact payment form in your website, perform the following
steps:
1. Enter the iFrame tag at the location where you want the compact payment form to appear
on your website. For example:
<iframe name="hss_iframe" width="570px" height="540px"></iframe>
The allowable size for the compact payment form is 570 pixels in width to 540 pixels in
height.
2. Below is the iFrame code, add the hidden form that is populated with the appropriate
Hosted Solution variables (including the total amount to be paid) and specify the variable
TemplateD. For example,
<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="templat eD">
<input type="hidden" name="return"
value="https://yourwebsite.com/receipt_page.html">
</form>
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">
Komentarze do niniejszej Instrukcji