Sphyrna Posted October 16, 2013 Share Posted October 16, 2013 Hello, My paypal module (USA) will not create orders in my Prestashop store. The back office shows customer carts, but no orders; the front office takes the customer all the way through the cart and successful paypal payment and confirmation and upon return to the store shows items in cart as if no order has been placed and no orders placed under their account. It has never worked even under earlier versions. The transactions do show in paypal sandbox. (currently 1.5.6.0 prestoshop and 1.2.6 paypal module) Things I have tried: Uninstalled and installed paypal 1.2.5 Upgraded to 1.5.6.0 from 1.5.4.1 and upgraded via zip archive to paypal 1.2.6 from 1.2.5 (update would not work) checked php extensions installed on server with presta admin guide reccomendations - php info looked good (really long, I can attach if wanted) searched forge for similar issues, all issues seemed to be before the payment through to paypal or blank pages set debug _PS_MODE_DEV_ and _PS_DEBUG_PROFILING_ to true in defines.inc.php as per prestashop system admin guide and didn't see any obvious errors (although I'm not sure I knew how to use these) successfully created an order in the back office with check pay module, proving the cart is capable of working Tested with: store enabled allow_url_fopen set to on (although I understand this is no longer required if cUrl is available) set paypal to api not required (still didn't work), switched back to required set paypal to ipn on (still didn't work), set back to off theme set to default Odd things that may or may not be related: php.ini file does not mention cUrl (can attach if wanted) transaction id generated and viewed in paypal sandbox for merchant account does not match the transaction id given to the customer (but amounts and dates match) In the back office page, smarty optimization shows an exclamation, performance page does not elaborate, smarty debug window seems okay as far as I can tell. Back office advanced parameters>performance page shows two warnings, despite memcached showing as installed in phpinfo: "To use Memcached, you must install the Memcache PECL extension on your server. http://www.php.net/manual/en/memcache.installation.php To use APC, you must install the APC PECL extension on your server. http://php.net/manual/en/apc.installation.php" Phar is being used instead of the mentioned PECL, could this be a problem? Also, Paypal module does not seem to allow express checkout to be selected, after saving it reverts to paypal standard and express becomes unchecked. I am so out of my depth with this. If anyone has any ideas please let me know. Thanks! 1 Link to comment Share on other sites More sharing options...
El Patron Posted October 16, 2013 Share Posted October 16, 2013 I didn't see your url, can you please post? Link to comment Share on other sites More sharing options...
djaenicke Posted October 16, 2013 Share Posted October 16, 2013 I have the same problem. Link to comment Share on other sites More sharing options...
El Patron Posted October 16, 2013 Share Posted October 16, 2013 make sure in your paypal account that you are not using the pro plan, it will not work with this module. if you do have pro account in paypal, revert back to standard Link to comment Share on other sites More sharing options...
djaenicke Posted October 16, 2013 Share Posted October 16, 2013 if i am paying paypal £20 a month do I now have to buy the pro account on prestashop for like £134 in order to be able to process the payments on my website? Link to comment Share on other sites More sharing options...
El Patron Posted October 16, 2013 Share Posted October 16, 2013 if i am paying paypal £20 a month do I now have to buy the pro account on prestashop for like £134 in order to be able to process the payments on my website? not I sure I understand your problem. when you run standard paypal account and not pro...your payments are working.... my understanding is that to use paypal account pro, you need the paid paypal pro module. none of my free module have the word pro in them. Link to comment Share on other sites More sharing options...
Sphyrna Posted October 16, 2013 Author Share Posted October 16, 2013 (edited) Hello El Patron and djaenicke, I realize now that the paypal sandbox account is set to paypal express, unfortunately when this option is selected at checkout there is a warning of an unsecure form being sent. However, it does break out the tax and shipping correctly (standard did not), but gift wrap is shown as a coupon(standard ignores gift wrap and does not charge for it). Express then returns the user to the cart page where it appears the customer hasn't checked out yet, even though they have accessed their paypal account and the customer account shows no orders placed. Ah ha, AH HA! The customer has to go one more step and click pay with paypal express. THEN, the order is created in prestashop and all is as it should be. Thank you so much for helping me with this. Questions: How do I secure the form sent to paypal that elicits the warning? Is there a way to integrate the paypal encryption service "website payment certificates"? Is there anyway to simplify the checkout process? I can add a note about needing to confirm payment on the last order page, but this seems like an awful lot of clicking. Note: allow_url_fopen does not seem to be required for the paypal payment module, this all worked with it set to off, I think it is only needed to update and compare your shop files to original to check for errors. I am glad I can turn it off as it is listed as a security risk. Also, there doesn't seem to be a method of deactivating standard payment on the paypal module, if I click "enable paypal express checkout only" it appropriately grays out the standard payment selection, but as soon as the save button is clicked it shows as active. Thank you so much. I am starting to see light at the end of the tunnel. Elizabeth Edited October 19, 2013 by Sphyrna (see edit history) 1 Link to comment Share on other sites More sharing options...
Sphyrna Posted October 16, 2013 Author Share Posted October 16, 2013 djaenicke, Are you referring to the "cut" that paypal takes for use if their system? From what I can tell with my website, I think that the problem is website "standard." Can you try setting the sandbox merchant account to "express" and enabling express checkout on your paypal module? You may now have two paypal buttons at checkout, but the one on top is express (in my shop). Try to run a test payment through and see if it works, you will have to push pay with paypal again on the last page that takes you back to your website. Hope it works, the rest I think (hope) can be fixed with code, setting, etc. Good luck. Elizabeth Link to comment Share on other sites More sharing options...
Sphyrna Posted October 16, 2013 Author Share Posted October 16, 2013 (edited) Okay, I found the express check out form code here: <form id="paypal-express-checkout-form" action="http://"mystore"/en/module/paypalusa/expresscheckout?pp_exp_initial=1" method="post" onsubmit="$('#paypal_express_checkout_id_product_attribute').val($('#idCombination').val()); $('#paypal_express_checkout_quantity').val($('#quantity_wanted').val());"> <input id="paypal-express-checkout-btn-product" type="image" name="submit" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" alt="" style="float: right; "></form> Can I change: action="http://"my store"/en/module/... to action="https and have the form sent over a secure connection? Thanks, Elizabeth Edited October 19, 2013 by Sphyrna (see edit history) Link to comment Share on other sites More sharing options...
djaenicke Posted October 16, 2013 Share Posted October 16, 2013 djaenicke, Are you referring to the "cut" that paypal takes for use if their system? From what I can tell with my website, I think that the problem is website "standard." Can you try setting the sandbox merchant account to "express" and enabling express checkout on your paypal module? You may now have two paypal buttons at checkout, but the one on top is express (in my shop). Try to run a test payment through and see if it works, you will have to push pay with paypal again on the last page that takes you back to your website. Hope it works, the rest I think (hope) can be fixed with code, setting, etc. Good luck. Elizabeth Ahhh nope I'm referring to this: http://www.prestashop.com/forums/topic/2821[spam-filter]paypal-europe-361-processes-payment-but-no-order-page/ it's really confusing and I do not want to have to pay £134 to be able to process the payments on my website unless i absolutely have to. Link to comment Share on other sites More sharing options...
Sphyrna Posted October 17, 2013 Author Share Posted October 17, 2013 If it was working, and now isn't, I'd call your server to see if they had made any changes and also call paypal. You are a paying customer, the least they could do is help you trouble shoot and they may also have made changes that are causing the problem. Good luck, these things sure can be frustrating. Link to comment Share on other sites More sharing options...
Sphyrna Posted October 17, 2013 Author Share Posted October 17, 2013 (edited) Okay, I found the express check out form code here: <form id="paypal-express-checkout-form" action="http://"my store"/en/module/paypalusa/expresscheckout?pp_exp_initial=1" method="post" onsubmit="$('#paypal_express_checkout_id_product_attribute').val($('#idCombination').val()); $('#paypal_express_checkout_quantity').val($('#quantity_wanted').val());"> <input id="paypal-express-checkout-btn-product" type="image" name="submit" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" alt="" style="float: right; "></form> Can I change: action="http:/"my store"/en/module/... to action="https and have the form sent over a secure connection? Thanks, Elizabeth Does anyone have any idea where to find this code? I have done a search of the paypal module and it doesn't seem to originate from those files. Is it pulling it from smarty compilation? Any ideas on how to find it? Thanks. P.S. I have figured out how to get Paypal standard working by following the directions contained in the module files. Yay! Edited October 19, 2013 by Sphyrna (see edit history) Link to comment Share on other sites More sharing options...
Kier Posted October 24, 2013 Share Posted October 24, 2013 Hi, I have the same issue this morning. I get a paypal payment with no order. V 1.5.5.0 with Paypal USA-Canada 1.2.6. Haven't changed anything, this just started happening this morning! Checked the permissions, this seems to be OK, also reinstalled module. Still not working. Any ideas? Link to comment Share on other sites More sharing options...
Kier Posted October 25, 2013 Share Posted October 25, 2013 Nevermind folks, looks like it must have been a PayPal issue or something. After spending most of the day yesterday trying to figure it out, it miraculously started working again by itself...go figure. Link to comment Share on other sites More sharing options...
xthunder Posted November 15, 2013 Share Posted November 15, 2013 I just had the same problem today - PayPal Payment WITHOUT the order being created. I have not tested and see if the problem has went away on its own but I will test this later tonight and report back. Link to comment Share on other sites More sharing options...
Joy Laney Posted November 21, 2013 Share Posted November 21, 2013 I am having this same problem but didn't see a solution here. I received an email notification from paypal of the order and funds are in my paypal account, however my presta shop module 1.5.6 does not show an order. Help! There are options available when my customer purchases a product, like color, that is not showing up in my paypal email that I am assuming will show up in my prestashop order info. BTW, this is my first order from my webpage, so it is not a matter of it was working and then quit. I am not very savy on all this yet, so you may have to 'dumb down' your reply for me. THANKS! Link to comment Share on other sites More sharing options...
Eric Nguyen Posted November 23, 2013 Share Posted November 23, 2013 (edited) I'm having the same problem with my PayPal Sandbox payment. I'm using PayPal Canada USA 1.2.7 module. PayPal Standard is enabled. My shop enables 2 currency USD and SGD with SGD being the default currency. Payment settings allow PayPal in both USA and Singapore. Both my personal and business PayPal Sandbox accounts have country as US. I have already configure my PayPal Sandbox account (business) to automatically accept payments of any currency. All payments went through smoothly but Prestashop hasn't recorded any order at all. Order is created for payment through BankWire however. My Prestashop version is 1.5.5.0 More info: When PayPal transaction is done, I was not redirected back to the shop. Once I clicked on the link to return to the shop manually I saw "You have not placed any order". I saw no error at all throughout the whole process. The URLs at the different stages are: https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=54eGf5XbGlGXddjNRyKhnA_ggRL6trxbPQGjP_-DSokbeqYF9QmsGCImY-G&dispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b081986471f9b93cfa01e00b63629be0164db1 https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=54eGf5XbGlGXddjNRyKhnA_ggRL6trxbPQGjP_-DSokbeqYF9QmsGCImY-G&dispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b081986471f9b93cfa01e00b63629be0164db1#pageState=review&pageDispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b081986471f9b93cfa01e00b63629be0164db1&pageSession=RXje-syPPKo36cPmyy0cDP-SYYQw8vIoJH4egapSF98e5dbSIxOLER-XT0m https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=d4mNEw3VqHYLpjMnxwaHeKG1R8O6dZeDqdUCJwucLmnHyYafEIEDIVG1ZoK&dispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b081986471f9b93cfa01e00b63629be0164db1 Updates I think this problem probably has to with the fact that I'm doing testing on localhost which is unreachable by PayPal Solution I figure out I'm supposed to use the PayPal Europe module instead of the Canada USA one since my shop is in Singapore - http://addons.prestashop.com/en/payments-gateways-prestashop-modules/1748-paypal.html Good luck to the rest of you, cheers Edited November 23, 2013 by Eric Nguyen (see edit history) Link to comment Share on other sites More sharing options...
Patchou Posted November 26, 2013 Share Posted November 26, 2013 I also have the same issue. I've setup a new store and downloaded the latest version of Prestashop from the site. Everythign works well appart from the Paypal module. I'm trying to use it with a Standard account. During checkout, the user is sent to Paypal, payment is processed but the new order is not registered by Prestashop. The cart is not emptied either, however, the Paypal transaction completed successfully. I use the US/Canada module, the transaction is done in CAD, the shop is in CAD as well as the Paypal account. The site is installed on an IIS server. Can somebody from Prestashop help us? this make a wonderful product unusable (what use is an e-commerce CMS that can't process payments?). Thank you. 1 Link to comment Share on other sites More sharing options...
coolpapes Posted November 26, 2013 Share Posted November 26, 2013 I'm having the same problem. I'm getting ready to transfer my site from volusion but need to get this worked out. Link to comment Share on other sites More sharing options...
Sphyrna Posted November 26, 2013 Author Share Posted November 26, 2013 (edited) This is for USA Paypal Standard payments (I decided on this as it allows for a credit card to be used without a Paypal account (although paypal doesn't make it very intuitive, but it is free)) I could not get express to operate without insecure form warnings. In contradiction of what I have read it does appear that IPN is required for paypal standard. Have you all gotten the paypal IPN setup? Log into Paypal >profile >my selling tools scroll down, click >instant payment notification - enable and set to http://www.mystore.com/modules/paypalusa/controllers/front/validation.php?pps=1 replacing *mystore* with your domain name, as outlined in the directions copied from the header in the standards payment .tpl file below "** Description: "PayPal Standard" payment form template ** ** This template is displayed on the payment page and called by the Payment hook ** ** Step 1: The customer is validating this form by clicking on the PayPal payment button ** Step 2: All parameters are sent to PayPal including the billing address to pre-fill a maximum of values/fields for the customer ** Step 3: The transaction success or failure is sent to you by PayPal at the following URL: http://www.mystore.com/modules/paypalusa/controllers/front/validation.php?pps=1 ** This step is also called IPN ("Instant Payment Notification") ** Step 4: The customer is redirected to his/her "Order history" page ("My account" section) *}" Hope this helps Edited November 26, 2013 by Sphyrna (see edit history) 1 Link to comment Share on other sites More sharing options...
Patchou Posted November 26, 2013 Share Posted November 26, 2013 (edited) I double checked and yes, IPN is set-up properly in my Paypal account. Still, nothing seems to be received by the Prestashop site. Is there any way I could debug this problem more thoroughly? Edited November 26, 2013 by Patchou (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted November 26, 2013 Share Posted November 26, 2013 I double checked and yes, IPN is set-up properly in my Paypal account. Still, nothing seems to be received by the Prestashop site. Is there any way I could debug this problem more thoroughly? access your error log from your hosting account. look for errors that may have taken place at order time. it would seem that an error must have happened on the return from payment by paypal and hopefully it is logged. Link to comment Share on other sites More sharing options...
bellini13 Posted November 26, 2013 Share Posted November 26, 2013 if Your IPN is setup correctly, then you should see a log of IPN events within your Paypal account. Did you locate the IPN that was sent by Paypal? Link to comment Share on other sites More sharing options...
Patchou Posted November 28, 2013 Share Posted November 28, 2013 Hello, I see no error in my web server logs. I checked the IPN history and everything seems find, I see an entry for each order that was placed with the following info each time: Date/time created: 11/26/2013 13:29 GMT-05:00 Original/Resent: Original Latest delivery attempt date/time: 11/26/2013 13:29 GMT-05:00 Notification URL: http://s.maliceauxmerveilles.com/fr/module/paypalusa/validation?pps=1 HTTP response code: 200 Delivery status: Sent No. of retries: 0 IPN type: Transaction made Strange isn't it? I just can't seem to find why Prestashop does not record it anywhere. As far as Paypal is concerned, all is well. As far as the e-commerce site is concerned, the order was never completed and the cart is still there on the client's computer. Link to comment Share on other sites More sharing options...
bellini13 Posted November 29, 2013 Share Posted November 29, 2013 are you able to resend the IPN from Paypal? Your best bet here is to resend the IPN and trace through the module coding to find where the issue is Link to comment Share on other sites More sharing options...
Patchou Posted November 29, 2013 Share Posted November 29, 2013 (edited) Problem found and fixed. I took the time to debug the PHPs of the Paypal module today and here are the problems I found: You must not specify the old "http://www.mystore.com/modules/paypalusa/controllers/front/validation.php?pps=1" url in your IPN settings at Paypal. The module sends the proper url to Paypal directly and this url is not valid anymore in the current version of Prestashop. The paypalusa.php file has a bug: is sends the price of each item with the tax included, and then sends the tax as a separate order entry, doubling the amount of the tax and causing an issue when Prestashop tries to match both amounts (cart and paid by Paypal) in the IPN notification. Here are the solutions: If you want to specify the IPN url manually, the correct link seems to be http://www.mystore.com/index.php?fc=module&module=PayPalUSA&controller=Validation&pps=1 You need to edit paypalusa.php to remove the double tax, see below. Steps to fix the problem with Paypal Standard enabled in the PayPal USA/Canada module version 1.2.7: Locate the file "/modules/paypalusa/paypalusa.php" on your server Replace the file by the one attached with this post, OR Search for the line that starts with 'paypal_usa_total_tax'. Delete it or insert "//" at the beginning. Hope it will help other people with the same issue. Cyril paypalusa.php Edited November 29, 2013 by Patchou (see edit history) 2 Link to comment Share on other sites More sharing options...
bellini13 Posted November 29, 2013 Share Posted November 29, 2013 I believe Prestshop would suggest one of 2 things here 1) Open a bug report with your findings so they can fix it 2) Create a github account and submit the code changes you made. A Prestashop developer will review and commit your changes to a future release of the module. Link to comment Share on other sites More sharing options...
Cory Heikel Posted November 30, 2013 Share Posted November 30, 2013 (edited) I am having a similar problem with paypal advanced. The order gets to paypal and the credit card is charged, but the verification screen is not displayed on return, and no order is created in prestashop. When i press ctrl+shift+j i see the following error displayed: [blocked] The page at 'https://twistedtoatee.com/order?multi-shipping=' was loaded over HTTPS, but ran insecure content from 'http://twistedtoatee.com/module/paypalusa/validation': this content should also be loaded over HTTPS. This was working and just stopped recently. I had not made changes to the site (that I am aware of). How do I fix this? I tried upgrading to paypal usa canada 1.2.7 but am getting the same results. Any help is greatly appreciated. Thanks Edited November 30, 2013 by Cory Heikel (see edit history) Link to comment Share on other sites More sharing options...
ClearSolid Posted December 1, 2013 Share Posted December 1, 2013 wow this paypal module is really broken - is there any fixes for this yet? not only does the payment go through without creating an order but if I add a cart rule - the values get mixed up and the discount itself becomes the value to pay. Does anyone have any suggestions on what to do here - I am ready to uninstall this mess of a plugin 1 Link to comment Share on other sites More sharing options...
Kiseki Posted December 2, 2013 Share Posted December 2, 2013 I've been having the same issue over the last year on 3 different PrestaShop websites which I created for my clients. All of the shops are using PayPal Pro and sometimes the orders get created and occasionally 2 or 3 orders each month do not even come through to the back office but the PayPal confirmation email is received for the correct amount. I tried going back to an older working version of the PayPal module 3.4.4 but I still I get the same issue with no order being logged in the back office. As other people have said, I haven't changed any settings on the server or the shop so it's very strange that this issue just arises on it's own. Any advice or help is greatly appreciated. 1 Link to comment Share on other sites More sharing options...
coolpapes Posted December 2, 2013 Share Posted December 2, 2013 I too am using advanced and getting frustrated with this module. I'm ready to launch my site but not if I can't get this to work. I tried the solution presented above with no success,still getting paid but not generating orders. 1 Link to comment Share on other sites More sharing options...
coolpapes Posted December 2, 2013 Share Posted December 2, 2013 I think I may be zeroing in on the problem but am limited by my lack of PHP knowledge. I am using the quick order screen. I don't go to the order conformation page after the payment is processed. So I think there is a missing link in the information chain so that when paypapl sends back a response it is not triggering order conformation or order generation. Even the cart remains unchanged after payment. Can someone with PHP knowledge take a look at this. Link to comment Share on other sites More sharing options...
Kiseki Posted December 2, 2013 Share Posted December 2, 2013 I think I may be zeroing in on the problem but am limited by my lack of PHP knowledge. I am using the quick order screen. I don't go to the order conformation page after the payment is processed. So I think there is a missing link in the information chain so that when paypapl sends back a response it is not triggering order conformation or order generation. Even the cart remains unchanged after payment. Can someone with PHP knowledge take a look at this. I did some testing in the sandbox mode for a scenario where a customer already had an existing PayPal account and if it was a new customer who paid on the site using their credit card, both worked fine and created an order in the back office. I have a similar theory to yourself, whereby if a customer already has a PayPal account they get redirected to a PayPal page, they login and complete their transaction and have the option to be redirected back to the shop and the order confirmation page. I think if they don't complete this part and navigate elsewhere before being redirected back to the site this may be a possible cause for the order not being generated. I too have a limited amount of PHP knowledge so I'd need someone to clarify or investigate if possible. Link to comment Share on other sites More sharing options...
ClearSolid Posted December 3, 2013 Share Posted December 3, 2013 Problem found and fixed. I took the time to debug the PHPs of the Paypal module today and here are the problems I found: You must not specify the old "http://www.mystore.com/modules/paypalusa/controllers/front/validation.php?pps=1" url in your IPN settings at Paypal. The module sends the proper url to Paypal directly and this url is not valid anymore in the current version of Prestashop. The paypalusa.php file has a bug: is sends the price of each item with the tax included, and then sends the tax as a separate order entry, doubling the amount of the tax and causing an issue when Prestashop tries to match both amounts (cart and paid by Paypal) in the IPN notification. Here are the solutions: If you want to specify the IPN url manually, the correct link seems to be http://www.mystore.com/index.php?fc=module&module=PayPalUSA&controller=Validation&pps=1 You need to edit paypalusa.php to remove the double tax, see below. Steps to fix the problem with Paypal Standard enabled in the PayPal USA/Canada module version 1.2.7: Locate the file "/modules/paypalusa/paypalusa.php" on your server Replace the file by the one attached with this post, OR Search for the line that starts with 'paypal_usa_total_tax'. Delete it or insert "//" at the beginning. Hope it will help other people with the same issue. Cyril the double tax thing worked by commenting out that line, but I have tried every possible IPN combination there is with, no success. The order does not get created. and on top of that when I come back from paypal to "order-confirmation" , I get a 302 moved permanently and then it proceeds to send me to the order-history Link to comment Share on other sites More sharing options...
ibndawood Posted December 3, 2013 Share Posted December 3, 2013 (edited) I am a little late on this thread but this is how paypal will work. In the last step 5. Payment, just right click on paypal logo and click on inspect element and you will see something like this : Now you can see two things: name="notify_url" and name="return" Notify URL is the URL that paypal uses to post the details of the transaction like payment status, currency, transaction ID. This notify URL is handled by paypalusa/controllers/front/validation.php Validation.php will receive the details from transactions and verify the source using paypal username, paypal signature, paypal password and paypal api name. Once it verifies the source, then it checks the payment status. An order is created only when the payment status is complete. Paypal notifies the transaction details as soon as the payment is made. So when the customer returns to our store the order is created. Incase if the order is not created, then it could be the following reasons : * Paypal API credentials are wrong. Make sure you give the proper API credentials. * The Notify URL is not reachable. If you are testing in localhost or within a firewall paypal cannot post the transaction details to your Notify URL and so an order is not created. * User does not pay. Well this is obvious. Otherwise this should work. Let me know if you have any questions. Edited December 3, 2013 by ibndawood (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted December 3, 2013 Share Posted December 3, 2013 What happens when the customer returns to the store, in advanced of the store receiving and processing the IPN? Link to comment Share on other sites More sharing options...
ibndawood Posted December 3, 2013 Share Posted December 3, 2013 What happens when the customer returns to the store, in advanced of the store receiving and processing the IPN? The customer will get this message : If you have just placed an order, it may take a few minutes for it to be validated. Please refresh this page if your order is missing. Link to comment Share on other sites More sharing options...
ClearSolid Posted December 3, 2013 Share Posted December 3, 2013 So there are still some issues regardless. Total pricing is not being caclulated properl as Patchou mentioned from above: line 686 paypalusa.php 'paypal_usa_total_tax' => (float)$this->context->cart->getOrderTotal(true) - (float)$this->context->cart->getOrderTotal(false), is wrong, this liines needs to be commented out or else your totals when you redirect to paypal will be wrong. As far as my api credentials, if they were wrong in any way which I have checked them many times wouldnt one of the following happen? A) an error would be thrown from paypal paypal would not process the total order amount I recieve no errors from either end and paypal is still processing the total amount, and yet I still have no orders being processed. Something is wrong. Patchou Link to comment Share on other sites More sharing options...
ClearSolid Posted December 3, 2013 Share Posted December 3, 2013 Would having it on Maintenance mode stop it from creating an order? Link to comment Share on other sites More sharing options...
bellini13 Posted December 4, 2013 Share Posted December 4, 2013 Yes, you would need to add all the Paypal IP addresses to the filter. Link to comment Share on other sites More sharing options...
ibndawood Posted December 4, 2013 Share Posted December 4, 2013 Here is the list of Paypal addresses : https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/howto_api_golivechecklist Link to comment Share on other sites More sharing options...
ebookstore Posted December 4, 2013 Share Posted December 4, 2013 (edited) Hi Everyone, I have an update on how to get Prestashop to create orders when PayPal verifies payment. This is when using PayPal USA, Canada 1.2.7 module. Select the PayPal Express Checkout only and Prestashop will process the orders. The problem is in the PayPal Payments Standard block do not enable it or it won’t work, it also won’t work if you try to enable both of them . Just enable the express checkout and you shouldn’t have any problems. Much Success! Sincerely, Keith Holloman CEO/Founder DIYDI BIZ NETWORK eBooks Store Edited December 4, 2013 by ebookstore (see edit history) Link to comment Share on other sites More sharing options...
coolpapes Posted December 4, 2013 Share Posted December 4, 2013 I think I've got it. In PayPal Manager -> Service Settings -> Setup under the Payment Confirmation heading, for "Show Confirmation Page" choose "On my website" Then for "Enter Return URL" enter "http://yoursite.com/modules/paypalusa/controllers/front/validation.php" For "Return URL Method" select "Post" from the drop down menu. Go to the bottom of the page and click on "Save Changes" It worked for me, the order is created, the cart is emptied and I land on the order confirmation page. I think that the software must be sending an invalid return url but I don't know enough about PHP to figure out where that happens. Link to comment Share on other sites More sharing options...
ajensen27 Posted December 4, 2013 Share Posted December 4, 2013 Hi Everyone, I have an update on how to get Prestashop to create orders when PayPal verifies payment. This is when using PayPal USA, Canada 1.2.7 module. Select the PayPal Express Checkout only and Prestashop will process the orders. The problem is in the PayPal Payments Standard block do not enable it or it won’t work, it also won’t work if you try to enable both of them . Just enable the express checkout and you shouldn’t have any problems. Much Success! Sincerely, Keith Holloman CEO/Founder DIYDI BIZ NETWORK eBooks Store I think I've got it. In PayPal Manager -> Service Settings -> Setup under the Payment Confirmation heading, for "Show Confirmation Page" choose "On my website" Then for "Enter Return URL" enter "http://yoursite.com/modules/paypalusa/controllers/front/validation.php" For "Return URL Method" select "Post" from the drop down menu. Go to the bottom of the page and click on "Save Changes" It worked for me, the order is created, the cart is emptied and I land on the order confirmation page. I think that the software must be sending an invalid return url but I don't know enough about PHP to figure out where that happens. Problem found and fixed. I took the time to debug the PHPs of the Paypal module today and here are the problems I found: You must not specify the old "http://www.mystore.com/modules/paypalusa/controllers/front/validation.php?pps=1" url in your IPN settings at Paypal. The module sends the proper url to Paypal directly and this url is not valid anymore in the current version of Prestashop. The paypalusa.php file has a bug: is sends the price of each item with the tax included, and then sends the tax as a separate order entry, doubling the amount of the tax and causing an issue when Prestashop tries to match both amounts (cart and paid by Paypal) in the IPN notification. Here are the solutions: If you want to specify the IPN url manually, the correct link seems to be http://www.mystore.com/index.php?fc=module&module=PayPalUSA&controller=Validation&pps=1 You need to edit paypalusa.php to remove the double tax, see below. Steps to fix the problem with Paypal Standard enabled in the PayPal USA/Canada module version 1.2.7: Locate the file "/modules/paypalusa/paypalusa.php" on your server Replace the file by the one attached with this post, OR Search for the line that starts with 'paypal_usa_total_tax'. Delete it or insert "//" at the beginning. Hope it will help other people with the same issue. Cyril Tried all 3 of these methods and none worked. The payment goes through to Paypal and the user is redirected back to the order history page but no order is created in Prestashop. This was using the Paypal USA, Canada vs 1.2.7 I also tried using the regular Paypal vs 3.7 and it does almost the same thing. The payment goes through to Paypal but then the user is directed back to a Paypal confirmation page on my site. When I hit the "Confirm" button, I'm brought to an blank page that shows no errors. I have debugging enabled and nothing is shown in my console. I'm at my wits end. This is SO FRUSTRATING!! 2 Paypal modules that SHOULD WORK both don't work. How is this not a #1 issue on the Prestashop developers plate? I am willing to pay any developers to fix this for me. Please PM me. I really want to get the regular Paypal vs 3.7 module working since it has the built in Authorize and Capture later feature. Thanks!! 1 Link to comment Share on other sites More sharing options...
ClearSolid Posted December 4, 2013 Share Posted December 4, 2013 (edited) I think I've got it. In PayPal Manager -> Service Settings -> Setup under the Payment Confirmation heading, for "Show Confirmation Page" choose "On my website" Then for "Enter Return URL" enter "http://yoursite.com/modules/paypalusa/controllers/front/validation.php" For "Return URL Method" select "Post" from the drop down menu. Go to the bottom of the page and click on "Save Changes" It worked for me, the order is created, the cart is emptied and I land on the order confirmation page. I think that the software must be sending an invalid return url but I don't know enough about PHP to figure out where that happens. PayPal Manager -> Service Settings -> Setup under the Payment Confirmation heading, for "Show Confirmation Page" Where is this? Edited December 4, 2013 by ClearSolid (see edit history) Link to comment Share on other sites More sharing options...
ClearSolid Posted December 4, 2013 Share Posted December 4, 2013 Tried all 3 of these methods and none worked. The payment goes through to Paypal and the user is redirected back to the order history page but no order is created in Prestashop. This was using the Paypal USA, Canada vs 1.2.7 I also tried using the regular Paypal vs 3.7 and it does almost the same thing. The payment goes through to Paypal but then the user is directed back to a Paypal confirmation page on my site. When I hit the "Confirm" button, I'm brought to an blank page that shows no errors. I have debugging enabled and nothing is shown in my console. I'm at my wits end. This is SO FRUSTRATING!! 2 Paypal modules that SHOULD WORK both don't work. How is this not a #1 issue on the Prestashop developers plate? I am willing to pay any developers to fix this for me. Please PM me. I really want to get the regular Paypal vs 3.7 module working since it has the built in Authorize and Capture later feature. Thanks!! I am seeing the same issues, have tried everything above, and nothing works orders are not being created. Link to comment Share on other sites More sharing options...
coolpapes Posted December 4, 2013 Share Posted December 4, 2013 PayPal Manager -> Service Settings -> Setup under the Payment Confirmation heading, for "Show Confirmation Page" Where is this? Its in PayPal manager. There should be a link at the top of the page when you sign in to PayPal Also it should be noted that I am using Payments Advanced. Link to comment Share on other sites More sharing options...
ClearSolid Posted December 4, 2013 Share Posted December 4, 2013 (edited) so I have an update to all those that are pulling there hair out like me and my team. We ditched this paypalusa module and went with another one https://github.com/PrestaShop/PrestaShop-modules/tree/master/paypal and here is the whole list of modules for prestashop https://github.com/PrestaShop/PrestaShop-modules this one is working fine for us cheers hope this helps Edited December 4, 2013 by ClearSolid (see edit history) Link to comment Share on other sites More sharing options...
ajensen27 Posted December 4, 2013 Share Posted December 4, 2013 so I have an update to all those that are pulling there hair out like me and my team. We ditched this paypalusa module and went with another one https://github.com/PrestaShop/PrestaShop-modules/tree/master/paypal and here is the whole list of modules for prestashop https://github.com/PrestaShop/PrestaShop-modules this one is working fine for us cheers hope this helps Thanks ClearSolid! I downloaded the European Module but when I went to install it I get the Green bar saying "Module downloaded successfully" but it puts it under the module "Paypal Pro (Addons)" which is always in my list of modules but has a little cart icon that it costs $199. I don't want to pay $199 for a module that should be free. Is there any way around this? Is it the same module or is my Prestashop doing something screwy? Link to comment Share on other sites More sharing options...
ClearSolid Posted December 4, 2013 Share Posted December 4, 2013 Thanks ClearSolid! I downloaded the European Module but when I went to install it I get the Green bar saying "Module downloaded successfully" but it puts it under the module "Paypal Pro (Addons)" which is always in my list of modules but has a little cart icon that it costs $199. I don't want to pay $199 for a module that should be free. Is there any way around this? Is it the same module or is my Prestashop doing something screwy? grab it off the git hub link , I updated the link for you. its 100% working Link to comment Share on other sites More sharing options...
ajensen27 Posted December 4, 2013 Share Posted December 4, 2013 I was able to download the module and it says it was successfully downloaded when I upload it to my Prestashop. But if you see the image that I attached, you'll see what I'm talking about. Link to comment Share on other sites More sharing options...
ClearSolid Posted December 4, 2013 Share Posted December 4, 2013 I was able to download the module and it says it was successfully downloaded when I upload it to my Prestashop. But if you see the image that I attached, you'll see what I'm talking about. you have the wrong one installed Link to comment Share on other sites More sharing options...
ajensen27 Posted December 5, 2013 Share Posted December 5, 2013 I don't have this module installed. The Paypal Pro module is one of the modules that Prestashop tries to market to you in the list of modules. When I go to install the module you gave me in the link that I download, the above picture is what happens. I believe it thinks the module is already installed. How can I change the naming of the module I'm trying to install so Prestashop doesn't think it's already installed? Which file is it within the ZIP file that it looks at? Link to comment Share on other sites More sharing options...
ajensen27 Posted December 5, 2013 Share Posted December 5, 2013 Now I see that this Paypal "Europe" module is the same one that already comes pre-installed with Prestashop but is just named "Paypal" in the list of modules. I had issues with this module on our store as well so this doesn't help me. Thanks anyways. Link to comment Share on other sites More sharing options...
jeyjoo Posted December 6, 2013 Share Posted December 6, 2013 I am comletely with you on this @ajensen27 and everyone else on here having the problem. I would love some clarification from Prestashop on this. The issue seems to be affecting many people on latest Prestashop and Paypal USA module. What is the use of a e-commerce that does not work properly. We are currently using Hika shop on Joomla for our new e-commerce projects until this gets resolved. If it is a money issue and we are expected to buy a paid module as the free one is not being supported, then that is fin for me, but please say so, rather than people just being left hanging. Many people on here have quoted companies for e-commerce websites without factoring in paid paypal modules and 1 month messing around as paypal module does not work. If I am doing something wrong here then I will stand to be corrected. Link to comment Share on other sites More sharing options...
coolpapes Posted December 6, 2013 Share Posted December 6, 2013 I still don't have this module working properly despite many hours on the phone with paypal and researching online. I get order creation and transactions are being processed but no customer info is being sent to Paypal. This module is the #1 obstacle preventing me from moving forward. Link to comment Share on other sites More sharing options...
ClearSolid Posted December 6, 2013 Share Posted December 6, 2013 (edited) Thanks ClearSolid! I downloaded the European Module but when I went to install it I get the Green bar saying "Module downloaded successfully" but it puts it under the module "Paypal Pro (Addons)" which is always in my list of modules but has a little cart icon that it costs $199. I don't want to pay $199 for a module that should be free. Is there any way around this? Is it the same module or is my Prestashop doing something screw so I have an update to all those that are pulling there hair out like me and my team. We ditched this paypalusa module and went with another one https://github.com/PrestaShop/PrestaShop-modules/tree/master/paypal and here is the whole list of modules for prestashop https://github.com/PrestaShop/PrestaShop-modules this one is working fine for us cheers hope this helps Guys I was having the exact same problem as you all - Please believe me when I tell you to download and install the paypal module offered through the git hub links mentioned above. Our shop is up and running right now http://www.stixnstones.ca/ . This will save alot of headache if you just try it. Edited December 6, 2013 by ClearSolid (see edit history) Link to comment Share on other sites More sharing options...
coolpapes Posted December 6, 2013 Share Posted December 6, 2013 Guys I was having the exact same problem as you all - Please believe me when I tell you to download and install the paypal module offered through the git hub links mentioned above. Our shop is up and running right now http://www.stixnstones.ca/ . This will save alot of headache if you just try it. How do I download this module. I've never used github and don't see a download link. I realize this may be a stupid question but I'm desperate to get this working. Link to comment Share on other sites More sharing options...
ajensen27 Posted December 6, 2013 Share Posted December 6, 2013 This one doesn't work for me either but here's the link http://addons.prestashop.com/en/payments-gateways-prestashop-modules/1748-paypal.html Link to comment Share on other sites More sharing options...
coolpapes Posted December 7, 2013 Share Posted December 7, 2013 so I have an update to all those that are pulling there hair out like me and my team. We ditched this paypalusa module and went with another one https://github.com/PrestaShop/PrestaShop-modules/tree/master/paypal and here is the whole list of modules for prestashop https://github.com/PrestaShop/PrestaShop-modules this one is working fine for us cheers hope this helps I can't get this one to work either. This is really starting to suck. Link to comment Share on other sites More sharing options...
doekia Posted December 7, 2013 Share Posted December 7, 2013 From my experience there are good chance your problem be related to the backward_compatibility thingy. What I usually do is patching all payment module to ensure that whatever modules get hooked to order creation event, it will not make PS to die prematurly: public function validateOrder($id_cart, $id_order_state, $amount_paid, $payment_method = 'Unknown', $message = null, $extra_vars = array(), $currency_special = null, $dont_touch_amount = false, $secure_key = false, Shop $shop = null) { global $cookie, $cart; if (!is_object($cookie)) { $cart = new Cart($id_cart); $cookieLifetime = (time() + (((int)Configuration::get('PS_COOKIE_LIFETIME_FO') > 0 ? (int)Configuration::get('PS_COOKIE_LIFETIME_FO') : 1)* 3600)); $cookie = new Cookie('ps', '', $cookieLifetime); $cookie->id_currency = (int)$cart->id_currency; $cookie->id_lang = (int)$cart->id_lang; $cookie->id_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'); $cookie->id_customer = (int)$cart->id_customer; } return parent::validateOrder($id_cart,$id_order_state,$amount_paid,$payment_method, $message,$extra_vars,$currency_special,$dont_touch_amount,$secure_key,$shop); } Link to comment Share on other sites More sharing options...
cbjarnson Posted December 7, 2013 Share Posted December 7, 2013 I got the github paypal module to work on my sites. I tried the paypausa on github and that did not work. Make sure to just use the paypal module. Link to comment Share on other sites More sharing options...
doekia Posted December 7, 2013 Share Posted December 7, 2013 Re-read what I just said, problem relates to other modules Link to comment Share on other sites More sharing options...
bellini13 Posted December 8, 2013 Share Posted December 8, 2013 Re-read what I just said, problem relates to other modules This assumes 1) The merchant is using other payment modules 2) The other payment modules are hooking newOrder or orderConfirmation It would be better if you explain what you are actually changing or 'protecting' by your patch. It is not clear from the code you provided what you are doing. Link to comment Share on other sites More sharing options...
doekia Posted December 8, 2013 Share Posted December 8, 2013 other modules not necessarly payment modules There are numerous modules that hook on order creation and order change state (not a surprise this is a ecommerce solution, hence order is the gem here). If a module is using backward_compatibility there is a pretty good change some code will die because recent modules expects $context to be populated while backward_compatibility modules expects $cookie and other globals Unfortunatly during IPN validation phase the global $cookie does not exists at all and backward_compatibility layer is too optimistic and does not nest enough data... During hookExec it became apocaliptic because numerous portion of Prestashop does if (!Validate::something) die('Fatal error'); the process stops abruptly without completing -> inconsistency Link to comment Share on other sites More sharing options...
doekia Posted December 8, 2013 Share Posted December 8, 2013 It is not clear from the code you provided what you are doing. My code does: if the global $cookie is not an object let create a sane one call the parent function with passed parameters In short the backward compatibility layers does someting like: global $cookie; if we are in an object create a $this->context and attach the $cookie to it When $cookie is null this lead to code trying to access $context->cookie->property This triggers a fatal error since $cookie is not an object at all (not to mention not a $cookie Link to comment Share on other sites More sharing options...
bellini13 Posted December 8, 2013 Share Posted December 8, 2013 since paypalusa does not use backwards compat module or include its library, then I would agree what you are solving for is not related to the module. so your assumption here is that any other module is being executed via hook, or even an override class or controller that may have been introduced. and either those modules or overrides are including backwards compat. I get your point about the IPN and there not being an existing context or cookie (since it is not the customer, but rather Paypal server) so your code protects the order creation process by ensuring there is a valid cookie and context created. Hoping PS developers are paying attention here. I'm thinking the Paypal module should be handling this, and ensuring the entry point (IPN handler) would be ensuring that the client context and cookies are being created, so that the rest of Prestashop will work properly 1 Link to comment Share on other sites More sharing options...
tmcadapt Posted December 11, 2013 Share Posted December 11, 2013 The problem is that extra tax is added, so the amounts are different. This one fixed it for me http://www.prestashop.com/forums/topic/288786-solution-paypal-charging-tax-per-line-and-total-tax/ Link to comment Share on other sites More sharing options...
ajensen27 Posted December 11, 2013 Share Posted December 11, 2013 For anyone at their wits end with this module and you need it fixed right away, I would highly recommend hiring ibndawood. He did a great job with my issue and my module is now working. 2 Link to comment Share on other sites More sharing options...
El Patron Posted December 11, 2013 Share Posted December 11, 2013 For anyone at their wits end with this module and you need it fixed right away, I would highly recommend hiring ibndawood. He did a great job with my issue and my module is now working. thanks for the recommend, he is a great asset to the community. 1 Link to comment Share on other sites More sharing options...
ibndawood Posted December 12, 2013 Share Posted December 12, 2013 Thank you Alex for your feedback and Thank you El Patron , you are being generous but coming from the prestashop superstar it means a lot 1 Link to comment Share on other sites More sharing options...
ibndawood Posted December 12, 2013 Share Posted December 12, 2013 From what I have seen, most problems with paypal are due to compatability. For example older versions of PS using a newer version of Paypal. The best way to debug this is to test out thoroughly in sandbox mode with debug enabled. In case of Alex, the error was Order state could not be loaded which is due to the fact that paypal uses order states 10, 11, 12 and 13 and those ids were missing from ps_order_state table. The above is just one case, I found one couple of days back which was due to Cart instance calling a method that was included in the later version of prestashop and missing in the older versions. 1 Link to comment Share on other sites More sharing options...
JasGrand Posted December 17, 2013 Share Posted December 17, 2013 I am a little late on this thread but this is how paypal will work. In the last step 5. Payment, just right click on paypal logo and click on inspect element and you will see something like this : paypalorders.png Now you can see two things: name="notify_url" and name="return" Notify URL is the URL that paypal uses to post the details of the transaction like payment status, currency, transaction ID. This notify URL is handled by paypalusa/controllers/front/validation.php Validation.php will receive the details from transactions and verify the source using paypal username, paypal signature, paypal password and paypal api name. Once it verifies the source, then it checks the payment status. An order is created only when the payment status is complete. Paypal notifies the transaction details as soon as the payment is made. So when the customer returns to our store the order is created. Incase if the order is not created, then it could be the following reasons : * Paypal API credentials are wrong. Make sure you give the proper API credentials. * The Notify URL is not reachable. If you are testing in localhost or within a firewall paypal cannot post the transaction details to your Notify URL and so an order is not created. * User does not pay. Well this is obvious. Otherwise this should work. Let me know if you have any questions. Hi, I am having the same issue... I'm using prestashop 1.5.6.0 and paypalusa module 1.2.7. Everything worked in sandbox mode so i turned it to live mode (using the API) and received my first order tonight and it seems the order wasn't recorded (i got paid through paypal but the order wasn't created in the database). I inspected the element as you did above and noticed that the notify and return urls are different. The one's on my site are as follows: <input type="hidden" name="notify_url" value="http://mysite.com/module/paypalusa/validation?pps=1"> <input type="hidden" name="return" value="http://mysite.com/order-confirmation"> Could this be the reason why the order was not created properly? If so, where do i change these values? Thanks Link to comment Share on other sites More sharing options...
cjrent Posted December 17, 2013 Share Posted December 17, 2013 I too have had this problem start today. I had to use the Paypal Module in gihub as suggested by ClearSolid and that seemed to do the trick. Link to comment Share on other sites More sharing options...
ibndawood Posted December 18, 2013 Share Posted December 18, 2013 Hello Jas, Thank you for contacting me via skype. For the benefit of the community I will just record what we did. I took a look at Jas's website and yes, paypal did not create an order for a particular payment. I tried the sandbox mode and enabled debugging. The payment was smooth and paypal did create an order. Jas was using paypal website standard with paypalusa module. There was a warning that said there was no server was configured because memcache was enabled. I wanted to keep it clean so I disabled caching and that error went away. Please note that this error would not have thrown if debug mode had not been enabled. We created a test product with 1 dollar and tried paying real time. Sounds weird but this time order was created successfully. For paypal using paypalusa, validation.php is the file that creates the order. I suspect that there could have been a fatal error that prevented validation.php to be fully executed. I checked the paypal logs as well as server logs and there were no indication of any errors related to paypal. Could not reproduce the error as successive paypal payments were smooth. However the only change I did was eliminating the warning that PHP throwed (I don't think a PHP warning would stop validation.php from being fully executed). Hope this helps others facing same problem. 3 Link to comment Share on other sites More sharing options...
bellini13 Posted December 20, 2013 Share Posted December 20, 2013 You could have taken one more step, which was to enable memcache again and confirm the warning, and then try the $1.00 order to see if you could replicate the issue. Link to comment Share on other sites More sharing options...
lemonshuan Posted December 20, 2013 Share Posted December 20, 2013 Encountered the exact same problem and right about one step to give up my hope and abandon the whole shop with another platform, I gave it a try to have ibndawood step in to help me if there's any possibility to fix it. And out of my expectation, ibndawood recovered it back within few hours and now paypal issue not happening anymore. Link to comment Share on other sites More sharing options...
ibndawood Posted December 23, 2013 Share Posted December 23, 2013 Hello Bellini, I think that is a nice idea to debug. Wondering why this didn't strike me before. Lemonshuan, Thank you for your feedback. This is how I fixed Lemonshuan's website. Recording it for the sake of community : The website had products that had (") double quotes in their product names like for example 7" LCD Display When prestashop receives transaction data from paypal it escapes the quote like this 7\" LCD Display. Now prestashop posts the escaped product name back to paypal to verify the POST details. Paypal returns invalid and hence no order was created. I fixed the problem by stripping slashes. Hope this helps for others having same problem. 4 Link to comment Share on other sites More sharing options...
bellini13 Posted December 23, 2013 Share Posted December 23, 2013 Hello Bellini, I think that is a nice idea to debug. Wondering why this didn't strike me before. Lemonshuan, Thank you for your feedback. This is how I fixed Lemonshuan's website. Recording it for the sake of community : The website had products that had (") double quotes in their product names like for example 7" LCD Display When prestashop receives transaction data from paypal it escapes the quote like this 7\" LCD Display. Now prestashop posts the escaped product name back to paypal to verify the POST details. Paypal returns invalid and hence no order was created. I fixed the problem by stripping slashes. Hope this helps for others having same problem. Thanks for sharing this. You should submit your changes to the github so that new versions of these modules would benefit from it. I suspect Europe and USA both have the same issue Link to comment Share on other sites More sharing options...
doekia Posted December 23, 2013 Share Posted December 23, 2013 The website had products that had (") double quotes in their product names like for example 7" LCD Display...Hope this helps for others having same problem. Nicely spotted, it does help. double quote in adresses cause also trouble in Prestashop's core,... Link to comment Share on other sites More sharing options...
ibndawood Posted December 24, 2013 Share Posted December 24, 2013 (edited) Thanks for sharing this. You should submit your changes to the github so that new versions of these modules would benefit from it. I suspect Europe and USA both have the same issue Thanks Bellini & Doekia. I am not sure if this problem is reproducible in Paypal Europe as Paypal Europe uses express checkout even for Web Standard and this issue so far occurs only with Web Standards. I have raised an issue in Forge : http://forge.prestashop.com/browse/PNM-1954 I have also submitted a pull request via GitHub. Here is the code fix for the problem : https://github.com/Prestastrap/PrestaShop-modules/commit/79b0eab5c4c795eca69f8121a0010b6d50ee68e3 There are also 2 other bugs which I found, raised issue and submitted pull requests. Nothing have been merged yet. https://github.com/PrestaShop/PrestaShop-modules/pulls/ibndawood Edited December 24, 2013 by ibndawood (see edit history) 2 Link to comment Share on other sites More sharing options...
ibndawood Posted January 30, 2014 Share Posted January 30, 2014 Update: 2 of my pull requests have been merged. The third one (the strip slashes fix) is being discussed. Hopefully that gets merged as well. Meanwhile there is another bug. I found this bug while working on this thread : http://www.prestashop.com/forums/topic/303504-paypay-ipn-not-getting-triggered-round-2 I created an issue. http://forge.prestashop.com/browse/PSCFV-11593 I am reproducing it here : Steps to reproduce the bug 1. Login to the Administration Panel and go to Price Rules -> Catalog Price Rules. 2. Create a Catalog Price Rule which will offer all the customers (which means this discount is not applied for visitors or Guests) will get a discount of 6.25% (or any amount). (See : CatalogPriceRules.png) 3. Now add any product to the cart, register and login as a customer. Now the shopping cart summary will have the discount applied. (See : ShoppingCartSummary.png) 4. Now make a purchase using paypal. 5. No Order will be created. The Cause While validating the paypal order, paypal checks the cart total against the mc_gross (the total amount paid at paypal) value posted by paypal. Only when the two totals match an order is created. The static function Cart::getOrderTotal() returns without applying the Catalog price rule (In this case the Cart:getOrderTotal() method returns $66.05 instead of $61.03). The Fix On investigating further, this is what I found : Cart::getOrderTotal() calls another static method Product::getPriceStatic(). This Product::getPriceStatic() method uses the group ID to calculate the catalog price rules. The group ID is determined like this in line 2514: $id_group = (int)Group::getCurrent()->id; The above line checks for the customer in the context. When Paypal posts the data, $id_group is returned as 1 which is the group of the visitor. Instead it should return the group of the customer ID. Since the group returned is visitor, no discount is applied and hence the difference in the cart totals. I am working on the code fix. Will submit the pull request. 1 Link to comment Share on other sites More sharing options...
ibndawood Posted January 30, 2014 Share Posted January 30, 2014 (edited) I have submitted another pull request to fix the above bug. The Bug : http://forge.prestashop.com/browse/PSCFV-11593 The Pull Request : https://github.com/PrestaShop/PrestaShop/pull/1312 The Fix : https://github.com/PrestaShop/PrestaShop/pull/1312/files Thank you everyone for contacting me and letting me know of your paypal bugs. It gives me an opportunity to contribute to prestashop's open source code. Edited January 30, 2014 by ibndawood (see edit history) 2 Link to comment Share on other sites More sharing options...
El Patron Posted January 30, 2014 Share Posted January 30, 2014 I have submitted another pull request to fix the above bug. The Bug : http://forge.prestashop.com/browse/PSCFV-11593 The Pull Request : https://github.com/PrestaShop/PrestaShop/pull/1312 The Fix : https://github.com/PrestaShop/PrestaShop/pull/1312/files Thank you everyone for contacting me and letting me know of your paypal bugs. It gives me an opportunity to contribute to prestashop's open source code. The community is very grateful for your good work! 1 Link to comment Share on other sites More sharing options...
ibndawood Posted January 30, 2014 Share Posted January 30, 2014 Thank you El Patron 2 Link to comment Share on other sites More sharing options...
Cory Heikel Posted February 4, 2014 Share Posted February 4, 2014 I could really use some help. I'm running prestashop 1.5.5.0 with paypal usa/canada 1.3.1 using paypal payments advanced. The checkout accepts the credit card information, paypal processes it but i get no order created. if i run the transaction in IE i get a security warning which says: Do you want to view only the webpage content that was delivered securely? The webpage contains content that will not be delivered using a secure HTTPS connection, which could compromise the security of the entire webpage.It then grays out the box where the order confirmation would be. It appears that this box is switching from https to http between the order and verification. If i click "no" on the popup error mentioned above everything works fine, but i can't ask customers to do that. Do you have any ideas what could be causing this and how to fix it? I'm desperate! Thank you. cory Link to comment Share on other sites More sharing options...
ajensen27 Posted February 4, 2014 Share Posted February 4, 2014 Cory, I would highly recommend messaging IBNDAWOOD. Yeah it will probably cost a little money, but he's really good and no doubt he will find your issue. Link to comment Share on other sites More sharing options...
Cory Heikel Posted February 4, 2014 Share Posted February 4, 2014 yeah, i contacted him. thought i'd post again in here to see if anyone else was seeing this. Link to comment Share on other sites More sharing options...
ibndawood Posted February 5, 2014 Share Posted February 5, 2014 Thank you Alex for your referral. Hello Corry I'll respond to your conversation. Once (and if) I solve your issue I'll post the fix here for others to see. 1 Link to comment Share on other sites More sharing options...
Larry Sainte-Marie Posted March 6, 2014 Share Posted March 6, 2014 Ibndawood, Thank you very much. I am glad I read this thread, implemented the "discount" fix for paypal. and now my wholesale customers can order and pay with paypal. only 1 problem, when returning to the website from paypal payment they see : <red warning box> Unfortunately, an error occurred during the transaction. Please double-check your credit card details and try again. If you need further assistance, feel free to contact us anytime. </> However, I get the payment, order is created, the order is in customer's history...everything looks correct, except for the red warning box. any ideas? Link to comment Share on other sites More sharing options...
Larry Sainte-Marie Posted March 6, 2014 Share Posted March 6, 2014 a little more detail on my above error I found that the text of the error is coming from the \modules\paypalusa\views\templates\hook\order-confirmation.tpl template however in this file it states ** This template is displayed to the customer upon order creation ** Products concerned: PayPal Payments Advanced, PayPal Express Checkout ** PayPal Payments Standard is not using this template and is redirecting the customer to their "Order History" page ("My account" section) but I am using Standard, and Standard works for customers that are not in any customer group with a discount. so it is odd that this template is being invoked. Link to comment Share on other sites More sharing options...
El Patron Posted March 6, 2014 Share Posted March 6, 2014 Thank you Alex for your referral. Hello Corry I'll respond to your conversation. Once (and if) I solve your issue I'll post the fix here for others to see. We miss you. Hope this finds you and yours happy and healthy. 1 Link to comment Share on other sites More sharing options...
ibndawood Posted March 7, 2014 Share Posted March 7, 2014 Hello El Patron, I am fine and I've been following this thread and the other threads in which I have contributed. Currently I am working on few modules which I believe are necessary for most of the shops. Once I complete them I'd be active again I haven't heard from Cory so I really don't know what the issue is. Hello Larry, I can take a look at your website, your paypal settings, etc and suggest a solution. I am available on skype which I've messaged you. Thank you, Ibrahim 1 Link to comment Share on other sites More sharing options...
badrelmers Posted March 11, 2014 Share Posted March 11, 2014 (edited) hi all and thanks to all for your contributions i have solutions and 1 problem a lot of you don t mention an important point the plugin neither doesn t explain it: it s important this step to validate the purchase in prestashop when the paypal payment is succuful (Sphyrna has mentioned that in the first page of this thread, thank you Sphyrna) Log into Paypal >profile >my selling tools scroll down, click >instant payment notification - enable and set to http://www.mystore.com/modules/paypalusa/controllers/front/validation.php?pps=1 replacing *mystore* with your domain name activate your shop if it s in maintenance, and remove any folder password protection you may installed like me. that s all. the plugin work fine without any correction using prestashop 1.5.6.2 + PayPal USA, Canada & Mexico 1.3.1 also don t forget to use a correct address when testing a payment with paypal, it doesn t work with incorrect address even in sandbox you can see the errors of validation in paypal history: login to paypal click history then click ipn history, click transaction id of failed transactions there you will find errors that could happens ______ the problem: when i enable the paypal usa plugin my logo link to home change to https, then if a costumer is in "my account" or any https page like checkout the logo home link change from http to https then if i click the logo it opens https://mysite.com insted of http://mysite.com, then i got this error This webpage has a redirect loop Error code: ERR_TOO_MANY_REDIRECTS if i disable the paypal plugin my logo link comeback to it s normal state (http) how can i prevent my logo link from changing from http to https when the paypal logo is enabled please thank you Edited March 11, 2014 by badrelmers (see edit history) Link to comment Share on other sites More sharing options...
fzappa Posted March 20, 2014 Share Posted March 20, 2014 This is for anyone using the paypal advance module. In order to get the order to post in prestashop you need to modify the following php file: module: paypalusa file: modules/paypalusa/controllers/fton/validation.php This is PayPalUSAValidationModuleFrontController. PayPal returns here after accepting payment. The code: $_POST['RESULT'] needs to be changed. Use Tools::getValue('RESULT') Change isset($_POST['RESULT']) to Tools::getValue('RESULT') == 0 Change elseif ((Configuration::get('PAYPAL_USA_PAYMENT_ADVANCED') || Configuration::get('PAYPAL_USA_PAYFLOW_LINK'))&& isset($_POST['RESULT']) && Tools::getValue('TYPE') == 'S' && Tools::getValue('PNREF') != '') To elseif ((Configuration::get('PAYPAL_USA_PAYMENT_ADVANCED') || Configuration::get('PAYPAL_USA_PAYFLOW_LINK'))&& Tools::getValue('RESULT') == 0 && Tools::getValue('TYPE') == 'S' && Tools::getValue('PNREF') != '') Link to comment Share on other sites More sharing options...
Larry Sainte-Marie Posted March 21, 2014 Share Posted March 21, 2014 badrelmers, and for others reading this thread - there are many instances where the plugin does not work fine (paypalusa+PS 1.5)+ for example, earlier @ibndawood noted the bug where you will not get an order made when the customer belongs to a group with a discount. to test this - put a customer in a group and give that group a discount and checkout with paypal... Also @ibndawood just recently helped me solve another bug where an order that uses the "echeck" paypal method will be created but the customer will see an error message stating that there was a problem with the order. To test this, checkout with paypal and when paying use the echeck (bank transfer) method. This creates a IPN with the pending status and valid =0 . When the customer returns they are sent to the order confirmation page, which would normally redirect to the order history page. However, in this case, there are parameters sent to the order confirmation page - when parameters are sent, the redirect does not happen and since the order is pending and not yet valid, an error message results. The problem is just confusion, because in fact, the order was created. @ibndawood is the expert detective who figured all this out. The fix is to remove the parameter from the postback from paypal (line 377 of paypalusa.php) - this removes the error and order is created. Anyone with issues, I advise spending some money on @ibndawood . time is money, he'll get it fixed faster than PS will. 1 Link to comment Share on other sites More sharing options...
ghadyAlhamad Posted April 16, 2014 Share Posted April 16, 2014 I have some strange issues with paypal actually, I hava a business account: - when I use sandbox account the oreder submitted successfully, but with live mode no order in prestashop or paypal. - in my android mobile I have option to pay without paypal account, but in my laptop I couldn't found this option. then what's wrong, I really trouble with this problem. any feedback please........ thanx alot Link to comment Share on other sites More sharing options...
jeyjoo Posted May 9, 2014 Share Posted May 9, 2014 (edited) Hello Jas, Thank you for contacting me via skype. For the benefit of the community I will just record what we did. I took a look at Jas's website and yes, paypal did not create an order for a particular payment. I tried the sandbox mode and enabled debugging. The payment was smooth and paypal did create an order. Jas was using paypal website standard with paypalusa module. There was a warning that said there was no server was configured because memcache was enabled. I wanted to keep it clean so I disabled caching and that error went away. Please note that this error would not have thrown if debug mode had not been enabled. We created a test product with 1 dollar and tried paying real time. Sounds weird but this time order was created successfully. For paypal using paypalusa, validation.php is the file that creates the order. I suspect that there could have been a fatal error that prevented validation.php to be fully executed. I checked the paypal logs as well as server logs and there were no indication of any errors related to paypal. Could not reproduce the error as successive paypal payments were smooth. However the only change I did was eliminating the warning that PHP throwed (I don't think a PHP warning would stop validation.php from being fully executed). Hope this helps others facing same problem. Hi @ibndawood. Thankyou for the detailed explanation of how you resolved the issue. Are you saying that disabling memcache resolved this issue? Also can you confirm the correct IPN URL to add to paypal (when using paypalusa). I have read mixed answers: 1. mysite.com/modules/paypalusa/controllers/front/validation.php 2. mysite.com/modules/paypalusa/controllers/front/validation.php?pps=1 3. mysite.com (no extension necessary) Thanks Edited May 9, 2014 by jeyjoo (see edit history) Link to comment Share on other sites More sharing options...
kabyong Posted May 17, 2014 Share Posted May 17, 2014 I have the same problem (orders are not created when using paypal) please help. I tried some of the fixes that was in this topic but none worked. I'm not really good in computers that's why I'm having trouble in understanding the fixes. I made a lot of transactions for the past 2 days and no order was generated, the funny thing is 1 order was made out of all the transaction I made. If someone can help me on this issue is greatly appreciated. Thanks in advance 1 Link to comment Share on other sites More sharing options...
milan9615 Posted May 19, 2014 Share Posted May 19, 2014 HI there, If you are getting this error. "Unfortunately, an error occurred during the transaction.Please double-check your credit card details and try again. If you need further assistance, feel free to contact us anytime." To solve this is issue just simple solution is there if error is related to this. I was getting error when i pay from paypal. Order is generated to admin with "Awaiting paypal payment". For this status there are some setting here Just go to order->statues. Edit statues for which you are getting error. Click checkbox for "Consider the associated order as validated." and save. Enjoy :-) 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