Payout

ManiaControl, the completely new designed and easy to use controller managing all your Maniaplanet server.

Moderators: kremsy, Jocy, Wabbitface, steeffeen, NADEO

User avatar
chco
Posts: 301
Joined: 24 Dec 2012, 09:11

Payout

Post by chco » 07 Sep 2014, 13:15

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
Image

kremsy
Posts: 1725
Joined: 21 Jul 2011, 09:51

Re: Payout

Post by kremsy » 07 Sep 2014, 15:54

Nope, because the popup comes from the dedicated server software.
Lukas alias Kremsy, Developer of:
ManiaControl: http://www.maniacontrol.com
ParagonLeague: http://league.paragon-esports.com
MPAseco: http://mpaseco.org
ManiaViewer: http://www.maniaviewer.com

User avatar
chco
Posts: 301
Joined: 24 Dec 2012, 09:11

Re: Payout

Post by chco » 07 Sep 2014, 17:47

Hmm.. this seems to work, but then I need to do my own billing..

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

kremsy
Posts: 1725
Joined: 21 Jul 2011, 09:51

Re: Payout

Post by kremsy » 07 Sep 2014, 17:49

It should also work this way with the Billmanager, but don't have time atm to look into it, just look into the Donation Plugin line 406 :).
Lukas alias Kremsy, Developer of:
ManiaControl: http://www.maniacontrol.com
ParagonLeague: http://league.paragon-esports.com
MPAseco: http://mpaseco.org
ManiaViewer: http://www.maniaviewer.com

User avatar
steeffeen
Translator
Translator
Posts: 2472
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Payout

Post by steeffeen » 07 Sep 2014, 17:54

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)
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks

    User avatar
    chco
    Posts: 301
    Joined: 24 Dec 2012, 09:11

    Re: Payout

    Post by chco » 07 Sep 2014, 18:07

    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.
    Image

    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2472
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: Payout

    Post by steeffeen » 07 Sep 2014, 18:17

    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
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks

      User avatar
      chco
      Posts: 301
      Joined: 24 Dec 2012, 09:11

      Re: Payout

      Post by chco » 07 Sep 2014, 18:48

      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..
      Image

      User avatar
      steeffeen
      Translator
      Translator
      Posts: 2472
      Joined: 14 Oct 2012, 16:22
      Location: Germany

      Re: Payout

      Post by steeffeen » 07 Sep 2014, 18:58

      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?
        Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

        ManiaControl, FancyManiaLinks

        User avatar
        chco
        Posts: 301
        Joined: 24 Dec 2012, 09:11

        Re: Payout

        Post by chco » 07 Sep 2014, 19:23

        I'll go fiddle a bit more first :)
        Image

        Post Reply

        Return to “ManiaControl”

        Who is online

        Users browsing this forum: No registered users and 2 guests