jab1972 Posted July 17, 2003 Share Posted July 17, 2003 Hi there, I want to use the latest Paypal IPN module but I am a complete newbie with databases. The install file tells me I have to process the paypalipn.sql file to my database but I don't have a clue how to do this within phpMyAdmin. Any help please? Thanks. Quote Link to comment Share on other sites More sharing options...
chfields Posted July 17, 2003 Share Posted July 17, 2003 open phpmyadmin,select your database, click on orders status and a box will appear at the bottom that says something like select from "orders status"... Delete that and copy and paste your sql statement in that box and click the go button and you are done Quote Link to comment Share on other sites More sharing options...
chfields Posted July 17, 2003 Share Posted July 17, 2003 You can also use this code. It will send the items ordered in the e-mail from paypal, but will not update the admin. If you get Paypal IPN to work you shouldn't need this code Just in case someone doesn't click continue to get back to your site here is a mod to include into your PayPal module to you can see what the customer ordered on your PayPal payment notification (just in case they don't return to your site to complete the process and generate an invoice) - BACK UP BACK UP BACK UP change the following code: function process_button() { global $order, $currencies, $currency; if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') { $my_currency = $currency; } else { $my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5); } if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) { $my_currency = 'USD'; } $xx = ''; for ($i=0; $i<sizeof($order->products); $i++) { $xx .= $order->products[$i]['qty'] . '-' . ($order->products[$i]['name']) . '**'; } $process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME . ' ' . $xx) . tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); return $process_button_string; } the above code snippet replaces the code snippet in the catalog/includes/modules/payment/paypal.php file look for function process_button() { and then copy and paste and replace that section of code with the code above ___________ Quote Link to comment Share on other sites More sharing options...
jab1972 Posted July 17, 2003 Author Share Posted July 17, 2003 sorry to be a pain, but I don't quite get what you said about the database. I go into myadmin and get to the orders_status but can't see anywhere to paste the code into... Quote Link to comment Share on other sites More sharing options...
jab1972 Posted July 17, 2003 Author Share Posted July 17, 2003 me again, further to my reason for wanting to use IPN... I was quite happy to use the basic paypal module, but the thing that bugs me is when the customer gets to the paypal website they get this: Pay To: company name Payment For: company name Surely the Payment for: should show what they have purchased instead of company name again. Am I doing something wrong or is this what always happens? I was hoping that IPN would stop this happening. Any further info on this would be great. Thanks again... Quote Link to comment Share on other sites More sharing options...
DicE Posted July 17, 2003 Share Posted July 17, 2003 Hey Jason I think Craig misunderstood your question. inserting the .sql file into your database using phpmyadmin is actually quite easy (providing your ISP gave you enough access.) when you are in the main screen of phpmyadmin, on the left, select the database used by oscommerce in the pulldown menu. then on the right you should get all kinds of tabs, one is named SQL go into that one, and there you should have a text box where you can manually type in SQL commands for phpmyadmin to execute on your db. the .sql file you have, contains those commands so you don't have to type them. Just below the text box you should have an option to browse for .sql files. Providing your ISP gave you enough access, you should be able to browse to the file, select it and then execute the script file so it creates the necessairy tables for you. If you don't have that "browse" button, you can always open the sql file in a text editor, and copy - paste the code in there into the text window. And then execute the script. It's basically the same thing.... the second option is just less work :) Hope it works out fine now! DicE Quote _____.:::.________###__________|/______ :(o o): . (o o) (o o) ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo- Link to comment Share on other sites More sharing options...
jab1972 Posted July 17, 2003 Author Share Posted July 17, 2003 Great! Got it working, thanks for your help guys. 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.