Comment on page
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.
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.
- 1.Add two or three products to a cart:
- Confirm an anonymous or authenticated shopper token was generated and the Checkout pages and API requests use HTTPS.
- 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.
- 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 tofalse
, 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 tofalse
, 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 totrue
when you go live.
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 tofalse
. - 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
- Confirm the Terms of Sale (
termsOfSalesAcceptance
) works as expected. See the Checkout tab for more information on Terms of Sale Acceptance.
Last modified 2mo ago