Integration Guide
Table Of Contents
- Website Payments Pro Hosted Solution Integration Guide
- About This Guide
- Intended Audience
- Revision History
- Documentation Feedback
- Getting Started with Website Payments Pro Hosted Solution
- Integrating Your Website Using HTML
- Customising Your PayPal Payment Page
- Integrating iFrame in Your Website
- Integrating Your Website Using API
- Testing Your Integration in Sandbox
- Order Processing
- Protecting Buttons by Using Encrypted Website Payments
- Public Key Encryption Used by Encrypted Website Payments
- Setting Up Certificates Before Using Encrypted Website Payments
- Generating Your Private Key Using OpenSSL
- Generating Your Public Certificate Using OpenSSL
- Uploading Your Public Certificate to Your PayPal Account
- Downloading the PayPal Public Certificate from the PayPal Website
- Removing Your Public Certificate
- Using Encrypted Website Payments to Protect Your Payment Buttons
- Blocking Unprotected and Non-encrypted Website Payments
- Optional API Operations
- Moving from Website Payments Standard to Hosted Solution
- Error Messages
- Currency Codes
- Index
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