This is a discussion on Non critical bug somewhere along the Paypal way...? within the Paypal forums, part of the Payment Modules category; Here is a strange one in case someone wants to give it a try and check it out on a ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| Here is a strange one in case someone wants to give it a try and check it out on a plain OSCMAX installation. When I am looking at an order (edit) from the admin section, and the field "payment_method" for that order on the DB is set exactly to "Paypal" (not case sensitive), I get an error ... ?¿? I hadn't found out before because until now I the info that was being stored there was "PayPal (Recargo de 0.35E + 4%)" , which is the full name of the payment method customers are seeing. But I changed it to just Paypal (so it would look nicer on invoices), and this is the error I get: ![]() ![]() So, the first one has payment method "PayPal (Recargo de 0.35E + 4%)" and can be seen ok, the second one has payment method "Paypal" and breaks. There is a table "paypal_ipn" on my database, but it is empty. Also, I checked my /admin/includes/database.php , and there was no reference there to TABLE_PAYPAL_IPN , so I added the following line: define('TABLE_PAYPAL_IPN', 'paypal_ipn'); Reload, and now the error is: ![]() So what is TABLE_PAYPAL_IPN_TXN_TYPE ...??? I am quite lost here. I am not sure I have paypal_ipn working right now, since my table paypal_ipn contains no information about payments received. But, orders done with paypal_ipn are stored ok, I get the payments done, and they do seem to be working ok. So I might be missing some of the features on this module maybe...? Since my problem was just a cosmetic one, now the Paypal payments are stored with the "payment_method" PaypaI (yeah, that is a capital i) so this problem is gone for me. |
|
#2
| ||||
| ||||
| I think this one is easy... Probably missing the spanish language file for paypal ipn. Just copy it from the admin panel's english directory to the spanish directory and then translate the text to spanish.
__________________ Michael Sasek osCMax Developer osCMax Templates - Hundreds of premium quality templates. New designs every month! xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. |
|
#3
| ||||
| ||||
| Hi michael, You are kinda right and I failed mentioning that part when I did the post, the first time I did the change "PayPal (Recargo de 0.35E + 4%)" to "Paypal", the error it gave me was about a missing language file. I copied the language file from /english to /spanish , and it changed to the one you can see on the screenshot here. I searched checked order.php to see where the error might be coming from, and I see there 3 appearences of something like strtolower($order->info['payment_method']) == 'paypal' which I changed to strtolower($order->info['payment_method']) == 'poypal' to see if it would stop failing, but it didn't. It was kinda late and I really didn't feel like checking any more... What I do not quite understand either is why the payment method is being checked like that to see if it is paypal, since it is quite possible that people will change the text to someone else. In fact, the default name for the OSCMAX paypal_ipn module after install was "PayPal (Credit Card / Debit)" , so whatever code is supposed to be running there that is failing me wouldn't work with the default name, and it would work with the normal paypal.php module. |
|
#4
| ||||
| ||||
| You shouldn't be changing the database. I think just changing the language define in the language file will do the trick. I think I am not fully understanding what you are doing. What code in what file have you changed to cause this in the first place?
__________________ Michael Sasek osCMax Developer osCMax Templates - Hundreds of premium quality templates. New designs every month! xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. |
|
#5
| ||||
| ||||
| I will try to do better this time ----- From what I can tell, I have changed no code. What I did change was the Paypal_ipn name, so instead of being the default text "PayPal (Credit Card / Debit)" it is just "Paypal". On /includes/languages/whatever/modules/payment/paypal_ipn.php replace: Code: define('MODULE_PAYMENT_PAYPAL_IPN_TEXT_TITLE', 'PayPal (Credit Card / Debit)');
define('MODULE_PAYMENT_PAYPAL_IPN_TEXT_DESCRIPTION', 'PayPal IPN'); Code: define('MODULE_PAYMENT_PAYPAL_IPN_TEXT_TITLE', 'Paypal');
define('MODULE_PAYMENT_PAYPAL_IPN_TEXT_DESCRIPTION', 'PayPal'); (NOTE: I also have a field "paypal_ipn_id" on every order, I have no clue what this fields are for. I also have an empty table on my database "paypal_ipn", I have no clue what this table is for) The fact that the field "payment_method" is exactly "Paypal" (not case sensitive, "PaYpAl" would be the same) triggers something on /admin/orders.php that is giving me the error messages I was showing. You can do a text search for: Code: == 'paypal' Code: if (strtolower($order->info['payment_method']) == 'paypal') {
include 'paypal_ipn_order.php';
} else { So, I guess I do have a few questions: - /admin/orders.php is using a text comparison on the field "payment_method" to know if an order has been paid with Paypal. I doubt that is a good idea, since many people will change that text to something else, and in fact, by default it already comes as something else. - I have no clue if my paypal_ipn payment module should be doing "more". I have no information on my "paypal_ipn" database table. I have no "paypal_ipn_id" on my orders, no matter how they are paid for. - I am using paypal.com, but in spanish. I have no clue if the APIs or whatever they iffer are different. For one, we do not even have verified addresses outside the US. I have the idea that maybe paypal_ipn is not fully working for me. That maybe when it is used as a payment method, I should be seeing more info on my DB, I should be seeing stored the information passed by Paypal, or whatever. Which in turn might make the orders.php fail, because there's no data in there. But anyway, the fact of doing a text comparison on orders.php against "paypal" for knowing the payment method, does seem to be a bad approach to me. |
|
#6
| ||||
| ||||
| I just tested this on my dev shop, and I was able to reproduce it. Seems to be an issue with the classes/paypal_ipn.php file not getting the paypal constants.
__________________ Michael Sasek osCMax Developer osCMax Templates - Hundreds of premium quality templates. New designs every month! xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. |
|
#7
| ||||
| ||||
| Great, I'm glad my hint wasn't a time waster and there is something to be checked out... What I found strange was that the method used on /admin/orders.php for knowing if a purchase has been paid with paypal_ipn was to compare the 'payment_method' against the text 'paypal', since by default the name has already been changed to something else. |
|
#8
| ||||
| ||||
| No, I had never seen it before, so definitely worth the effort to report. It is one of those oddities that would never come up in normal usage, since most users leave the text as default for all the payment modules.
__________________ Michael Sasek osCMax Developer osCMax Templates - Hundreds of premium quality templates. New designs every month! xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. |
|
#9
| ||||
| ||||
| I'm glad to help Feel free to add it yourself on the bugtracker, I wouldn't even be able to know what summary to put on the issue. |
| The Following User Says Thank You to MindTwist For This Useful Post: | ||
BobH (04-04-2008) | ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| paypal ipn or regular paypal mod | Deal-Shop | Paypal | 2 | 07-31-2007 05:03 AM |
| PayPal IPN in RC3 - values not being passed to PayPal? | SavageSinister | osCMax v2 Installation issues | 3 | 02-12-2007 03:57 PM |
| trying to get pwa working on 1.5 - its critical | jloyzaga | osCMax v1.7 Discussion | 6 | 09-30-2003 06:23 PM |
| paypal and paypal IPN, whats the diff? | lhotch | osCommerce 2.2 Installation Help | 1 | 09-06-2003 06:34 PM |