-
Notifications
You must be signed in to change notification settings - Fork 1
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
WiP: Add referral bonus when user use "top-up wallet" + minimum top-up amount needed for bonus #33
base: main
Are you sure you want to change the base?
Conversation
…p amount needed for bonus Still WiP, but I might need your help with furter instructions. This new functionality has been implemented in the referral program that allows the referral bonus to be awarded when referred user top-up's their wallet. Correct me if I'm wrong, but as far as I know this is currently only possible when referred user buys Moodle course, right? Also I added a setting for the minimum amount of the required top-up in order to obtain a reference credit has been added.
Still work in progress (WiP). I tested it using paygw_bank plugin but I didn't receive referral gift amount to my wallet. Don't know what's wrong |
classes/transactions.php
Outdated
@@ -53,7 +53,9 @@ class transactions { | |||
* @return int|string the id of transaction record or error string. | |||
* @deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is not used any more as it is deprecated
I only keep it because other plugins still used it and will be deleted soon
We could add this to the class balance_op
I need push access to modify |
I enabled "Allow edits by maintainers". Do you know if this is enough? |
I did everything in my power to make this work, but it's not fully working. Referral amount is not being released. If you find some free time could you please take a look into this? I left debug output, and it seems that the referral process is not being triggered because there's no unreleased hold gift record for the user attempting the top-up. Which is currently my main issue right now. Here's the current process:
This suggests that the issue is occurring before the top-up process. The referral record (hold gift) is not being created when a user registers using a referral link. |
Still WiP, but I might need your help with further instructions.
This new functionality has been implemented in the referral program that allows the referral bonus to be awarded when referred user top-up's their wallet. Correct me if I'm wrong, but as far as I know this is currently only possible when referred user buys Moodle course, right? Also, I added a setting for the minimum amount of the required top-up in order to obtain a reference credit has been added.