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 that you run a series of regression tests similar to those outlined below on your site. These tests are a suggested baseline, and 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 also recommended that 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.

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 as expected. 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 order, line item, 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. From the Payment or Billing Address page, submit the payment information and billing address. We recommend that you manually enter the address without using the Form Filler and verify 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 last four digits of the card number)

    • The billing and shipping addresses

    • The selected shipping method

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

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

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

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

    Note: Check the submitted order to confirm 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 used to look 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 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 Checkout tab for more information on Terms of Sale Acceptance.