How to deduct a percentage of the referral to the referrer?

  • 0
    I wrote a referral system for an online store. But. You need to send a deduction of interest, for example 10% of the replenishment amount.
    This is a piece of code from the account that I bring referrals to.

    As a matter of fact, I don’t understand how to make deductions 10% of the replenishment to the account of a superior partner
    MySQL Anonymous, Mar 17, 2019

  • 1 Answers
  • 0
    For each replenishment (it is more reliable not immediately, and then through a queue or cron), check partners and make deductions to them.

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!