Reputation: 33
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.
Upvotes: 3
Views: 1137
Reputation: 26056
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.
Upvotes: 2