Skip to content

JNY-COM-ORD-001A phone purchase succeeds after a declined card

Markdown

JNY-COM-ORD-001

A phone purchase succeeds after a declined card

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationObserved

KindJourneyProduct areaCommerceModuleCustomer purchases, purchased benefits and vendor stockRevision1End-to-endRequired

Read atservices-commerce c8b66a98react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Goal
Complete a correctly priced phone purchase with its promotion, recovering from an initial card decline.
Screens
/console/{tenantId}/crm/contacts/{id}/orders/new/console/{tenantId}/orders/{orderId}

Steps

#SurfaceActionCapabilityExpectedProvenance
1/console/{tenantId}/crm/contacts/{id}/orders/newChoose Create Order on the customer’s contact record.CAP-COM-ORD-001The composer uses that contact and the CRM address, and identifies the policy governing the new cart.test
react-console:components/order-composer/__tests__/new-order-screen.test.tsx#renders the workspace with the contact as the bill-to customer and the address CRM holds
2addCheckoutItemSelect one Style Guide from the store.CAP-COM-ORD-001Item validation completes and the cart contains the selected product.test
services-commerce:modules/checkout/tests/e2e/checkouts.e2e.spec.js#adds after the last, changes the intent and clears what was advised, removes, each bumping the version
3previewCheckoutReview the purchase preview.CAP-COM-ORD-003The displayed price, tax and total match Commerce’s response.test
react-console:components/order-composer/__tests__/live-composer.test.tsx#shows exactly the figures Commerce's preview answered
4applyCheckoutPromotionCodeSubmit the customer’s promotion code.CAP-COM-ORD-004An accepted code displays its discount and promotion name; a refused code explains the refusal without changing the total.test
react-console:components/order-composer/__tests__/live-composer.test.tsx#applies a code Commerce accepts and shows what it took off
5placeCheckoutSubmit the cart for placement.CAP-COM-ORD-005The sale receives an order number and a pay-now deadline while billing remains pending.test
services-commerce:modules/checkout/tests/e2e/placement.e2e.spec.js#answers 200 with the order: numbered 10000, placed, pending billing, pay now with a thirty-minute tender window, created
6tenderOrderEnter the first card through Accounting’s payment window.CAP-COM-ORD-007A decline leaves the placed purchase available for another payment attempt.test
services-commerce:modules/orders/tests/e2e/billing-and-tender.e2e.spec.js#answers 200 declined with the processor’s code, the order still placed with its pro forma, the attempt declined
7tenderOrderSubmit the replacement card.CAP-COM-ORD-007The successful attempt pays the purchase in full and acceptance follows, with a single charge for that attempt.test
services-commerce:modules/orders/tests/e2e/billing-and-tender.e2e.spec.js#accepts the order on the next attempt, under the next sequence and key
8/console/{tenantId}/orders/{orderId}Inspect the order detail.CAP-COM-ORD-010The tender panel lists the successful payment and the struck-through decline, with the payment linked to Accounting.test
react-console:components/console/order/__tests__/order-360-live-cards.test.tsx#lists each tender with its status, the declined one struck through and a payment linked to Accounting

Alternate and Failure Paths

PathFrom stepConditionPath takenOutcomeProvenance
alternate6The payment window is dismissed before paymentKeep the existing placed purchase in the composerStaff can resume payment from the order during its tender windowtest
react-console:components/order-composer/__tests__/live-composer.test.tsx#keeps the placed order, awaiting payment, when the card pop-up is closed unpaid
alternate6The customer chooses a checkEnter the check reference against the placed purchaseThe recorded check accepts the purchasetest
react-console:components/order-composer/__tests__/live-composer.test.tsx#records a check against the placed order with its number
failure5The reviewed price is no longer currentStop placement and return the old and current pricesStaff review a new preview before trying placement againtest
services-commerce:modules/checkout/tests/e2e/placement.e2e.spec.js#refuses PRICE_CHANGED with both prices when the price rose since a preview of a moment ago, the checkout left open
failure7The processor response is unavailableRetain an uncertain result and resume the existing attempt on retryAcceptance follows the resolved response without an additional chargetest
services-commerce:modules/orders/tests/e2e/billing-and-tender.e2e.spec.js#resumes the same attempt on a retry, whatever card the retry names, and moves nothing while the intent is processing

Assertions

IdStatementProvenance
01The successful retry accepts the existing order and records one charge for that attempt.test
services-commerce:modules/orders/tests/e2e/billing-and-tender.e2e.spec.js#accepts the order on the next attempt, under the next sequence and key
02The first payment converts the pro forma and the mirrored financial position shows full payment.test
services-commerce:modules/orders/tests/e2e/billing-and-tender.e2e.spec.js#answers 200: the attempt succeeded with Accounting’s payment, the order accepted, the pro forma converted by that first money
03The detail view retains the decline and success, with the successful payment linked to Accounting.test
react-console:components/console/order/__tests__/order-360-live-cards.test.tsx#lists each tender with its status, the declined one struck through and a payment linked to Accounting

End-to-end policy: required: A browser scenario must connect the composer, card window and order detail to prove the staff can recover from a decline without initiating an unintended additional charge.

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.