Skip to content

[OrderRefactor][Order][Checkout] Proceed to Payment - [Step3] Customer Execute Payment #1131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nashtech-vietvuhoang1 opened this issue Oct 7, 2024 · 0 comments

Comments

@nashtech-vietvuhoang1
Copy link

nashtech-vietvuhoang1 commented Oct 7, 2024

After initializing the Checkout Order on Paypal successfully by ticket 1130, Storefront will redirect customer to Papal to complete the payment

  • From ticket 1130, Storefront can get payment_id that represent Internal Payment Object from checkout.attributes.payment_provider_checkout_id

  • Storefront checks status of Payment by calling Payment API GET /payment/payments/{payment_id} to check Payment status.

  • When Paypal Checkout Order object is created, the internal payment object will have value at payment_provider_checkout_id to keep Paypal order Id

  • Storefront will redirect customer to Paypal Payment interface by Paypal order Id (payment_provider_checkout_id)

  • Customer executes the payment

  • when Payment is completed

    • Paypal will send Confirmation Event to Paypal Adapter via Webhook, by this way, the Payment Checkout Object will be confirmed the Checkout object at Order Service state will be updated as PAYMENT_CONFIRMED
    • If payment is fail, Paypal will send Reject Event to Paypal Adapter via Webhook, the Payment Checkout Object will be reported as REJECTED and the Checkout object at Order Service state will be updated as PAYMENT_REJECTED
    • Paypal will redirect Customer back to Storefront Confirmation page
  • When the Payment is confirmed, Order Services will handle confirmation event and create the Order associated the Checkout, and the Order will be processed in fulfillment process

  • Shopping Cart will be reset as a result follow to Order Confirmation

  • Customer will be notified about the Order

Checkout Lifecycle

Checkout Lifecycle

Order Lifecycle

Order Lifecycle

Order ERD

checkout erd

Payment Flow

Payment Flow  Customer executes Payment on Paypal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants