Sandbox User Guide For Professional Use Only Currently only available in English. A usage Professional Uniquement Disponible en Anglais uniquement pour l'instant.
PayPal Sandbox User Guide © 2006 PayPal Inc. All rights reserved. PayPal and the PayPal logo are registered trademarks of PayPal Inc. Other trademarks and brands are the property of their respective owners. The information in this document belongs to PayPal Inc. It may not be used, reproduced or disclosed without the written approval of PayPal Inc. PayPal (Europe) Ltd. is authorised and regulated by the Financial Services Authority in the United Kingdom as an electronic money institution.
Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Organization of This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Notational Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Revision History . . . . . . . . .
Contents Generating a Credit Card Number to Test PayPal Account Optional . . . . . . . . . . 26 Signing Up for Website Payments Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Chapter 4 Testing PayPal Website Features . . . . . . . . . . . . . . 27 Website Payments with Buy Now Button . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Encrypted Website Payments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Testing Payments with Buy Now Button . . . . . . . . . . . . .
List of Tables Table P.1 Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Table 1.1 Differences between Developer Central, Sandbox, and Live PayPal . . . 13 Table 3.1 German, Canadian, and UK Test Bank Account Information Table 5.1 Location of PayPal WSDL and XSD Files . . . . . . . . . . . . . . . . . 33 Table 5.2 API Overview by Business Function and Service Endpoint . . . . . . . . 35 June 2006 . . . . . . .
List of Tables 6 June 2006
List of Figures Figure 2.1 Login for PayPal Developer Central . . . . . . . . . . . . . . 18 Figure 2.2 Sandbox Email Client . . . . . . . . . . . . . . . . . . . .
List of Figures 8 June 2006
Preface This Document This document, which describes the PayPal virtual test environment called the Sandbox, replaces the PayPal Sandbox User Guide issued December, 2005. Intended Audience This document is written for merchants and developers who want to test their PayPal-based applications before using them in production.
Preface Revision History Typeface How Used serif italics A document title. A term being discussed or defined. For example: A file is a readable or writable stream of characters … Boolean values (not keywords). For example: The function returns true if it encounters an error. monospaced Pathnames or file names that appear in body text frames. Code-related names that appear in body text frames. Such names are used for functions, callbacks, arguments, data structures, and fields.
Preface Revision History TABLE P.1 Revision History Date Description June 2006 Correction of Sort Code necessary to test UK accounts in Sandbox. Proper Sort Code is 609204. December 2005 Miscellaneous corrections.
Preface Revision History 12 June 2006
1 Overview to the PayPal Sandbox The PayPal Sandbox is a self-contained environment within which you can prototype and test your PayPal applications. Before moving any PayPal-based application into production, you should test the application in the Sandbox to ensure that it functions as you intend and within the guidelines and standards set forth by the PayPal Developer Network (PDN). The Sandbox is for use by developers of business solutions.
Overview to the PayPal Sandbox At a Glance: Differences between the Sandbox and Live PayPal TABLE 1.1 Differences between Developer Central, Sandbox, and Live PayPal PayPal Developer Central and Sandbox 14 Live PayPal Website and API Service Developer Central: URL and site logo in upper left corner https://developer.paypal.com Site logos in upper left corner https://www.sandbox.paypal.com https://www.paypal.com API Servers (SOAP service endpoints) https://api.sandbox.paypal.com/2.0/ https://api-aa.
Overview to the PayPal Sandbox At a Glance: Differences between the Sandbox and Live PayPal TABLE 1.1 Differences between Developer Central, Sandbox, and Live PayPal PayPal Developer Central and Sandbox Live PayPal Website and API Service Fraud detection Fraud detection is not enabled for the Sandbox. Full protection through PayPal’s fraud detection Digital certificates After you request digital certificates for use with the PayPal Web Services API, the Sandbox automatically generates them.
Overview to the PayPal Sandbox At a Glance: Differences between the Sandbox and Live PayPal 16 June 2006
2 Accessing the PayPal Sandbox and Email To access the PayPal Sandbox, sign up for a Developer Central account. After becoming a member of PayPal Developer Central, you access the Sandbox either directly or by launching it after you log in to Developer Central. Depending on the PayPal feature you want to test with an application, you need to set up different types of PayPal accounts: PayPal Personal, Business, or Premier account. See “Planning the Types of Test Accounts You Need” on page 21.
Accessing the PayPal Sandbox and Email Managing Your Developer Central Profile FIGURE 2.1 Login for PayPal Developer Central Launching the Sandbox To launch the Sandbox: 1. Log in to Developer Central. 1. Click the Sandbox tab. 2. Select the test user that represents the feature you want to test. 3. Click Launch Sandbox.
Accessing the PayPal Sandbox and Email Sandbox Email Sandbox Email When certain kinds of transactions occur in the live PayPal system, PayPal sends email messages to participants in the transaction. From these email messages, the recipient or initiator of an event or transaction can verify that the event took place and that the monetary amounts associated with the event are correct. With the live PayPal system, email messages are sent to the real email addresses of the participants.
Accessing the PayPal Sandbox and Email Sandbox Email 20 June 2006
3 Setting up Test Users Depending on the business application you are developing and testing, you need different types of test accounts. There are two types of test accounts: Personal and Business. Planning the Types of Test Accounts You Need Determine the types of test accounts you need to test the applications you are developing. In addition, determine the number of different accounts you need. You might need several different Personal or Business PayPal test accounts to test your application.
Setting up Test Users Managing Test Accounts z To create a new account, click the Create Account link in the upper left corner of the list of accounts. z To work with the account, select the account by clicking the radio button associated with it on the left. You can start the Sandbox for the selected account by clicking Launch Sandbox. When you logged in to Developer Central, you might have set the Log me in automatically checkbox to allow direct access to https://www.sandbox.paypal.
Setting up Test Users Adding a Bank Account 5. Next, enter account information for the business represented by the new PayPal account. 6. Click Continue when done. 7. Enter the user information for the new test user’s PayPal Sandbox account. Click the Sign Up button when done. 8. Click Continue. This takes you to the My Account > Overview tab. Confirming an Email Address To confirm an email address for a test user: 1. Log in to Developer Central. 2. Click the Email tab. 3.
Setting up Test Users Adding a Bank Account TABLE 3.
Setting up Test Users Adding a Credit Card Account 3. Under the Financial Information header, click the Bank Accounts link. 4. In the Bank Account window, click Add. 5. In the Add Bank Account window: – Enter a fictitious bank name. Using the automatically generated bank account number as the name of the bank will make that account number visible to you for use in testing later. – Except for UK or German test bank accounts, leave all other automatically generated information as is.
Setting up Test Users Signing Up for Website Payments Pro 1. Log in to the Sandbox as the test user. 2. Navigate to My Account > Profile. 3. Under the Financial Information header, click the Credit Cards link. 4. In the Credit Cards window, click the Add button. 5. In the Add Credit Card window, leave the automatically generated information as is. 6. Make a note of the credit card number for your use in later testing. 7. Click Add Credit Card.
4 Testing PayPal Website Features You can use the PayPal Sandbox to test your website features that do not rely on the PayPal Web Services API. The website features you can learn, develop, or test in the Sandbox are as follows: z Website Payments with Buy Now Buttons: Use the Sandbox to test accepting PayPal as a payment mechanism on a website. For more information, refer to https://www.paypal.com/pdn-item.
Testing PayPal Website Features Instant Payment Notification (IPN) For information about what EWP is and how to use it, see the PayPal Website Payments Standard Integration Guide. For information about using the PayPal SDK console to generate EWP HTML, see the PayPal SDK Guide. Testing Payments with Buy Now Button For the purposes of testing the Buy Now button, your web page does not need to be published to your web server. It can reside on your local hard drive.
Testing PayPal Website Features Verifying a Test Refund z PayPal Order Management Integration Guide at https://www.paypal.com/en_US/pdf/PP_OrderManagement_IntegrationGuide.pdf ipn_test Variable The Sandbox sets the variable ipn_test with a value of 1 in the HTTP response back to your IPN page. The purpose of this variable is to clearly differentiate between live and Sandbox IPN, so you can write your processing programs to work with either live or Sandbox IPN.
Testing PayPal Website Features Transferring Funds to a Test Account – Launch the Sandbox as your test buyer or seller account and navigate to My Account > Overview to see the transaction in your Recent Activity. Transferring Funds to a Test Account Before a test user can exchange funds with other test users in transactions, you must manually transfer funds to the test user’s account. To transfer funds to a test user’s PayPal account: 1.
Testing PayPal Website Features Sending Funds to a Seller Sending Funds to a Seller To purchase goods or services, a PayPal user must send funds to a seller. In the PayPal Sandbox, you can simulate the actions of a buyer by manually initiating the payment of funds. You must use a Personal account that represents a paying customer. To send funds from one test user to another: 1. Log in to Developer Central, click the Sandbox tab, select the desired test user, and click Launch Sandbox. 2.
Testing PayPal Website Features Billing A Customer 1. After logging into Developer Central, launch the Sandbox as the test user requesting the funds. 2. Navigate to the Request Money tab. 3. On the Request Money page, enter the email address (PayPal login name) for the test user being billed in the Recipient’s Email box. 4. Enter the billed amount in the Amount box. 5. Select the currency for the funds in the Currency drop-down list. 6.
5 Testing PayPal Web Services API Applications This chapter describes using the Sandbox for testing your PayPal Web Services API applications: z Requesting and installing a PayPal-issued digital certificate and private key for use with the Sandbox z The PayPal SDK console z API Overview by business function and service endpoint This chapter does not contain step-by-step procedures for every aspect of your own software environment for using the Sandbox or the live PayPal Web Services API.
Testing PayPal Web Services API Applications Requesting API Credentials from PayPal Requesting API Credentials from PayPal API credentials consist of the following: z API username that identifies you to the PayPal Web Services API service z API password for that API username z PayPal-issued digital certificate. To ensure security for your customers and your business, a public certificate and private key issued by PayPal are required for use of the PayPal Web Services API, SDK, and Sandbox.
Testing PayPal Web Services API Applications Testing with the PayPal SDK Console Follow the remaining steps begining with Step 4. Testing with the PayPal SDK Console The PayPal SDK includes a self-contained console for testing basic features of the SDK. With the console, you can make actual PayPal Web Services API calls and is a good tool for checking that your environment is properly configured and for learning the API structures and elements.
Testing PayPal Web Services API Applications API Overview By Business Function and Service Endpoint TABLE 5.2 API Overview by Business Function and Service Endpoint Business Function 36 SOAP Request/Response Service Endpoint: Production Service Endpoint: Test GetTransactionDeta ils API GetTransactionDetailsRequ api.paypal.com/2 est .0/ GetTransactionDetailsResp onse api-aa.sandbox.paypal.com/2.0/ MassPay API MassPayRequest MassPayResponse api.paypal.com/2 .0/ apiaa.sandbox.paypal.com/2.
6 Technical Support Depending on the PayPal product you need assistance with, contact either Customer Service or Developer Technical Support. Contacting Customer Service for Live PayPal Website Help Use PayPal Help to find an answer to any problem you might encounter with live products such as Website Payments or Instant Payment Notification. To contact Customer Service about issues with the Live PayPal website: 1. Go to https://www.paypal.com/ 2. Click Help in the upper left corner of the page. 3.
Technical Support Contacting Developer Technical Support for API Help 4. Complete the form.
Index A E adding a bank account 23 API certificate 34 password 34 username 34 API Access link for username, password, and certificate 34 API server for Sandbox 14 api.paypal.com 35, 36 api-aa.sandbox.paypal.com 35, 36 Authorization & Capture 35 eBL 33 eBLBaseComponents.
Index W PayPalSvc.