Study Guide
Table Of Contents
- PayPal Certified Developer Program Study Guide
- Contents
- List of Tables
- Online Payment Processing
- Internet Security and Fraud Prevention
- Why Every Business Should Be Concerned About Internet Fraud
- Liability for Internet Fraud
- Internet Fraud: What It Is and How It Happens
- Who Is at Risk for Online Fraud
- Reducing Exposure to Fraud
- What Banks and Card Associations Are Doing to Prevent Online Credit Card Fraud
- What PayPal Is Doing to Protect Your Business Against Fraud
- Disclosure and Compliance
- PayPal Fraud Protection Services
- Review Questions
- Getting Started With Account Setup
- API Credentials
- Name-Value Pair (NVP) API
- Express Checkout
- Direct Payment API
- Transactions
- Sandbox Testing
- Answers to Review Questions
- General Reference Information
- Glossary
- Index
PayPal Certified Developer Program Study Guide March 2008 129
Sandbox Testing
Testing Error Conditions
9
7. If the operation was successful, the response should include ACK set to Success, as
follows:
TIMESTAMP=2007%2d04%2d05T23%3a30%3a16Z
&CORRELATIONID=333fb808bb23
&ACK=Success
&VERSION=3%3e300000
&BUILD=1%2e0006
&TOKEN=EC%2d1NK66318YB717835M
&TRANSACTIONID=043144440L487742J
&TRANSACTIONTYPE=expresscheckout
&PAYMENTTYPE=instant
&ORDERTIME=2007%2d04%2d05T23%3a30%3a14Z
&AMT=19%2e95
&CURRENCYCODE=USD
&TAXAMT=0%2e00
&PAYMENTSTATUS=Pending
&PENDINGREASON=authorization
&REASONCODE=None
Testing Error Conditions
In default operation, the Sandbox mimics the live PayPal site as closely as possible, which
means an error can be replicated only by creating the exact conditions and sequence of events
to raise an error. This positive test environment is well suited for testing logic that follows the
typical error-free path; however, it can be difficult to raise error conditions and test logic to
handle errors.
The Sandbox can be set to allow negative testing, which enables you to simulate an error. You
can test against the following kinds of errors:
z Errors that result from calling a PayPal API.
z Address-verification and credit-card-validation errors that occur when using Virtual
Terminal or calling DoDirectPayment.
IMPORTANT: Negative testing is available only for PayPal APIs Version 2.4 and later.
To raise an error condition, you set a value in a field passed to an API or a value in a field
submitted to Virtual Terminal. The value triggers a specific error condition. Negative testing is
available only in the Sandbox; you cannot force or simulate an error on the live site.
You must create a Business test account and enable negative testing; otherwise, setting a value
in the API or transaction will not raise an error unless the error would be raised in the default
positive-test environment. To enable negative testing, set Test Mode to Enabled.
The following screen shows two Business accounts. The first test account enables negative
testing, and the second account disables negative testing.