cancel
Showing results for 
Search instead for 
Did you mean: 

Sandbox Negative Testing of insufficient funds

Highlighted
Contributor

Sandbox Negative Testing of insufficient funds

I am trying to simulate a payment with a sandbox account which contains a test credit card containing insufficient funds. I have followed the steps https://developer.paypal.com/docs/api/overview/#create-sandbox-accounts to create a sandbox account however, this does not allow me to set a balance on the credit card specifically.

 

This method only allows the PayPal balance to be modified. How do I create a credit card in the sandbox with insufficient funds?

 

The following link describes how to enable negative testing on my account but I can't seem to find this setting anywhere - https://developer.paypal.com/docs/classic/lifecycle/sandbox/sb-error-conditions/#enable-negative-tes...

 

 

3 REPLIES 3
Highlighted
Moderator

Re: Sandbox Negative Testing of insufficient funds

Hello,

"how to enable negative testing on my account"

As you mentioned, the following link contains details on how to enable negative testing on a sandbox account, although whilst reading the instructions I didn't find them very clear, so I'll clarify below and also file a documentation update request to make this information clearer to understand.

https://developer.paypal.com/docs/classic/lifecycle/sandbox/sb-error-conditions/#enable-negative-tes...

1. Login to your PayPal Developer account
2. Click on "Accounts", under the "Sandbox" column
3. Locate the sandbox account for which you wish to enable negative testing and click on the three dots to the right of the email address
4. A menu will appear, click on "view/edit profile"
5. The profile page will be displayed, click on the "Settings" tab and the second option will be "Negative Testing".
6. Change the button toggle to "on" to enable negative testing.

Hope this makes it easier to understand.

Thanks !

Was my post helpful? If so, please give me a kudos!
Highlighted
New Community Member

Re: Sandbox Negative Testing of insufficient funds

I followed exactly these instructions but the transactions keep on succeeding on the new checkout. I even tried to meddle with the buyer account to remove all fundings but the UI doesn't allow me to remove either account nor credit card (which was recommended in another thread). More over, when creating a new buyer test account, it forces you to have a bank account, a discover card or paypal card so there is no way to start off with an account without funding. PayPal is being so inconsistent and unsatisfactory in whatever they do.

Highlighted
Contributor

Re: Sandbox Negative Testing of insufficient funds

Hi Justin

 

Thanks for the steps provided. I have successfully turned on Negative Testing on my account.

 

Regarding my second question of my original post, "How do I create a credit card in the sandbox with insufficient funds?", I am trying to simulate a payment by credit card with insufficient funds to trigger the OnError handler. I am using the PayPal JavaScript SDK.

 

Regards,

Jashin