Other Processors
When testing you should never use real card details - each payment processor has their own test cards, the majority of which you can find below
PayPal Testing
The PayPal sandbox works a little differently from other gateways.
To test PayPal you must:
- Create a PayPal developer account https://developer.paypal.com/
- Create a sandbox account
- Get the API credentials / test credit card
Failure Scenarios
To test failure scenarios, a HTTP header needs to be passed to PayPal. This only applied to SANDBOX payments.
You can do this by setting the customer name:
first_name: PayPal-Mock-Response
last_name: PAYER_CANNOT_PAY
Where last name is the response you want to emulate.
Please refer to the following documentation:
https://developer.paypal.com/tools/sandbox/negative-testing/request-headers/ https://developer.paypal.com/docs/api/payments/v2/
Updated 11 days ago