Tessa Posted February 10, 2016 Share Posted February 10, 2016 (edited) Don't use mysql (deprecated) / mysqli! There is PDO and nothing else. :lol: Also, you can build something like a template engine... For example: index.php <?php function render($tplFile, array $data) { ob_start(); extract($data, EXTR_SKIP); require "template/{$tplFile}"; echo ob_get_clean(); } $someData = [ 'title' => 'Cool Page Title', 'text' => 'Some cool text' ]; render('home.php', $someData); template/home.php <!DOCTYPE html> <html> <head> <title><?= $data['title']; ?></title> </head> <body> <div><?= $data['text']; ?></div> </body> </html> Edited February 11, 2016 by Tessa Quote Link to comment Share on other sites More sharing options...
dasoldier Posted February 13, 2016 Share Posted February 13, 2016 I know pdo is used on the updated version. First adding more donation options and debugging the system as best i can. i will try to keep this in mind when i'm going to worry about templates ^^ Quote Link to comment Share on other sites More sharing options...
Tessa Posted February 14, 2016 Share Posted February 14, 2016 It's not about templates. When you separate the HTML (also known as 'view') from the programming logic, your code becomes more readable. You can also separate the database logic and your application will be even easier to debug. :) Quote Link to comment Share on other sites More sharing options...
xxdem Posted February 14, 2016 Share Posted February 14, 2016 It's not about templates. When you separate the HTML (also known as 'view') from the programming logic, your code becomes more readable. You can also separate the database logic and your application will be even easier to debug. :) I still prefer the good clean jsp and servlets Quote Link to comment Share on other sites More sharing options...
Tessa Posted February 14, 2016 Share Posted February 14, 2016 I still prefer the good clean jsp and servletsPHP can be clean too, there are a lot of frameworks you can use to do that. For a web apps I prefer Python + Django. Python is sweet, Django is powerful. :lol: Quote Link to comment Share on other sites More sharing options...
dasoldier Posted February 14, 2016 Share Posted February 14, 2016 I'm not that good at coding. if something comes out, its mostly chaotic. But yea i'm trying my best to give a free tool to the l2j community. I'm mostly working alone at it so some help is welcome. Maby giving ideas to better handle the code. With example would be very usefull :) Quote Link to comment Share on other sites More sharing options...
djterixx Posted February 29, 2016 Share Posted February 29, 2016 Hi, how can I test it? I tried sandbox account's, payment was sucessful, I accepted it, but player didnt receive Gold Bars. Quote Link to comment Share on other sites More sharing options...
dasoldier Posted March 1, 2016 Share Posted March 1, 2016 (edited) Yes i will explain it a bit on how to test. Login: https://developer.paypal.com/webapps/developer/applications/ipn_simulator Step1: choose your ipn file and select web accept: Step2: check if its instant, confirmed and verified: step3: you can select every donation option just change mc_gross and custom field: Options for custom field: // Note for selecting the correct option (coins karma pk) use the correct mc_gross amount same as your config.Charactername|CoinsCharactername|KarmaCharactername|Pkpoints // These ones are for the enchant option. charname|Enchitems|Shirtcharname|Enchitems|Helmetcharname|Enchitems|Necklacecharname|Enchitems|Weaponcharname|Enchitems|FullarmorBreastplatecharname|Enchitems|Shieldcharname|Enchitems|Ring1charname|Enchitems|Ring2charname|Enchitems|Earring1charname|Enchitems|Earring2charname|Enchitems|Glovescharname|Enchitems|Leggingscharname|Enchitems|Bootscharname|Enchitems|Belt Change MC_gross = donation amount. Same as your config otherwise the donations wont work. It will get logged into admin/donationoverview because the donation amount is not correct. And turn sandbox mode on in config if you are testing trough the ipn simulator. Otherwise it will also fail. Edit: Also good to know this system is not tested good yet, and maby it could burn your server in the near future :P. Still working on it i just dont have so mutch time lately to learn and code. When i have more time i will try to make it better. Edited March 1, 2016 by dasoldier Quote Link to comment Share on other sites More sharing options...
dasoldier Posted May 29, 2016 Share Posted May 29, 2016 (edited) Hey all, I have shared a donation system. Still improving it and try to solve problems i have encountered. Note: Spanish is not in there yet. https://github.com/Dasoldier1/Donation_Center * register form * Now players connect their character to their donation center account It is exerimental so if you encounter some problems with the system inform us and we will look for a solution. Greetings, Dasoldier Edited June 3, 2016 by dasoldier Quote Link to comment Share on other sites More sharing options...
Zake Posted April 22, 2020 Share Posted April 22, 2020 (edited) When you donate with a sandbox personal account to a sandbox business account, payment status is set to Pending for some reason and not Completed. So be aware guys Edited April 22, 2020 by Zake Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.