On this page
Testing
Last updated on
27 January 2020
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
- Review sandbox and test credit card info in the Testing using the API sandbox document.
- See Sandbox Test Values for the latest test values available.
- To test your implementation, add a product to your cart, proceed to checkout and enter a credit card. We recommend using a sandbox account for this before attempting to go live.
If you have issues with your implementation, view the Drupal.org issue queue for this module https://www.drupal.org/project/issues/commerce_square?categories=All. If you cannot find another issue that matches yours, feel free to open a support request, bug, or another issue type.
Test card numbers
| Brand | Number | CVV | Verification Code |
|---|---|---|---|
| Visa | 4111 1111 1111 1111 | 111 | N/A |
| Visa EU | 4310 0000 0000 0007 | 111 | 123456 |
| MasterCard | 5105 1051 0510 5100 | 111 | N/A |
| MasterCard EU | 5500 0000 0000 0004 | 111 | 123456 |
| Discover | 6011 0000 0000 0004 | 111 | N/A |
| Diners Club | 3000 0000 0000 04 | 111 | N/A |
| JCB | 3569 9900 1009 5841 | 111 | N/A |
| American Express | 3400 000000 00009 | 1111 | N/A |
| China UnionPay | 6222 9888 1234 0000 | 123 | N/A |
Generate other errors
| Error state | To reproduce |
|---|---|
| Card CVV incorrect | Specify 911 as the CVV in the payment form. |
| Card postal code incorrect | Specify 99999 as the postal code in the payment form. |
| Card expiration date incorrect | Specify 01 as the expiration month and 40 as the expiration year in the payment form. |
| Card declined | Specify 4000000000000002 as the card number. |
| Card on file auth declined | PAN: 4000000000000010 |
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion