Skip to content
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

Add docs for order and checkout to explain how authorizeStatus and chargeStatus work #1010

Open
korycins opened this issue Oct 31, 2023 · 1 comment

Comments

@korycins
Copy link
Member

korycins commented Oct 31, 2023

  • Order & Checkout should have an explanation how authorizeStatus and chargeStatus work
    • What are the possible values for the field.
    • What each specific value means for checkout/order
  • The checkout or Payment chapter should also receive the section that will explain when checkoutComplete can be called (what status values allow to place the order).
@korycins korycins self-assigned this Oct 31, 2023
@korycins
Copy link
Member Author

  • Checkout.authorizeStatus - The status is calculated based on all transactions assigned to the checkout. authorize means, that we have authorized or charged funds (or partially charged and partially authorized). It takes into account fields: authorizedAmount, chargedAmount, authorizePendingAmount, chargePendingAmount:
    NONE - the funds are not authorized
    PARTIAL - the cover funds don't cover fully the checkout's total.
    FULL - the funds cover the checkout's total. checkoutComplete can be called to convert checkout to order. The result for pending amounts (success/failure) will be provided by the payment app later, so it means that we can end up with the created order, that is not paid - as the pending amount has been converted to failure.

  • Checkout.chargeStatus - the status is calculated based on all transaction assigned to the checkout. It takes into account fields: chargedAmount, chargePendingAmount:

    NONE - the funds are not charged.
    PARTIAL - the funds that are charged don't cover the checkout's total
    FULL - the funds that are charged fully cover the checkout's total. checkoutComplete can be called to convert checkout to order. The result for pending amounts (success/failure) will be provided by the payment app later, so it means that we can end up with the created order, that is not paid - as the pending amount has been converted to failure.
    OVERCHARGED - the charged funds are bigger than checkout's total. checkoutComplete can be called to convert checkout to order.


  • Order.authorizeStatus - The status is calculated based on all transactions assigned to the order. authorize means, that we have authorized or charged funds (or partially charged and partially authorized). The status doesn't take into account pending amounts (difference between checkout and order authorize statuses). It takes into account fields: authorizedAmount, chargedAmount. The amount used to calculate the status is reduced by order.totalGrantedRefund:
    NONE - the funds are not authorized
    PARTIAL - the funds that are authorized and charged don't cover fully the
    order.total-order.totalGrantedRefund
    FULL - the funds that are authorized and charged fully cover the
    order.total-order.totalGrantedRefund

  • Order.chargeStatus - the status is calculated based on all transaction assigned to the order. It takes into account fields: chargedAmount. The status doesn't take into account pending amounts (difference between checkout and order charge statuses). The amount used to calculate the status is reduced by order.totalGrantedRefund:
    NONE - the funds are not charged.
    PARTIAL - the funds that are charged don't cover the
    order.total-order.totalGrantedRefund
    FULL - the funds that are charged fully cover the
    order.total-order.totalGrantedRefund
    OVERCHARGED - the charged funds are bigger than the
    order.total-order.totalGrantedRefund

@korycins korycins removed their assignment Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant