ajensen27 Posted August 18, 2013 Share Posted August 18, 2013 (edited) So I just installed Paypal version 3.5.8 and everything works find up until I submit the payment on the Paypal site. I get the attached internal server error. I checked the console in Chrome and did not see any errors so I have no idea what could be causing this. I did see my payment went through via my personal paypal account that I made my test purchase with. Anyone seen this before and have a fix? Edited August 20, 2013 by ajensen27 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 18, 2013 Share Posted August 18, 2013 it's a internal server error (500) so in this case please turn on error reporting in your store. After that - try again, you will probably see additional informations about error (in what file occured) Link to comment Share on other sites More sharing options...
ajensen27 Posted August 18, 2013 Author Share Posted August 18, 2013 Thanks Vekia... I turned on error reporting and re-enabled the Paypal module but now my "Delete" button to delete a product for your cart and my vouchers box disappeared from the page... I need the vouchers box so I can enter in a dummy voucher to make my cart only .50 so I can test an actual payment. It was doing this earlier but I disabled the "express checkout" option and it fixed the issue. But now it's doing it again and I tried re-enabling and disabling that option but it didn't fix it. Any idea what is happening now? Link to comment Share on other sites More sharing options...
ajensen27 Posted August 19, 2013 Author Share Posted August 19, 2013 Ok, so I tried it in IE 10 and after submitting my payment on Paypal, I was returned to a blank page. This is what the console said. HTML1527: DOCTYPE expected. The shortest valid doctype is "<!DOCTYPE html>". payment.php, line 1 character 1 Link to comment Share on other sites More sharing options...
ajensen27 Posted August 19, 2013 Author Share Posted August 19, 2013 Ok, here's the error I get when I turned on debugging. Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT (/home/incontis/domains/llmedico.com/public_html/modules/paypal/paypal_orders.php, line 70)[/color] [color=#000000]Any ideas??[/color] Link to comment Share on other sites More sharing options...
ajensen27 Posted August 19, 2013 Author Share Posted August 19, 2013 Can someone please help? Would really love to get this fixed so I can offer Paypal as an alternative method of payment. Thanks!! Link to comment Share on other sites More sharing options...
ajensen27 Posted August 21, 2013 Author Share Posted August 21, 2013 I really need to get Paypal up and running. I've had a few requests from customers. Can someone please help me with this error?!? Link to comment Share on other sites More sharing options...
ajensen27 Posted August 23, 2013 Author Share Posted August 23, 2013 Bumping it to the top Link to comment Share on other sites More sharing options...
ajensen27 Posted September 5, 2013 Author Share Posted September 5, 2013 Still looking to solve this! Would love to integrate Paypal into our store but cant do so because of this issue. Link to comment Share on other sites More sharing options...
El Patron Posted September 5, 2013 Share Posted September 5, 2013 what is your ps version please Link to comment Share on other sites More sharing options...
ajensen27 Posted September 5, 2013 Author Share Posted September 5, 2013 Thanks for the reply! I'm using 1.5.2 Link to comment Share on other sites More sharing options...
El Patron Posted September 5, 2013 Share Posted September 5, 2013 ave maria...I hate 1.5.2...why not use a newer paypal module from addon's? Link to comment Share on other sites More sharing options...
ajensen27 Posted September 5, 2013 Author Share Posted September 5, 2013 This isn't the newest Paypal module? Do you have some that you recommend? Preferably free like this one. Link to comment Share on other sites More sharing options...
El Patron Posted September 6, 2013 Share Posted September 6, 2013 http://addons.prestashop.com/en/payments-gateways-prestashop-modules/8277-paypalusa.html Link to comment Share on other sites More sharing options...
ajensen27 Posted September 6, 2013 Author Share Posted September 6, 2013 Thanks... Does this have the authorize and capture later feature like the other module? Also, what am I supposed to put in the "Paypal Business Account" text box? My Paypal merchant ID? I have all my other API credentials, just have no idea what this first box means. Link to comment Share on other sites More sharing options...
El Patron Posted September 6, 2013 Share Posted September 6, 2013 I'm not that familiar with that version of the module....I'd do a little google searching and avoid searching using the forum search...but hopefully this will get you over the hump. Link to comment Share on other sites More sharing options...
ajensen27 Posted September 6, 2013 Author Share Posted September 6, 2013 Yeah so I did some testing and it doesn't have authorize and capture later like the other module does. It also doesn't redirect you automatically back to your store after making the paypal payment which I seems like the other module does (the url looks like it does but I can't tell for sure because this is the step where I get the error in my above post). No one has any idea what this error might mean? Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT (/home/incontis/domains/llmedico.com/public_html/modules/paypal/paypal_orders.php, line 70) Link to comment Share on other sites More sharing options...
ajensen27 Posted September 6, 2013 Author Share Posted September 6, 2013 (edited) This is the section of code it is referring to. Does anyone see anything off (I'm not a programmer)? Thanks! 'shipping' => (float)$ppec->result['PAYMENTREQUEST_0_SHIPPINGAMT'], <---- this line public static function getTransactionDetails($ppec = false, $payment_status = false) { if ($ppec && $payment_status) { $transaction_id = pSQL($ppec->result['PAYMENTINFO_0_TRANSACTIONID']); return array( 'currency' => pSQL($ppec->result['PAYMENTINFO_0_CURRENCYCODE']), 'id_invoice' => null, 'id_transaction' => $transaction_id, 'transaction_id' => $transaction_id, 'total_paid' => (float)$ppec->result['PAYMENTINFO_0_AMT'], 'shipping' => (float)$ppec->result['PAYMENTREQUEST_0_SHIPPINGAMT'], 'payment_date' => pSQL($ppec->result['PAYMENTINFO_0_ORDERTIME']), 'payment_status' => pSQL($payment_status) ); } else { $transaction_id = pSQL(Tools::getValue(ID_TRANSACTION)); return array( 'currency' => pSQL(Tools::getValue(CURRENCY)), 'id_invoice' => pSQL(Tools::getValue(ID_INVOICE)), 'id_transaction' => $transaction_id, 'transaction_id' => $transaction_id, 'total_paid' => (float)Tools::getValue(TOTAL_PAID), 'shipping' => (float)Tools::getValue(SHIPPING), 'payment_date' => pSQL(Tools::getValue(PAYMENT_DATE)), 'payment_status' => pSQL($payment_status) ); } } Edited September 6, 2013 by ajensen27 (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 24, 2013 Share Posted September 24, 2013 Hello all, this is just to let you know that the PayPal Module is updated to 3.6. You can download it here http://addons.prestashop.com/en/payments-gateways-prestashop-modules/1748-paypal.html Make sure to always have a backup of your files before you update modules. Do not hesitate to leave feedback about the module and if you have any issues, we can work together to solve them. If you are in the USA, Canada or Mexico, you can use this PayPal module here. http://addons.prestashop.com/en/payments-gateways-prestashop-modules/8277-paypalusa.html Cheers, -Benjamin Link to comment Share on other sites More sharing options...
ajensen27 Posted September 24, 2013 Author Share Posted September 24, 2013 Benjamin, Can the first Paypal module link you listed be used in the USA or no? I like this module way better than the USA, Canada, Mexico one. Especially since you have the option to authorize and capture the funds later (need this option). -Alex Link to comment Share on other sites More sharing options...
ajensen27 Posted September 24, 2013 Author Share Posted September 24, 2013 Never mind, I can see now that you guys changed the name to include "Europe" in it. Will you ever be adding the option to authorize and capture later to the USA, Canada, and Mexico one? Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 24, 2013 Share Posted September 24, 2013 Actually, I do believe you can use the PayPal 3.6 for USA but PayPal USA has other features that PayPal Europe does not have. That said, if those extra features are not needed, you can use PayPal Europe. Link to comment Share on other sites More sharing options...
ajensen27 Posted September 24, 2013 Author Share Posted September 24, 2013 Thanks Benjamin. The European Paypal module works fine except for the error in my inital post. It is occurring right after they submit the payment on the paypal page and it tries to redirect them back to the confirmation page on our site. It's still occurring after I updated to 3.6. -Alex Link to comment Share on other sites More sharing options...
ajensen27 Posted September 26, 2013 Author Share Posted September 26, 2013 (edited) Can someone pleaseeeee help me with this error? I'm getting customers every day asking to use Paypal but I have to tell them it's not working at the moment. Someone out there has to know why this error is occurring. Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT (/home/incontis/domains/domain.com/public_html/modules/paypal/paypal_orders.php, line 70) Edited January 29, 2015 by ajensen27 (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 26, 2013 Share Posted September 26, 2013 Hi Alex, you have also tried the PayPal 1.2.6 module as well? Neither one of the PayPal modules worked flawlessly on your store? Link to comment Share on other sites More sharing options...
ajensen27 Posted September 26, 2013 Author Share Posted September 26, 2013 Both give an error when trying to redirect back to my site. The payment gets processed on Paypal but when it tries to redirect the user back to our site, they get the error. Also, no new order is created on the backend. Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 26, 2013 Share Posted September 26, 2013 Have you turned on Error Reporting and checked out all possible errors that may be occurring? Link to comment Share on other sites More sharing options...
ajensen27 Posted September 26, 2013 Author Share Posted September 26, 2013 This was the error that displayed when I turned on error reporting Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT (/home/incontis/domains/llmedico.com/public_html/modules/paypal/paypal_orders.php, line 70) Link to comment Share on other sites More sharing options...
GT ITECH Posted October 6, 2013 Share Posted October 6, 2013 Hi guy, simply replace the line 70 of the paypal_orders.php with this : 'shipping' => (float)Tools::getValue(SHIPPING), It worked for me Bye. 2 Link to comment Share on other sites More sharing options...
ajensen27 Posted October 8, 2013 Author Share Posted October 8, 2013 Thanks TheMax but I did this and the got the same issue. Just brought me to a blank screen and didn't create the order on the backend. The paypal payment does go through though. Link to comment Share on other sites More sharing options...
GT ITECH Posted October 8, 2013 Share Posted October 8, 2013 (edited) Ok, did you got now another error with the line 426 of the file tools/swift/Swift/Message/Headers.php ? If yes, just replace this line with this : //return str_replace("' . $this->LE . '", "", "<$matches[1]>"); If no, just give us the error you have. For me when i makes this two changes (on paypal and on swift) it work perfectly with no bugs P.S: Sorry if my English is not perfect, I'm French Edited October 8, 2013 by TheMax98000 (see edit history) Link to comment Share on other sites More sharing options...
ajensen27 Posted October 8, 2013 Author Share Posted October 8, 2013 Thanks again for the reply TheMax. I have error reporting turned on but I don't see any errors, just a white screen. I also don't see any errors in the console. Also, my line 426 in Headers.php is blank. What line should I be replacing? Could you post that? Thanks! Link to comment Share on other sites More sharing options...
kimmy018 Posted January 27, 2014 Share Posted January 27, 2014 This is the section of code it is referring to. Does anyone see anything off (I'm not a programmer)? Thanks! 'shipping' => (float)$ppec->result['PAYMENTREQUEST_0_SHIPPINGAMT'], <---- this line public static function getTransactionDetails($ppec = false, $payment_status = false) { if ($ppec && $payment_status) { $transaction_id = pSQL($ppec->result['PAYMENTINFO_0_TRANSACTIONID']); return array( 'currency' => pSQL($ppec->result['PAYMENTINFO_0_CURRENCYCODE']), 'id_invoice' => null, 'id_transaction' => $transaction_id, 'transaction_id' => $transaction_id, 'total_paid' => (float)$ppec->result['PAYMENTINFO_0_AMT'], 'shipping' => (float)$ppec->result['PAYMENTREQUEST_0_SHIPPINGAMT'], 'payment_date' => pSQL($ppec->result['PAYMENTINFO_0_ORDERTIME']), 'payment_status' => pSQL($payment_status) ); } else { $transaction_id = pSQL(Tools::getValue(ID_TRANSACTION)); return array( 'currency' => pSQL(Tools::getValue(CURRENCY)), 'id_invoice' => pSQL(Tools::getValue(ID_INVOICE)), 'id_transaction' => $transaction_id, 'transaction_id' => $transaction_id, 'total_paid' => (float)Tools::getValue(TOTAL_PAID), 'shipping' => (float)Tools::getValue(SHIPPING), 'payment_date' => pSQL(Tools::getValue(PAYMENT_DATE)), 'payment_status' => pSQL($payment_status) ); } } Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT (/home/incontis/domains/llmedico.com/public_html/modules/paypal/paypal_orders.php, line 70) Hi Guys, I also encountered the above error right now. I'm using the latest version of paypal module which is 3.6.1. Anyone can help me to fix it? Thank you very much for your time! Link to comment Share on other sites More sharing options...
jimmyc Posted June 4, 2014 Share Posted June 4, 2014 Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT in ..............public_html/modules/paypal/paypal_orders.php on line 70 same error here and a couple of others Link to comment Share on other sites More sharing options...
hurray Posted August 22, 2014 Share Posted August 22, 2014 Me too. I am using Paypal 3.7.2, prestashop 1.5.6.2 and here is the error message. Can someone please help? Notice: Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT in /home/savdanac/public_html/modules/paypal/paypal_orders.php on line 70Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 130968 bytes) in /home/savdanac/public_html/tools/smarty/sysplugins/smarty_internal_compilebase.php on line 53 Link to comment Share on other sites More sharing options...
mathanganesh Posted January 5, 2015 Share Posted January 5, 2015 Anybody figured out the issue? Im having the same issue in the latest version: Notice: Undefined index: PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE in /home/kittyk7/public_html/modules/paypal/express_checkout/payment.php on line 91Fatal error Link to comment Share on other sites More sharing options...
bellini13 Posted January 5, 2015 Share Posted January 5, 2015 The module is expecting Paypal to provide the "shipping country code" in their response. For what ever reason it is missing, perhaps this order does not have shipping? You may want to reach out to Paypal and ask them why this parameter was not sent to your store. Link to comment Share on other sites More sharing options...
Rohans Posted February 27, 2015 Share Posted February 27, 2015 Hi, I am also facing similar error. I investigated the code a bit and found that PayPal API is not returning shipping address related values. PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE is completely missing but you can get country code by using $pped->result['COUNTRYCODE'] instead. Almost all the shipping address related values required under setCustomerAddress() function are missing in the "result" array of "$ppec" object. I am investigating it more and I will post here in case I will get success in finding any solution for this issue. In case anyone have already sorted it out, please post the solution here. Thanks in advance. Link to comment Share on other sites More sharing options...
bruce_ooi Posted March 25, 2015 Share Posted March 25, 2015 (edited) Hi all, I am also having this error on Paypal right now. Need it urgently to be fixed. Can anyone please help us?? I am using Prestashop 1.6.0.11 and Paypal Europe latest version v3.8.2. Any help will be very much appreciated, thank you! Edited March 25, 2015 by bruce_ooi (see edit history) Link to comment Share on other sites More sharing options...
kalua Posted March 31, 2015 Share Posted March 31, 2015 Same here ... Below all the errors I got: Notice: Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT in /var/www/vhosts/.../httpdocs/presta/modules/paypal/paypal_orders.php on line 70 Fatal error: Uncaught exception 'PrestaShopException' with message 'Property Order->payment is empty' in /var/www/vhosts/.../httpdocs/presta/classes/ObjectModel.php:866 Stack trace: #0 /var/www/vhosts/.../httpdocs/presta/classes/ObjectModel.php(272): ObjectModelCore->validateFields() #1 /var/www/vhosts.../httpdocs/presta/classes/order/Order.php(299): ObjectModelCore->getFields() #2 /var/www/vhosts/.../httpdocs/presta/classes/ObjectModel.php(480): OrderCore->getFields() #3 /var/www/vhosts/.../httpdocs/presta/classes/order/Order.php(304): ObjectModelCore->add(true, true) #4 /var/www/vhosts/.../httpdocs/presta/override/classes/PaymentModule.php(238): OrderCore->add() #5 /var/www/vhosts/.../httpdocs/presta/modules/paypal/paypal.php(1467): PaymentModule->validateOrder(31, 2, 0.1, '', 'Payment accepte...', Array, 1, false, '70af425524f66c7...', Object(Shop)) #6 /var/www/vhosts/.../httpdocs/presta/modules/paypal/express_checkout/payment.php(290): PayPal->validateOr in /var/www/vhosts/.../httpdocs/presta/classes/ObjectModel.php on line 866 Link to comment Share on other sites More sharing options...
corosion Posted April 20, 2015 Share Posted April 20, 2015 (edited) Excuse me for the bad language. Hi i have the same problem and i have fix it. It seems that paypal needs states for some address from some countries. I had the same problem with some addresses in china. Just add states to all countries listed above. Hope it helps. This is from the official documentation. PAYMENTREQUEST_n_SHIPTOSTATE State or province. It is required if the address is in one of the following countries: Argentina, Brazil, Canada, China, Indonesia, India, Japan, Mexico, Thailand or USA. PayPal accepts State codes for some countries. Character length and limitations: 40 single-byte characters. Edited April 20, 2015 by corosion (see edit history) Link to comment Share on other sites More sharing options...
aleixki Posted May 13, 2015 Share Posted May 13, 2015 Hello, Does anyone found any solution? I have been stuck for a week with the same problem and I can't find any solution. It is really frustrating this situation.. Does Paypal just not work with Prestashop 1.6 or what? Prestashop 1.6.0.14 - Paypal module v3.8.4 Thank you Link to comment Share on other sites More sharing options...
bellini13 Posted May 15, 2015 Share Posted May 15, 2015 Hello, Does anyone found any solution? I have been stuck for a week with the same problem and I can't find any solution. It is really frustrating this situation.. Does Paypal just not work with Prestashop 1.6 or what? Prestashop 1.6.0.14 - Paypal module v3.8.4 Thank you Did you bother to read the post above yours? Things work properly, when they are used properly. If you getting an error that says the address requires a State, then perhaps you should review the address being used, and ensure it has a valid State Link to comment Share on other sites More sharing options...
aleixki Posted May 18, 2015 Share Posted May 18, 2015 (edited) Hi Bellini,First of all thanks for replying.Of course I read the post above, I have read all post about this issue and there's no solution at the moment.For example in this post, the original issue (PAYMENTREQUEST_0_SHIPPINGAMT) is not solved yet. The solution shown above doesn't fix the issue, at least for me beacuse I don't sell to such a countrys, but no others users replied "worked for me" neither. I know things work properly when used right, this is why I'm trying to sort out where is my mistake, but i'm really surprised that this error has been reported more than once and never solved as far I could saw. Thanks Edited May 18, 2015 by aleixki (see edit history) Link to comment Share on other sites More sharing options...
aleixki Posted May 18, 2015 Share Posted May 18, 2015 (edited) Hi again, When I try to use bankwire payment option I get also an error:"Property OrderHistory->id_order_state is empty at line 872 in file classes/ObjectModel.php" This error also appears in the complete error with Paypal confirmation page: "Notice: Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT in /home/bfresccobu/www/modules/paypal/paypal_orders.php on line 70Fatal error: Uncaught exception 'PrestaShopException' with message 'Property OrderHistory->id_order_state is empty' in /home/bfresccobu/www/classes/ObjectModel.php:872 Stack trace: #0 /home/bfresccobu/www/classes/ObjectModel.php(278): ObjectModelCore->validateFields() #1 /home/bfresccobu/www/classes/ObjectModel.php(486): ObjectModelCore->getFields() #2 /home/bfresccobu/www/classes/order/OrderHistory.php(454): ObjectModelCore->add(true) #3 /home/bfresccobu/www/classes/order/OrderHistory.php(380): OrderHistoryCore->add(true) #4 /home/bfresccobu/www/classes/PaymentModule.php(676): OrderHistoryCore->addWithemail() #5 /home/bfresccobu/www/modules/paypal/paypal.php(1418): PaymentModuleCore->validateOrder(127, 2, 0.05, 'PayPal', 'Payment accepte...', Array, 2, false, 'e69f5af8ae551cc...', Object(Shop)) #6 /home/bfresccobu/www/modules/paypal/express_checkout/payment.php(290): PayPal->validateOrder(127, 2, 0.05, 'PayPal', 'Payment accepte...', Array, 2, false, 'e69f5af8ae551cc...', Object(Shop)) #7 /home/bfresccobu/www/modules/pay in /home/bfresccobu/www/classes/ObjectModel.php on line 872" It looks like there is something wrong with the id_order_state. I checked ps_order_state and it got the same content than a clean Prestashop install. Does anyone has past through this and found a solution other than reinstall Prestashop from scratch? Thank you Edited May 18, 2015 by aleixki (see edit history) Link to comment Share on other sites More sharing options...
trevorgilligan Posted July 20, 2015 Share Posted July 20, 2015 hi my country does not have any states would this work on paypal orders.php line 70 : ?? if shipping is zero set to zero?? change this: 'shipping' => (float)$ppec->result['PAYMENTREQUEST_0_SHIPPINGAMT'], to this: if ($ppec->result['PAYMENTREQUEST_0_SHIPPINGAMT']) { 'shipping' => (float)$ppec->result['PAYMENTREQUEST_0_SHIPPINGAMT'] } else { 'shipping' => 0 } , Link to comment Share on other sites More sharing options...
bellini13 Posted July 20, 2015 Share Posted July 20, 2015 having states or not does not have anything to do with free shipping. Can you explain what you are trying to accomplish? Do you want to provide free shipping? Or are you trying to remove the shipping address? If you do send a shipping address, it is important that your localization settings match what Paypal is expecting. If paypal thinks your Country has states, then you must provide states for that address, otherwise Paypal will provide you with an error. Link to comment Share on other sites More sharing options...
trevorgilligan Posted July 21, 2015 Share Posted July 21, 2015 what i want and im sure others trying. is to make it easy for customers to pay so that they pay, as opposed to filling in fields. i just need an email, so the error occurs when it doesnt find, country, address, city , zip code , etc... i sorted some of it out by if (no field) set to null or empty, ''. Link to comment Share on other sites More sharing options...
bellini13 Posted July 22, 2015 Share Posted July 22, 2015 There are fields that Paypal require, you cannot simply remove them and expect it to work... If you do not want to collect a shipping address from the customer, then you need to alter the paypal module so that a shipping address is not sent. The Paypal API supports by using a 'no shipping' parameter. You will need to read the Paypal API documentation and educate yourself on this. 1 Link to comment Share on other sites More sharing options...
trevorgilligan Posted July 22, 2015 Share Posted July 22, 2015 hey @bellini13 yes i understand missing fields = error. i have it set so that if the field is blank then it is null or empty ''. i have also set in paypal to not require certain fields, address , city etc. hopefully it works and thanks for the fast reply, trev Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now