[Transaction] Several 500 Internal Server Errors

Maniaplanet public API, ManiaConnect system and the open source PHP SDK.

Moderator: NADEO

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

Re: [Transaction] Several 500 Internal Server Errors

Post by steeffeen » 07 Jul 2013, 13:40

the issue about

Code: Select all

isPaid($id)
is quite annoying because you can't build an own payment system with that... as you can't be sure whether a player payed the price or not :(

p.s. yey third post in a row, sorry :twisted:
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks

    User avatar
    magnetik
    Nadeo
    Nadeo
    Posts: 1677
    Joined: 01 Feb 2012, 19:13
    Location: Bordeaux
    Contact:

    Re: [Transaction] Several 500 Internal Server Errors

    Post by magnetik » 08 Jul 2013, 10:00

    According to the logs theses transactions does not exists.

    If an exception is thrown the transaction must have not been paid.
    ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!

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

    Re: [Transaction] Several 500 Internal Server Errors

    Post by steeffeen » 08 Jul 2013, 10:42

    magnetik wrote:According to the logs theses transactions does not exists.
    If an exception is thrown the transaction must have not been paid.
    thanks for the response :)

    i can gladly post screenshots (not now, i'm not at home) of my ingame mails showing that i've received donations with the following (failing) ids:
    1179527, 1178036, 1155389, 1155385, 1150998, 1150997, 1143838
    the rest hasn't been paid

    (background: i'm saving all created transactions and check them for an overall balance, the listed ids cause '500' errors even though i got a mail with planets for them)

    //Edit: btw, how can transaction "not exist" when the id is counting up continuously?
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks

      User avatar
      magnetik
      Nadeo
      Nadeo
      Posts: 1677
      Joined: 01 Feb 2012, 19:13
      Location: Bordeaux
      Contact:

      Re: [Transaction] Several 500 Internal Server Errors

      Post by magnetik » 08 Jul 2013, 11:46

      Paid transaction are deleted every day.
      ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!

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

      Re: [Transaction] Several 500 Internal Server Errors

      Post by steeffeen » 08 Jul 2013, 11:51

      oh.. okay :(
      is that really needed? ^^
        Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

        ManiaControl, FancyManiaLinks

        User avatar
        magnetik
        Nadeo
        Nadeo
        Posts: 1677
        Joined: 01 Feb 2012, 19:13
        Location: Bordeaux
        Contact:

        Re: [Transaction] Several 500 Internal Server Errors

        Post by magnetik » 08 Jul 2013, 12:29

        I don't see much case where a transaction can be created a not paid after a few seconds?

        There are A LOT of transactions so it's required to avoid overloading our systems.
        ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!

        The_Big_Boo
        Posts: 1041
        Joined: 15 Jun 2010, 15:46

        Re: [Transaction] Several 500 Internal Server Errors

        Post by The_Big_Boo » 08 Jul 2013, 12:47

        If someone "plays" with your application to create then cancel many transactions, you risk hitting up the API request limit faster. But by keeping the transaction id, if the player don't pay it, you can still propose him the same one next time (considering it's not too old, let's say a few hours) and save some requests.

        This is done in CompetitionManager for instance, where API limit can already be an issue without transactions.
        OS: Win 7 Pro x64
        RAM: 2x4GB Corsair @ 1600MHz
        CPU: Intel i5 760 @ 3.6GHz
        Mobo: Asus P7P55D-E
        GPU: NVidia GTX 760 2GB
        HDD: WD Black 1TB
        Sound: VIA VT1828S (onboard)
        Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310

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

        Re: [Transaction] Several 500 Internal Server Errors

        Post by steeffeen » 08 Jul 2013, 13:16

        The_Big_Boo wrote:But by keeping the transaction id, if the player don't pay it, you can still propose him the same one next time (considering it's not too old, let's say a few hours) and save some requests.
        and how should i know that he didn't pay the old transaction without making a request?
        it doesn't have to do something with request count if you ask me

        i understand that the need of decreasing the system load as much as possible, it's just unfortunate for maintaining the balance..
          Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

          ManiaControl, FancyManiaLinks

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

          Re: [Transaction] Several 500 Internal Server Errors

          Post by steeffeen » 08 Jul 2013, 14:08

          okay i've just checked back and the other failing ids which i thought haven't been paid are paid as well ^.^
          (i thought the error 500 isn't only happening on paid transactions)

          so can i be sure that unpaid transaction won't be deleted after a short time? so i can assume that failing ids have been paid :D
            Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

            ManiaControl, FancyManiaLinks

            The_Big_Boo
            Posts: 1041
            Joined: 15 Jun 2010, 15:46

            Re: [Transaction] Several 500 Internal Server Errors

            Post by The_Big_Boo » 08 Jul 2013, 16:13

            My answer was actually for magnetik asking a case where a transaction can be created but not paid immediately.
            steeffeen wrote:and how should i know that he didn't pay the old transaction without making a request?
            Here's how it works:
            • you create a transaction and propose it to the user
            • whatever he does, you check the transaction status
              • if it's paid... well, it's paid
              • else, you keep it so you won't have to create the same transaction again (same amount, same payer, etc.), you won't need to check again its status (you've just done it) thus you save one request
            Btw, I'm not sure about it but iirc, ManiaLoto also uses this principle (or at least a similar one).
            Last edited by The_Big_Boo on 08 Jul 2013, 16:17, edited 1 time in total.
            OS: Win 7 Pro x64
            RAM: 2x4GB Corsair @ 1600MHz
            CPU: Intel i5 760 @ 3.6GHz
            Mobo: Asus P7P55D-E
            GPU: NVidia GTX 760 2GB
            HDD: WD Black 1TB
            Sound: VIA VT1828S (onboard)
            Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310

            Post Reply

            Return to “Maniaplanet Web Services”

            Who is online

            Users browsing this forum: No registered users and 2 guests