2012

Table Of Contents
Testing Error Conditions
API Testing
7
48 April 2012 Sandbox User Guide
NOTE: If the trigger value is not a valid error code for the API being tested, positive testing
occurs for the request, which might result in another error occurring.
Negative Testing Using an Amount-Related Trigger Field
Consider an example that sets up testing for error 10623 for DoAuthorization, in which the
error code is specified in the AMT field:
METHOD=DoAuthorization
&TRANSACTIONID=O-1GU0288989807143B& AMT=106.23&
TRANSACTIONENTITY=Order&
VERSION=2.4&
USER=username&
PWD=password&
SIGNATURE=signature
The request invokes the following response:
TIMESTAMP=2007%2d04%2d04T03%3a10%3a19Z&
CORRELATIONID=447d121150529& ACK=Failure& L_ERRORCODE0=10623&
L_SHORTMESSAGE0=Maximum%20number%20of%20authorization%20allowed%20for%20the
%20order%20is%20reached%2e&
L_LONGMESSAGE0=Maximum%20number%20of%20authorization%20allowed%20for%20the%
20order%20is%20reached%2e& L_SEVERITYCODE0=Error&
VERSION=2%2e400000&
BUILD=1%2e0006
Here is an example that sets up testing for error 10606 for DoReferenceTransaction, in
which the error code is specified in the SOAP OrderTotal field:
Method=DoReferenceTransactionReferenceID=B-8GP9699385999711K&
PaymentAction=Authorization&PaymentType=Any& OrderTotal=106.06&
ItemTotal=106.06&
Quantity=1&
Amount currencyID="USD"=106.06&
BAUpdate
Version 3.0
REFERENCEID ReferenceID Specify the error code to trigger as all
digits in the field; for example, an ID of
10755 triggers PP API error code
10755.
DoReferenceTransac
tion
AMT OrderTotal Specify the error code to trigger as all
digits in a number with two digits to
the right of the decimal point; for
example, 107.55 triggers PP API error
code 10755.
AddressVerify Not supported for negative testing.
API Name NVP Field Name SOAP Element Description