Skip to content

Pay online

Steps

  1. The user selects Pay Online. PaymentModal.js posts totalAmount, maxAmount and policyNum to /NDReimbursement/PayOnline with no anti-forgery token (BR-APP-006).
  2. The handler requires 0 < total <= max (BR-SCR-007); otherwise it returns null. max and the policy number come from the client (TD-APP-006).
  3. OneIncService creates the payment request through OneIncAPIClient.CreateMakePaymentRequest (known from the call site in OneIncService.cs; package internals are unknown**), and the script opens the portalOne modal.
  4. If the call throws, the handler logs the exception and returns null, the same result as a failed amount check. Pending online payments later block the claims-saved state (BR-SCR-008).

Process flow

The diagram shows the amount check, the payment-request call and the null result returned when validation fails or an exception is caught.

flowchart TD
    A["Pay Online"] --> B["POST PayOnline"]
    B --> C{"0 < total <= max?"}
    C -- No --> D["Return null"]
    C -- Yes --> E["Create payment request via OneIncAPIClient"]
    E -- "Success" --> F["Open payment modal"]
    E -- "Exception caught, logged" --> D

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • src/NDReimbursementWebApp/Pages/NDReimbursement.cshtml.cs
  • src/NDReimbursementWebApp/wwwroot/js/PaymentModal.js
  • src/NDReimbursementWebApp/Services/OneIncService.cs