VidYen / VidYen-WordPress-Plugins

VidYen Plugins for WordPress
GNU General Public License v2.0
9 stars 2 forks source link

Balance *-1 #113

Closed mcdeimon closed 5 years ago

mcdeimon commented 5 years ago

Hi Felty! One thing. It is important you remove *-1 in the balance from here:

LINE 239 - $adj_balance = $balance * -1; //Well. Apparently you can give your viewers more points for no good reason I guess. So we need negative values.

Sometimes these companies request a refund to the user and they take away some points that they already gave him. They call it "revoke" I think that when they detect a failure, they take the money from the administrator and send a callback to remove the user's points. With your code, the administrator will lose twice as much because he returns to pay the user.

A greeting!

VidYen commented 5 years ago

This is is fixed for now. Should be permanently fixed by October 18th.

VidYen commented 5 years ago

Whoops. This is not the same issue I was thinking of.

VidYen commented 5 years ago

I took a quick look at this and just changed it to:

$adj_balance = abs($balance) * -1;

So it will always return a negative.

VidYen commented 5 years ago

On GitHub so feel free to test to let me know if that solves... Otherwise... Will roll into the 1.7.4 on the live when get a chance. Thanks for reporting this one.

VidYen commented 5 years ago

Seems to be resolved for me.