How do you test for errors in PayPal sandbox mode.
I would like to test for payment declined, card expired, etc.
I am using the js method for payments as below, but can only find reference to the call of onError, which only gives answers to server or other errors not related to payments errors.
Yes but it is a question of how you invoke an error.
That page on not very clear on how to invoke failed payments in the first place to get the individual responses.
So… you went to that page, clicked on the relevant link at the bottom for the type of negative testing you want to do, read that, looked at the list of error codes, and came up with question marks?