Page 1 of 2

Payout

Posted: 07 Sep 2014, 13:15
by chco
Hi!

If I use the getBillManager()->sendPlanets to send payment to a player, is it also possible to not get popups ?
So that this can done by a script without having to accept the details first ?

Thanks,
Charly

Re: Payout

Posted: 07 Sep 2014, 17:47
by chco
Hmm.. this seems to work, but then I need to do my own billing..

->connection->client->query('Pay',$login,500, $message);

Re: Payout

Posted: 07 Sep 2014, 17:54
by steeffeen
i would think a payout plugin sends planets from the server account to the player, no?
(if that's correct and you get a confirmation window, you're doing something wrong since the sender should be empty = server)

Re: Payout

Posted: 07 Sep 2014, 18:07
by chco
The idea is to have maniacontrol pay out planets at the end of a match to the three winners automatically without me having to confirm.
If I use the (pay-)code from the donate plugin I get the popup. Previously with the Smart controller I used the line in my previous post, but I had no billmanager then, so I had to keep track of payments.

Re: Payout

Posted: 07 Sep 2014, 18:17
by steeffeen
just what i said, you're using the wrong method
you want to send planets from the server to a player (paying)
SendBill sends a bill to a player so that he pays the planets which needs to be confirmed
just use sendPlanets() instead

Re: Payout

Posted: 07 Sep 2014, 18:48
by chco
If you read the first post, you'll see I do use sendplanets, it actually comes straight from the donate plugin :

$this->maniaControl->getBillManager()->sendPlanets(function ($data, $status) use (&$player, $amount, $receiver)

But it produces popups for me to acknowledge..

Re: Payout

Posted: 07 Sep 2014, 18:58
by steeffeen
ha i'm very sorry

well i can't really believe/understand that sendPlanets() produces a popup because it basically only does

Code: Select all

client->pay($receiverLogin, $amount, $message);
at least that's not intended, maybe your complete source code helps solving the problem?

Re: Payout

Posted: 07 Sep 2014, 19:23
by chco
I'll go fiddle a bit more first :)