Test card processing
This article describes how to test card processing on your checkout page.
Before you start
Before you start, you need a checkout page that uses the Nets Easy test environment.
How to test
The Easy checkout page provides your customers with the option to pay by card. To test card payments on the checkout page, follow the steps below:
- Navigate to your checkout page
- Select "Pay by card"
- Add one of the sample card numbers from Number column in the table below
- Enter an expire date in the future
- Enter any 3 digits in the CVC field
- Enter any arbitrary name, address, and phone number in the address form
When using the sample cards in the test environment, some amounts have special meaning and will generate error codes or increase the API response times. This is not a bug, but a feature of the test environment so that you can test your system against error codes and delayed responses. See the following section for more information.
Amounts with special meaning
It is possible to test how your website behaves when Nets Easy returns various error codes or if the checkout process is delayed. The following amounts have a special meaning and changes the checkout behaviour when creating a new payment in the test environment:
The amount 1.XX will raise the error code XX. For example, if the property
order.amountis set to
133, the error code
33will be raised.
The amount 3.XX will delay the API response by XX seconds. For example, if the property
order.amountis set to
310, the reply from the checkout flow will be delayed by 10 seconds.
Note that amounts are specified in the lowest monetary unit for the given currency, without punctuation marks.
Sample credit cards
The following sample cards can be used in the test environment when testing card payments:
|Card type||Number||Expire date||CVC|
|Visa||4925000000000004||> today||Any 3 digits|
|Visa||4925000000000087||> today||Any 3 digits|
|Visa||4925000000000079||> today||Any 3 digits|
|Visa||4925000000000061||> today||Any 3 digits|
|MasterCard||5413000000000000||> today||Any 3 digits|
|MasterCard||5544330000000235||> today||Any 3 digits|
|Maestro||6761638084569584||> today||Any 3 digits|
|American Express||376206000000009||12/23||Any 4 digits|
Expire date can be any date from today and in the future. For the CVC (Card Verification Code), you can use three arbitrary digits (123 for example).
If the Create payment request contains
"charge":true, then charge with test card 4925000000000079 will not fail.