2
votes

I want to simulate bank refusal(PayPal sandbox account) when attached card does not have enough money in it.

PayPal account with 0 balance. Card with balance of 300 money(PayPal have no idea it is so). I make payment, exceed this amount, PayPal refuses payment after I click "Pay Now".

Currently if test card is attached to PayPal account, it does have unlimited funding.

Of course, one of options is to create/use LIVE account on LIVE environment with card that have almost no balance and buy product that exceeds balance, but I would not prefer that.

Any experiences/ideas?

Thank you.

1
Read teh sandbox docs. PayPal uses predetermined fake card#s to generate errors for testing.geewiz

1 Answers

1
votes

Take a look at the PayPal documentation: Testing Error Conditions with Negative Testing

You basically enable the negative testing on your sandbox account, and then you can trigger specific error codes by sending the amount that matches the error code.

For example, to trigger error code 10755 you would use 107.55 for the amount in your payment request.