anasakil / artisan

MIT License
1 stars 1 forks source link

Direct Payment to Sellers Upon Product Purchase #13

Open anasakil opened 3 months ago

anasakil commented 3 months ago

To enhance the marketplace ecosystem and ensure sellers receive their payments directly and promptly, we aim to implement a system where, upon a user's purchase of a product, the payment is processed and transferred directly to the seller's linked payment account. This feature requires integrating with our payment gateway to facilitate direct transfers based on each transaction.

Tasks:

  1. Seller Payment Account Setup:

    • Update the User model to include fields for storing seller payment account details securely.
    • Provide functionality within the seller dashboard for users to add or update their payment account information.
  2. Modify Payment Processing Logic:

    • Adjust the current payment processing flow to initiate a direct payment to the seller's account upon purchase completion. This may involve creating a new transaction with the payment gateway for each seller involved in an order.
    • Ensure that the application calculates and deducts any platform fees before transferring the net amount to the seller.
  3. Implement Transaction Records:

    • Create a model and API for tracking payment transactions to sellers, including the amount, date, and status of each payment.
    • Provide sellers access to their transaction history for accounting and reconciliation purposes.
  4. Error Handling and Reconciliation:

    • Implement robust error handling around payment transfers to manage failed transactions effectively.
    • Develop a mechanism for retrying failed payments and flagging any unresolved transactions for manual intervention.
  5. Compliance and Security:

    • Ensure that the feature complies with all relevant financial regulations, including KYC (Know Your Customer) where applicable.
    • Securely handle and store sensitive financial information in accordance with PCI DSS and other relevant security standards.
  6. Testing and Deployment:

    • Thoroughly test the new payment flow, including success, failure, and edge cases, in a controlled environment.
    • Plan for a phased rollout of the feature to monitor its impact and catch any unforeseen issues early.

Acceptance Criteria:

Deliverables: