You have the possibility to check your PayPal integration by using the "Negative Testing" feature for the PayPal sandbox accounts. By enabling this feature with in the Contract Configuration App, it is possible for PayPal to answer with a specified error to check that the error processing is done correctly on the merchant's side. 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. The negative testing feature is only available for business accounts.
You can find a complete description of this feature on the dedicated PayPal's Website: https://developer.paypal.com/docs/classic/lifecycle/sb_error-conditions/
To enable this feature the merchant has to do 3 things:
1. Enable the "negative testing" on PayPal's side for the used sandbox-account. - Navigate to the Profile > Settings page of your merchant’s test Business account (see Managing your Sandbox accounts on PayPal for details). - On the Profile tab, set Negative Testing to On. 2. On optile's merchant portal page configure PayPal's adapter (by accessing the PayPal contract) with the NEGATIVE_TESTING property set to "true". 3. The Required negative answer could be programmed as a payment amount (i.e. 106.23 € - PayPal's error #10623).
After performing the first 2 steps, all transactions will be processed by the PayPal adapter once the "negative mode" is also enabled on the PayPal sandbox. Consequently, one could move to step 3, which describes how to trigger a desired error.
Please note that the "negative testing" should be enabled both on optile's side and on PayPal's side in order to be able to generate all errors resulting from all the tests.