paypalsandboxpaypal-adaptive-payments

Negative testing on paypal sandbox no more available?


Before 2 weeks ago we were able to simulate negative testing but actually we can't test error condition (pending, error) in PayPal sandbox, the AdaptivePayment API response give always COMPLETED.

We followed this guide to set correctly our sandbox account, There are some problems with the new Developer environment.

Can someone tell some tips for testing negative conditions?

Advance Thanks


Solution

  • In order to enable correctly Negative Testing:

    1. Navigate to the Profile > Settings page of your merchant’s test Business account (see Managing your Sandbox accounts for details).
    2. On the Profile tab, set Negative Testing to On.

    In order to trigger some particular error please check at this link the updated guide for Testing API error handling routines: https://developer.paypal.com/webapps/developer/docs/classic/lifecycle/ug_sandbox/#errors

    Use negative testing to trigger the following types of errors:

    You can force two types of API errors: those related to the transaction amount, and those not related to the amount.

    Note: Negative testing is available only in the Sandbox—you cannot force or simulate error conditions in the live PayPal environment. Negative testing can be used with Classic PayPal API versions 2.4 and later.