7

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

Amol M Kulkarni
  • 21,143
  • 34
  • 120
  • 164

2 Answers2

9

It is available, but you have to go to https://developer.paypal.com/developer/accounts

This option is not available at https://www.sandbox.paypal.com

Also you may need to link your account if you already created an account in the sandbox: https://devblog.paypal.com/sandbox-account-linking/

You need to find a screen that looks like this and click Profile

enter image description here

Then the option is available.

enter image description here

Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
  • Can you confirm whether it is possible to use negative testing with the adaptive payments api? none of the adaptive api operations appear in the table on [this page](https://developer.paypal.com/docs/classic/lifecycle/sb_error-conditions/) so i assume not?! – Mathew Sep 28 '16 at 19:11
  • I found a similar issue with 'DoReferenceTransaction' which doesn't seem to be supported – Simon_Weaver Jun 03 '17 at 00:14
  • 6
    Thank you, why is everything so difficult and convoluted with PayPal.... and why is documentation so difficult to understand.... – Emil Borconi Jun 22 '17 at 11:17
  • I have this setting enabled for my business account that is linked to my sandbox app, yet negative testing never works. Any other ideas? – Learner Mar 02 '19 at 13:09
3

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:

  • Errors that result from calling a PayPal API.
  • Errors related Virtual Terminal and the DoDirectPayment operation (verification and credit card validation 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.

PayPal_Federica
  • 916
  • 5
  • 7
  • 8
    pls what is the situation these days ? We cant find where to set the negative testing up in the sandbox account ... thanks ! – mojzis Aug 04 '16 at 18:22
  • 12
    can't find it either. definitely in sandbox with business account. EVERY run in I have with PayPal is a disaster. EVERY SINGLE TIME – Simon_Weaver Aug 14 '16 at 01:42