Skip to content

Payment And Withdrawal Flow #1901

Description

@elraphty

Context

These are the flows to pay a bounty and withdraw from a Workspace.

Payment

Payment is handled with MakeBountyPayment

  • If the payment is completed it sets the bounty to paid = true, adds the payment to the payment history with a status of true and payment_status of COMPLETED, then deducts the amount from the bounty budgets
  • If the payment is pending it sets bounty paid to false, then sets payment_pending (payment_pending is a new column added to make pending payments not editable) to true, it also sets the payment_history status to true and the payment_status will be set to PENDING, then deducts the amount from the bounty budgets
  • When the payment fails, it adds the payment to the payment history setting the payment_status as FAILED and status as false i.e it won't be shown on the payment_history anymore, and also won't deduct the budget balance

Retry Pending Payments

When a payment is pending, and a request is made from the web app to update a payment status UpdateBountyPaymentStatus

  • It checks the V2 Bot for the status of the payment
  • If the payment status is COMPLETED the bounty paid property is set to true and the payment_pending property is set to false.
  • If the payment status is not COMPLETED, the bounty does not get updated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions