Skip to content

Commit

Permalink
Simplify payment flow
Browse files Browse the repository at this point in the history
  • Loading branch information
hnd14 committed Sep 26, 2024
1 parent 97d3382 commit d0a80fa
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docs/design/order-flows/diagrams/payment.seq-1.puml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ activate storefront #fdf2e9
order_service -> promotion_service: POST /promotion/promotions/{PROMOCODE}/usage {checkout_id, state: APPLIED}
activate promotion_service #8af1f0
promotion_service --> order_service: 201 CREATED
alt #f1948a "Fail to apply"
promotion_service --> order_service: 422 UNPROCESSABLE CONTENT {ERROR_CODE: PROMOCODE_RAN_OUT| PROMOCODE_EXPIRED}
deactivate promotion_service
alt #f1948a "Fail to apply"
order_service --> checkout: Remove promo code
order_service --> storefront: 400 BAD REQUEST {ERROR_CODE: PROMOCODE_RAN_OUT| PROMOCODE_EXPIRED}
storefront --> customer: PROMOCODE ran out of usage| Promocode expired
Expand Down
3 changes: 1 addition & 2 deletions docs/design/order-flows/diagrams/payment.seq.puml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ activate storefront #fdf2e9
order_service -> promotion_service: POST /promotion/promotions/{PROMOCODE}/usage {checkout_id, state: APPLIED}
activate promotion_service #8af1f0
promotion_service --> order_service: 201 CREATED
alt #f1948a "Fail to apply"
promotion_service --> order_service: 422 UNPROCESSABLE CONTENT {ERROR_CODE: PROMOCODE_RAN_OUT| PROMOCODE_EXPIRED}
deactivate promotion_service
alt #f1948a "Fail to apply"
order_service --> checkout: Remove promo code
order_service --> storefront: 400 BAD REQUEST {ERROR_CODE: PROMOCODE_RAN_OUT| PROMOCODE_EXPIRED}
storefront --> customer: PROMOCODE ran out of usage| Promocode expired
Expand Down
Binary file modified docs/design/order-flows/imgs/Payment Flow Sub 1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/design/order-flows/imgs/Payment Flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/design/order-flows/imgs/Payment Flow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d0a80fa

Please sign in to comment.