Uploaded image for project: 'YesCart'
  1. YesCart
  2. YC-388

Order state machine external form processing when out of stock

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, 2.2.0
    • Fix Version/s: 2.1.0, 2.2.0
    • Component/s: sf server
    • Labels:
      None

      Description

      It seems like external form online PG handling has two issues:
      1. PaymentCallBackHandlerFacadeImpl creates either pending or cancelled order event depending on the payment result (ok and failed respectively). This seems to be unnecessary since cancelling logic only works for reserved items and this is a new order and hence no reservations are made. In fact it is only by transition to pending we get the reservation done. Cancel event logic is already present in the pending handler. So this could be safely replaced by just creating PENDING event only regardless of the payment result.
      2. Pending handler attempts to reserve items prior saving payment result and thus if reservation fails then payment transition is never performed and thus details of the transaction are lost. We need alternative flow for this, so that if reservation fails we still able to save the transaction. I think the best way here would be to set order as Cancelled and still perform saving of the transaction. This way we save all data and able to see the amount to be refunded.

        Attachments

          Activity

            People

            • Assignee:
              denis.lozenko Denis Lozenko (Inactive)
              Reporter:
              denis Denis Pavlov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: