DonationClaim

Moved

Total Downloads: 650 - First Release: May 20, 2016 - Last Update: Nov 10, 2016

5/5, 7 likes
  1. I used Navicat to connect to my database and create the procedure and with a bit of tweaking here and there I got it to work. Originally the procedure did not work when I was trying to create it using PHPMyAdmin so give Navicat a try and see if that works.
     
  2. Just replace ; in delimiter box with $$
     
  3. How to install for hurtworld
     
  4. Wulf

    Wulf Community Admin

    The instructions are on the Overview, it's the same for every game Oxide supports.
     
  5. Hello I have a problem here ...

    Basically my IPN works no errors... only odd thing is that when I go sandbox mode and test with simulator it receives IPN and is updating database.. But when I go "live" and test with legit payment in paypal I receive IPN but it's not updating database....

    Code:
    <?phpinclude 'MySQLCredentials.php';//read the post from PayPal system and add 'cmd'$req = 'cmd=_notify-validate';foreach ($_POST as $key => $value) {$value = urlencode(stripslashes($value));$req .= "&$key=$value";}//post back to PayPal system to validate$header = "POST /cgi-bin/webscr HTTP/1.1\r\n";$header .= "Content-Type: application/x-www-form-urlencoded\r\n";$header .= "Host: www.paypal.com\r\n"; //Change this to www.sandbox.paypal.com\r\n for testing$header .= "Connection: close\r\n";$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30); //Change this to ssl://www.sandbox.paypal.com for testing////error connecting to paypalif (!$fp) {//}//successful connectionif ($fp) {fputs ($fp, $header . $req);while (!feof($fp)) {$res = fgets ($fp, 1024);$res = trim($res); //NEW & IMPORTANTif (strcmp($res, "VERIFIED") == 0) {$transaction_id = $_POST['txn_id'];$payerid = $_POST['payer_id'];$firstname = $_POST['first_name'];$lastname = $_POST['last_name'];$payeremail = $_POST['payer_email'];$paymentdate = $_POST['payment_date'];$paymentstatus = $_POST['payment_status'];$mdate= date('Y-m-d h:i:s',strtotime($paymentdate));$otherstuff = json_encode($_POST);$item_name = $_POST['item_name'];$conn = new mysqli($dbhost,$dbusername,$dbpassword);if ($conn->connect_error) {trigger_error('Database connection failed: ' . $conn->connect_error, E_USER_ERROR);}// insert in our IPN record table$query = "INSERT INTO rustserver.ibn_table(itransaction_id,ipayerid,iname,iemail,itransaction_date, ipaymentstatus,ieverything_else,item_name)VALUES('$transaction_id','$payerid','$firstname $lastname','$payeremail','$mdate','$paymentstatus','$otherstuff','$item_name')";$result = $conn->query($query);$conn->close();}if (strcmp ($res, "INVALID") == 0) {//insert into DB in a table for bad payments for you to process later}}fclose($fp);}?>
     
  6. Business account it's free ? I have normal paypal account
     
  7. this works with wordpress?
     
  8. Wulf

    Wulf Community Admin

    Yes.
    I'm not sure how it'd work for WordPress.
     
  9. Try without SSL.
     
  10. Wulf

    Wulf Community Admin

    That's the debug, the error is above that in red.
     
  11. Screenshot
     
  12. Wulf

    Wulf Community Admin

    Looks like your MySQL user is not allowed to access that database, or at least lacks the right permissions.
     
  13. yes i checked, the user don't have any PRIVILEGES.

    so i give the user all PRIVILEGES.

    but still same issue.
     
  14. Wulf

    Wulf Community Admin

    I doubt the error would be the same, could you post the new log?
     
  15. Code:
    [07/09/2016 03:15:35] [Oxide] 03:15 [Info] Unloaded plugin DonationClaim v1.0.0 by Wulf/lukespragg
    [07/09/2016 03:15:35] [Oxide] 03:15 [Info] Loaded plugin DonationClaim v1.0.0 by Wulf/lukespragg
    [07/09/2016 03:15:42] [Oxide] 3:15 AM [Debug]  at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.NativeDriver.ReadPacket () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket () [0x00000] in <filename unknown>:0
    [07/09/2016 03:15:42] [Oxide] 03:15 [Debug]  at Oxide.Plugins.DonationClaim+<ChatCommand>c__AnonStorey0.<>m__0 (System.Collections.Generic.List`1 list) [0x00000] in <filename unknown>:0
      at Oxide.Ext.MySql.Libraries.MySql+MySqlQuery+<Handle>c__AnonStorey0.<>m__0 () [0x00000] in <filename unknown>:0
    [07/09/2016 03:16:15] [Oxide] 03:16 [Info] Unloaded plugin DonationClaim v1.0.0 by Wulf/lukespragg
    [07/09/2016 03:16:15] [Oxide] 03:16 [Info] Loaded plugin DonationClaim v1.0.0 by Wulf/lukespragg
    [07/09/2016 03:17:47] [Oxide] 03:17 [Info] [Death Notes] [SOG2] Zetra killed ☠Wolf☠
    [07/09/2016 03:18:02] [Oxide] 3:18 AM [Debug]  at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int64& insertedId) [0x00000] in <filename unknown>:0
    [07/09/2016 03:18:02] [Oxide] 03:18 [Debug]  at Oxide.Plugins.DonationClaim+<ChatCommand>c__AnonStorey0.<>m__0 (System.Collections.Generic.List`1 list) [0x00000] in <filename unknown>:0
      at Oxide.Ext.MySql.Libraries.MySql+MySqlQuery+<Handle>c__AnonStorey0.<>m__0 () [0x00000] in <filename unknown>:0
    [07/09/2016 03:18:09] [Oxide] 3:18 AM [Debug]  at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int64& insertedId) [0x00000] in <filename unknown>:0
    [07/09/2016 03:18:09] [Oxide] 03:18 [Debug]  at Oxide.Plugins.DonationClaim+<ChatCommand>c__AnonStorey0.<>m__0 (System.Collections.Generic.List`1 list) [0x00000] in <filename unknown>:0
      at Oxide.Ext.MySql.Libraries.MySql+MySqlQuery+<Handle>c__AnonStorey0.<>m__0 () [0x00000] in <filename unknown>:0
    [07/09/2016 03:18:52] [Oxide] 3:18 AM [Debug]  at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int64& insertedId) [0x00000] in <filename unknown>:0
    [07/09/2016 03:18:52] [Oxide] 03:18 [Debug]  at Oxide.Plugins.DonationClaim+<ChatCommand>c__AnonStorey0.<>m__0 (System.Collections.Generic.List`1 list) [0x00000] in <filename unknown>:0
      at Oxide.Ext.MySql.Libraries.MySql+MySqlQuery+<Handle>c__AnonStorey0.<>m__0 () [0x00000] in <filename unknown>:0
    [07/09/2016 03:18:56] [Oxide] 03:18 [Info] [Better Chat] [Owner] [XX7] AL3MDH: .
    [07/09/2016 03:19:15] [Oxide] 3:19 AM [Debug]  at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int64& insertedId) [0x00000] in <filename unknown>:0
    [07/09/2016 03:19:15] [Oxide] 03:19 [Debug]  at Oxide.Plugins.DonationClaim+<ChatCommand>c__AnonStorey0.<>m__0 (System.Collections.Generic.List`1 list) [0x00000] in <filename unknown>:0
      at Oxide.Ext.MySql.Libraries.MySql+MySqlQuery+<Handle>c__AnonStorey0.<>m__0 () [0x00000] in <filename unknown>:0
    [07/09/2016 03:19:20] [Oxide] 3:19 AM [Debug]  at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int64& insertedId) [0x00000] in <filename unknown>:0
    [07/09/2016 03:19:20] [Oxide] 03:19 [Debug]  at Oxide.Plugins.DonationClaim+<ChatCommand>c__AnonStorey0.<>m__0 (System.Collections.Generic.List`1 list) [0x00000] in <filename unknown>:0
      at Oxide.Ext.MySql.Libraries.MySql+MySqlQuery+<Handle>c__AnonStorey0.<>m__0 () [0x00000] in <filename unknown>:0
    [07/09/2016 03:20:09] Saved 9,411 ents, serialization(0.00), write(0.01), disk(0.00) totalstall(0.01).
     
  16. Wulf

    Wulf Community Admin

    Weird. Not familiar with that, but it looks like a connection issue.
     
  17. I connect to my db using workbench and working without any problem?

    is the plugin still work? maybe need update after last update?
     
  18. Wulf

    Wulf Community Admin

    Nothing changed, it's a generic plugin that works regardless of game updates.
     
  19. I'd be willing to bet a very large stack of monopoly money most of everyone's problems are due to PayPal's update to OpenSSL requirements.

    To do so, would require [insert OpenSSL version number PayPal requires that I can't remember here.] Most web hosts uncontrollably defecate themselves at the thought of potentially repeating the Heartbleed fiasco, and will adamantly refuse to upgrade your SSL package unless you pay for and use a dedi...

    So you must forego the (actual) handshake, and open yourself to POTENTIAL (all the while, unlikely) spoofing... which would require you (like a good server owner) to routinely monitor the transactions flowing through and validate them.

    To go this route, simply ignore the boolean return on $fp. Not honestly the most recommended path for this, but quite frankly, PayPal ruined this plugin.

    #Edit
    Side note, I'd like to point out this isn't theory. I've replicated the errors mentioned in this thread, researched some granular error checking, and successfully tested my theory. (Which included a colorful call to my webhosts "tech support".)