User guide

Contents
4
Chapter 5 Integrating Your Website Using API . . . . . . . . . . . . .49
Button Hosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Using the Button Manager API with PayPal Pro Checkout . . . . . . . . . . . . . . . . . 50
Using URL Returned in the Response (Recommended) . . . . . . . . . . . . . . . . 50
Using Form POST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Encrypting Buttons Using Public and Private Key . . . . . . . . . . . . . . . . . . . . 53
Example of Initiating PayPal ProCheckout . . . . . . . . . . . . . . . . . . . . . . . 53
BMCreateButton API Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
BMCreateButton Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
BMCreateButton Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
BMCreateButton Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Chapter 6 Testing Your Integration in Sandbox . . . . . . . . . . . .57
Sandbox Account Credentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Testing Your Integration and Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Testing Your Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Testing Your Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Chapter 7 Order Processing . . . . . . . . . . . . . . . . . . . . . .63
Verifying Transaction Status and Authenticity . . . . . . . . . . . . . . . . . . . . . . . . 63
Validate Instant Payment Notification (IPN) . . . . . . . . . . . . . . . . . . . . . . . 64
Execute a GetTransactionDetails API Call. . . . . . . . . . . . . . . . . . . . . . . . 65
Fulfilling Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Chapter 8 Protecting Buttons by Using Encrypted
Website Payments . . . . . . . . . . . . . . . . . . . . . .67
Public Key Encryption Used by Encrypted Website Payments . . . . . . . . . . . . . . . 68
Setting Up Certificates Before Using Encrypted Website Payments. . . . . . . . . . . . . 68
Generating Your Private Key Using OpenSSL. . . . . . . . . . . . . . . . . . . . . . 69
Generating Your Public Certificate Using OpenSSL . . . . . . . . . . . . . . . . . . . 69
Uploading Your Public Certificate to Your PayPal Account . . . . . . . . . . . . . . . 69
Downloading the PayPal Public Certificate from the PayPal Website . . . . . . . . . . 70
Removing Your Public Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Using Encrypted Website Payments to Protect Your Payment Buttons . . . . . . . . . 71
Blocking Unprotected and Non-encrypted Website Payments . . . . . . . . . . . . . 72