Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal IPN not updating stock


pixa

Recommended Posts

Paypal IPN does not update my stock or send out an invoice unless the customer clicks "Return to Store" at the last page of checkout at Paypal.

 

Before I chose to go with Paypal IPN I read all about the problems with the Paypal module not triggering the Invoice to go through unless the customer clicked on Return to Store. I followed the advice of getting IPN because it supposedly did not have this problem.

 

Well the invoice problem is fine because the order shows up before they leave for Paypal at Checkout so that is handleable, but if they don't click Return to store the Invoice is not e-mailed to them and the stock does not update.

 

I enabled Paypal IPN in the Paypal account and I put the notify url as the checkout_process.php url. I am not using encrypted payments through Paypal IPN and I wonder if that has something to do with it?

 

Everything works great except for the stock updating and the Invoice being e-mailed to the customer. As soon as I hit the "Return to _____ Website" orange button, stock updates and the invoice is sent. Now I can fix the Invoice part by updating the status of the order myself but it would be nice if my client didn't have to do that. And the stock thing is really gonna make someone pissed at me and I can not figure this out!

 

Please, please let me know if there is a solution. I tried to wade through the other thread and search the forums but I don't even know which Paypal IPN Version I have because it came with Oscommerce 2.2 RC1. I've looked all through it and I don't see what version it is.

Link to comment
Share on other sites

I'm not a PHP expert and am a newbie at oscommerce but on returning from PayPal the software can't be going to "'ext/modules/payment/paypal_ipn/ipn.php" as this is the module that is supposed to update the stock levels and send out confirmation emails.

 

I tried a test order (not through the sandbox) and on my return from PayPal after what seemed a successful transaction, I was re-redirected to my website's oscommerce "logon on" screen. Has oscommerce forgotten that I was logged on before going to PayPal? Is that the problem?

 

Surely someone out there who had more PHP and oscommerce knowledge must have some idea what's going wrong as this seems to be a common problem.

Link to comment
Share on other sites

I finally worked out what the problem was. As I mentiond earlier, my gut feeling was that ipn.php wasn't being triggered somehow because that was the piece of code that contained the updating of the stock levels and the sending out of the email confirmations.

 

The answer lay in the path name.

 

For the IPN notify URL, the code is looking for a path name of:-

 

/ext/modules/payment/paypal_ipn/ipn.php

 

My site structure was called:-

 

/ext/modules/payment/paypal/ipn.php

 

So, the code couldn't find the ipn.php file on returning from PayPal.

 

I simply renamed the directory to be paypal_ipn and left all the coding as it was and it now works!!!! :thumbsup:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...