Skip to main content

Set test orders in InLine Cart

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

  1. Add an HTML link or button in your page like the one below.
  2. Create a JavaScript click handler to execute the Inline Client desired methods.
  3. Use theTwoCoInlineCart.products.add({code, quantity, options})method to prepare your catalog product.
  4. In order to test mode useTwoCoInlineCart.cart.setTest(true).
  5. Use theTwoCoInlineCart.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:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo