2
votes

Helo all,

I want to test Direct Payment on Sandbox.

According to Paypal

"To test direct payment, you must first create a test business account in the Sandbox that is enabled for Website Payments Pro. You can then use the account to test credit and debit card payments using the DoDirectPayment API operation.

You can then simulate debit or credit card payments from cards that exist in the Sandbox. This example shows how to simulate a DoDirectPayment API operation using cURL to supply the NVP request values and to call DoDirectPayment.

To test Direct Payment in the Sandbox, you must first ensure that the Sandbox test account is associated with a credit card and enabled for Website Payments Pro."

I created an account,but I do not know how to enable it?
I don't know how to associate a credit card to this account.
I read that you have a list of credit card information which you can use for testing purposes.

http://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm

I have a function which calls the PayPal API but I get this response.
I used credit card number values from the link above.

TIMESTAMP-----2012%2d01%2d05T15%3a03%3a59Z
CORRELATIONID-----3aa27e27f0b91
ACK-----Failure
VERSION-----51%2e0
BUILD-----2278658
L_ERRORCODE0-----10001
L_SHORTMESSAGE0-----Internal%20Error
L_LONGMESSAGE0-----The%20transaction%20could%20not%20be%20loaded
L_SEVERITYCODE0-----Error
AMT-----200%2e00
CURRENCYCODE-----USD
DoDirectPayment failed: 

I used Express Checkout on Sandbox with success,so I have some idea about the PayPal NVP api.

  • Could some one point me in the right direction ?
  • Basically I don't know how to enable/activate my WPP account ?
  • How to associate a credit card to the WPP account ?
  • Or do I just use the credit card numbers and type from the link above ?
  • If so what about the CVV2 ,and the rest of the information like first_name, last_name billing_address ,etc ?
2

2 Answers

19
votes

Don't use the test card numbers; they're for Payflow Pro.
Use any Visa card number adhering the Luhn algorithm, with any expiry date and any CVV code (but preferably something 'neutral', such as 000).

E.g. VISA 16 digit

4539644852839411
4916985889534399
4532097446064367
4485179022551897
4539900745341886
4024007169148268
4024007136243697
4916509257154174
4916407734970124
4929371306022430
4485211356602036
4916165218627327
4716027688991769
4929468741933781
4485270162834753
4916077487725650
4916623903076903
4539664564248123
4725765424431181
4024007194632823

Expiry date: 05/2015
CVV/CSV code: 000

(Via DarkCoding)

Keep in mind that Sandbox doesn't connect to any external card processors, so if you need to test any error handling, you'd need to enable "Negative Review" on your Sandbox test account via https://developer.paypal.com/ and pass specific amounts / CVV codes to trigger a specific error code.
(For example, sending AMT=100.02 to trigger the 10002 API error code. See the Sandbox User Guide for more details.)

1
votes

Go into your Paypal Developer account and create users if there are none. Under the profile info for the user, you will find a Paypal generated credit card account number and expiration. The number generate there should produce the

ACK-----Success

value that is likely causing the problem.