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

WiP: Add referral bonus when user use "top-up wallet" + minimum top-up amount needed for bonus #33

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Buda9
Copy link

@Buda9 Buda9 commented Sep 2, 2024

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.

…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.
@Buda9
Copy link
Author

Buda9 commented Sep 2, 2024

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

Screenshot_56

@@ -53,7 +53,9 @@ class transactions {
* @return int|string the id of transaction record or error string.
* @deprecated
Copy link
Owner

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

@fmido88 fmido88 self-assigned this Sep 7, 2024
@fmido88
Copy link
Owner

fmido88 commented Sep 7, 2024

I need push access to modify

@Buda9
Copy link
Author

Buda9 commented Sep 7, 2024

I need push access to modify

I enabled "Allow edits by maintainers". Do you know if this is enough?

@Buda9
Copy link
Author

Buda9 commented Sep 22, 2024

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:

  1. The top-up process is being initiated correctly.
  2. The system is checking for a hold gift record, but it's not finding one:
    PHP Notice: Checking hold gift record for user 14303
    PHP Notice: No hold gift record found for user 14303

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.

@fmido88 fmido88 added enhancement New feature or request help wanted Extra attention is needed labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants