Study Guide

Table Of Contents
Sandbox Testing
Testing Recurring Payments
9
140 March 2008 PayPal Certified Developer Program Study Guide
The request invokes the following response:
TIMESTAMP=2007%2d04%2d04T03%3a35%3a12Z&
CORRELATIONID=2499856319532&
ACK=Failure&
L_ERRORCODE0=15004&
L_SHORTMESSAGE0=Gateway%20Decline&
L_LONGMESSAGE0=This%20transaction%20cannot%20be%20processed%2e%20Please%20e
nter%20a%20valid%20Credit%20Card%20Verification%20Number%2e&
L_SEVERITYCODE0=Error&
VERSION=3%3e400000&
BUILD=1%2e0006
Testing Recurring Payments
On the live site, a billing cycle repeats after the actual specified time elapses; for example, a
one-month billing cycle takes one month to occur. You can simulate the elapsed time for a
billing cycle in the Sandbox when testing a recurring payments profile, in which case the
actual elapsed time is reduced. This is useful when you want to simulate a billing cycle
without waiting for the actual time to elapse.
To reduce the actual elapsed time, specify Day as the period. When you specify Day, the
billing cycle occurs every n minutes in the Sandbox, where n represents the frequency. For
example, if you specify 1 for the billing frequency and Day for the period when executing the
CreateRecurringPaymentsProfile API, the billing cycle occurs every minute when
testing in the Sandbox.
IMPORTANT: Reducing the elapsed time works only if the period is Day; other values do
not change the actual elapsed time.
Consider a scenario in which you want to simulate a one-month billing cycle after a three-
month trial, without waiting four months. In the Sandbox, you could specify the following
NVP parameters:
...&TRIALBILLINGPERIOD=Day&TRIALBILLINGFREQUENCY=3
...&BILLINGPERIOD=Day&BILLINGFREQUENCY=1...
In the Sandbox, the trial billing period would take approximately three minutes and the regular
billing cycle would occur approximately every minute. When you are ready to go live, you
would change the trial billing period and the billing period to Month.