Integration Guide

Table Of Contents
Contents
4
Chapter 5 Integrating Your Website Using API . . . . . . . . . . . . .39
Button Hosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Using the Button Manager API with Hosted Solution Checkout . . . . . . . . . . . . . . . 40
Using URL Returned in the Response (Recommended) . . . . . . . . . . . . . . . . 40
Using Form POST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Encrypting Buttons Using Public and Private Key . . . . . . . . . . . . . . . . . . . . 43
Example of Initiating Hosted SolutionCheckout . . . . . . . . . . . . . . . . . . . . . 43
BMCreateButton API Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
BMCreateButton Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
BMCreateButton Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
BMCreateButton Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Chapter 6 Testing Your Integration in Sandbox . . . . . . . . . . . .49
Creating a Preconfigured Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Testing Your Integration and Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Testing Your Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Testing Your Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Chapter 7 Order Processing . . . . . . . . . . . . . . . . . . . . . .55
Verifying Transaction Status and Authenticity . . . . . . . . . . . . . . . . . . . . . . . . 55
Validate Instant Payment Notification (IPN) . . . . . . . . . . . . . . . . . . . . . . . 55
Execute a GetTransactionDetails API Call. . . . . . . . . . . . . . . . . . . . . . . . 56
Fulfilling Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Chapter 8 Protecting Buttons by Using Encrypted Website Payments 57
Public Key Encryption Used by Encrypted Website Payments . . . . . . . . . . . . . . . 58
Setting Up Certificates Before Using Encrypted Website Payments. . . . . . . . . . . . . 58
Generating Your Private Key Using OpenSSL. . . . . . . . . . . . . . . . . . . . . . 59
Generating Your Public Certificate Using OpenSSL . . . . . . . . . . . . . . . . . . . 59
Uploading Your Public Certificate to Your PayPal Account . . . . . . . . . . . . . . . 59
Downloading the PayPal Public Certificate from the PayPal Website . . . . . . . . . . 60
Removing Your Public Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Using Encrypted Website Payments to Protect Your Payment Buttons . . . . . . . . . 61
Blocking Unprotected and Non-encrypted Website Payments . . . . . . . . . . . . . 62
Appendix A Optional API Operations. . . . . . . . . . . . . . . . . . .63