I would like to test DoExpressCheckoutPayment without changing my code (otherwise I really have not tested the correct code). It seems I need to set the token to a specific error code, but that means changing the code and therefore not the right test, in my opinion.
Are there any alternative methods? I am using the NVP interface.
As recommended by the PayPal Sandbox User Guide (page 46), to test the API DoExpressCheckoutPayment, you can also set AMT(or PAYMENTREQUEST_0_AMT) to a specific value to cause an error condition.
DoExpressCheckoutPayment
AMT
PAYMENTREQUEST_0_AMT
:
, paypal , "Digital", PAYMENTREQUEST_0_AMT, 100.01 DoExpressCheckoutPayment
100.01
, PAYMENTREQUEST_0_AMT=106.23 . , .
PAYMENTREQUEST_0_AMT=106.23