Test and use cases

Tap into these use cases when developing and testing the Commerce API and your commerce connector.

Before and after any production deployment, we recommend running regression tests similar to those outlined below on your site. We suggest using these tests as a baseline. You can customize the test cases based on your implementation. Include additional tests such as reviewing the logged API response codes, browser compatibility, domain or TLS security, JavaScript errors, and so on, as required.

Since "live changes" do not allow for testing in a DESIGN or TEST mode, we recommend you integrate your Stage or Test systems with Digital River's Client Test Environment (CTE) whenever possible. This will help facilitate safe end-to-end testing of all changes before you deploy to production.

The Client Test Environment (CTE) is a dedicated testing platform provided by Digital River that allows businesses to safely conduct end-to-end testing of all changes in a simulated environment before deploying them to the production environment. This includes testing API integrations, payment processing, and user interface interactions without affecting live data or operations.

Integrating with the CTE is highly recommended for staging or testing systems, as it facilitates a secure and controlled setting for developers and QA teams to:

  • Verify API response codes and functionality.

  • Test the application of discounts and promo codes.

  • Confirm the handling of multiple currencies and locales.

  • Ensure the correct operation of the cart and checkout processes.

  • Check browser compatibility and responsiveness.

  • Assess any customizations or integrations specific to the client's setup.

By using the CTE, teams can identify and address issues before they impact the end-user experience, thereby enhancing the quality and reliability of the e-commerce platform. See API endpoints for more information on the CTE.

Confirm parameters are passed as expected

On pre-cart pages, ensure that the expected products, currency, pricing, and discounts appear on the Home page, Category pages, and Product pages. If your store supports multiple countries and regions, verify that locale language and currency changes as expected by country and region.

  • Confirm the product IDs, category IDs, and locale parameters are passed as expected.

  • Confirm the API responses are consumed as expected.

Confirm changes to the cart and Checkout page

  1. Add two or three products to a cart:

    See Creating or updating a cart for more information.

  2. Verify that the expected products, currency, pricing, and discounts appear in the cart. See Local and currency for more information.

  3. Adjust the product quantities and delete one line item from the cart.

  4. [Required if you are using coupons.] Submit a promo code (promoCode) that is either valid or invalid) and confirm the application of the coupon worked as expected. If the store supports promo codes that trigger orders, line items, and shipping discounts, we recommend testing all promo code types from checkout to order completion. See Applying a coupon code for more information.

  5. [Required for account creation.] Create a new shopper and sign in as the shopper.

  6. [Required for physical products.] Submit a shipping address from the Shipping Address page and confirm the shipping address change works as expected. We recommend that you manually enter the address without using the Form Filler. For more information, see Providing address information.

  7. [Required for physical products.] Confirm the available shipping methods appear as expected and change the shipping method on the Shipping Method page.

  8. Submit the payment information and billing address from the Payment or Billing Address page. We recommend manually entering the address without using the Form Filler and verifying all required payment methods are available for the locale.

    See the following topics for more information:

  9. From the Review page, review the order details and confirm the previously submitted data is present and accurate, including:

    • The required legal text and disclosures (Terms of Sale, privacy policy, and so on) appear as expected, and links to the accompanying legal pages are functioning.

    • The products (including pricing, discounts, and quantities)

    • The payment method (for example, the payment method type and the last four digits of the card number)

    • The billing and shipping addresses

    • The selected shipping method

  10. Submit the order and confirm the cart is submitted correctly by sending a test payment.

    • Verify the content in the Order Summary accurately reflects the shopper's order and that the order number appears (if required).

    • When using a test credit card for a live order and the Test Order flag (testOrder) is set to false, confirm that you received an "Auth Failed" error message.

    • When using a valid credit card for a live order and the Test Order flag (testOrder) is set to false, confirm you received a successful payment authorization and order submission.

    Note: Check the submitted order to ensure the Test Order flag (testOrder) is not present in a live order. Essentially, you need to confirm that the Test Order flag (testOrder) is not set to true when you go live.

Submit a live order for production validation

When submitting a live order for production validation, verify the following information in the Submit Cart response or the platform for looking up order information (for example, Global Commerce).

  • Verify that you received an order confirmation email.

  • The Test Order flag (testOrder) is set to false.

  • The submitted data is present in the order and accurate, including:

    • The products (including pricing, discounts, and quantities)

    • The payment method (for example, the payment method type and the last four digits of the card number)

    • The billing and shipping addresses

    • The selected shipping method

  • You captured the shopper's IP address.

  • Confirm the Terms of Sale (termsOfSalesAcceptance) works as expected. See the Checkout tab for more information on Terms of Sale Acceptance.

Last updated