Jump to content

Paypal payment but no orders


Sphyrna
 Share

Recommended Posts

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!

  • Like 1

Share this post


Link to post
Share on other sites

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. :)

Share this post


Link to post
Share on other sites

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 by Sphyrna (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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: 
 
to
action="https
 
and have the form sent over a secure connection?
 
Thanks,
 
Elizabeth
Edited by Sphyrna (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

 

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: 
 
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 by Sphyrna (see edit history)

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

  • 3 weeks later...

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!

Share this post


Link to post
Share on other sites

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 by Eric Nguyen (see edit history)

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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 by Sphyrna (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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:

 

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 by Patchou (see edit history)
  • Like 2

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by Cory Heikel (see edit history)

Share this post


Link to post
Share on other sites

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

  • Like 1

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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.  

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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:

 

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  

Share this post


Link to post
Share on other sites

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 : 

 

post-732514-0-75156500-1386059567_thumb.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.

Edited by ibndawood (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

B) 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

Share this post


Link to post
Share on other sites

 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 by ebookstore (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

 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:

 

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!!

  • Like 1

Share this post


Link to post
Share on other sites

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 by ClearSolid (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.    

Share this post


Link to post
Share on other sites

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 by ClearSolid (see edit history)

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.  

Share this post


Link to post
Share on other sites

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 by ClearSolid (see edit history)

Share this post


Link to post
Share on other sites

 

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. 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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);
        }

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

  • Like 1

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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 : 

 

attachicon.gifpaypalorders.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

Share this post


Link to post
Share on other sites

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.

  • Like 3

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites