Set test orders in InLine Cart
Last updated: 29-Feb-2024
Rate this article:
Overview
Set the test mode in order to use card-based payment methods and eCheck/ACH using test cards and test cardholder names.
Use case
- Add an HTML link or button in your page like the one below.
- Create a JavaScript click handler to execute the Inline Client desired methods.
- Use the
TwoCoInlineCart.products.add({code, quantity, options})
method to prepare your catalog product. - In order to test mode use
TwoCoInlineCart.cart.setTest(true)
. - Use the
TwoCoInlineCart.cart.checkout()
method to show the cart on your page.
Sample request
HTML
<a href="#" class="btn btn-success" id="buy-button">Buy now!</a>
Javascript
window.document.getElementById('buy-button').addEventListener('click', function() {
TwoCoInlineCart.products.add({
code: "74B8E17CC0"
});
TwoCoInlineCart.cart.setTest(true);
TwoCoInlineCart.cart.checkout();
});
Demo
After adding the products to the InLine cart using the above method for testing purposes, your cart should look like this:
Test cards
Card type | Card number |
---|---|
VISA | 4111111111111111 |
MasterCard | 5555555555554444 |
AMEX | 378282246310005 |
Discover | 6011111111111117 |
JCB | 3566111111111113 |
Use case. To achieve the desired result use the corresponding cardholder names. | Cardholder name |
---|---|
Successful authorization for the initial transaction and all recurring charges. | John Doe |
Successful authorization for the initial transaction and manual renewal transactions but recurring charges fail to authorize with the Insufficient Funds error message. | Mike Doe |
Successful authorization for the initial transaction and manual renewal transactions but recurring charges fail to authorize with the Stolen Card error message. | Jenny Doe |
Insufficient funds | Mona Doe |
Try again later | Mark Doe |
Stolen card | Red Doe |
Authentication failed | Joy Doe |
Expired card | Angela Doe |
Invalid card number | Adrian Doe |
Invalid CVV | Jack Doe |
Rate this article: