PDA

View Full Version : paypal IPN 2.3.4.7 and cart contents not emptied



ozy13122
04-30-2009, 05:31 AM
I have been struggling with this for days now... It seems that every time I think I have found a fix (after perusing thousands of messages!), it is a link that no longer works (old oscmax forums, I think)...

Ok, the problem is this: when I return from paypal after confirming the order, my shopping cart still shows the order.

The order is properly processed (inv reduced, email sent, IPN results ok) - but the cart is not emptied. And yes, I do return to my cart from paypal, so that is not it...

Someone had said it may be the return URL defined in paypal's site. Micheal_S stated in a post a couple years ago that the return URL should be blank. Paypal doesn't allow it to be blank.

Someone else said to do the following fix for proper return page from Micheal_S:
osCommerce Documentation by OSCdox :: osCommerce and osCMax documentation (http://oscdox.com/index.php?name=PNphpBB2&file=viewtopic&t=5579)
Yet another thread that no longer exists...

The actual coding changes for paypal_IPN changes /catalog/shopping_cart.php, yet that is for osCommerce, and oscMax changed that file to use BTS, and I dont know for sure if I put the code in proper place (should coding change have gone into /template for BTS?)

So, to sum up: how do I get the shopping cart to empty after a successful purchase?

michael_s
05-01-2009, 12:29 PM
Paypal doesn't allow it to be blank.That is incorrect. The IPN return url can be left blank. I have it set this way in my paypal accounts, so I know it is allowed.


So, to sum up: how do I get the shopping cart to empty after a successful purchase?
We use paypal IPN on the osCMax store (shop.oscmax.com) which is running osCMax v2.0.2 and all we had to do was enable the paypal module, fill in the paypal account details in the admin and set our paypal account to have IPN enabled with no return url set.

I do not see the same problem that you are having. So, my next question is, what version of osCMax are you running? Is it a default/stock installation?


should coding change have gone into /template for BTS? It depends on what changes are to be made. If it is in the content of the shopping cart page, it will go into the tpl.php file in the templates/content dir, just look for the appropriate reference code in the paypal module install instructions.

ozy13122
05-01-2009, 08:40 PM
Hi Micheal. I appreciate your quick reply...


That is incorrect. The IPN return url can be left blank. I have it set this way in my paypal accounts, so I know it is allowed.
I am sorry to say, but for our account, it cannot be blank. We have a "Business" account. I log onto Paypal's site, go to "Profile", then "Instant Payment Notification Preferences". If I attempt to leave it blank the following screenshot comes up:
Picasa Web Albums - ozy13122 - paypal screen... (http://picasaweb.google.com/tom6205/PaypalScreenshots?authkey=Gv1sRgCLK16ZL_vY7v-QE#5331080478975980866)
and
Picasa Web Albums - ozy13122 - paypal screen... (http://picasaweb.google.com/tom6205/PaypalScreenshots?authkey=Gv1sRgCLK16ZL_vY7v-QE#5331080500130450658)

So, I don't know what kind of account you have with paypal, but it is either not the same kind as ours, or you haven't attempted to leave it blank for awhile...

As for the problems I have encountered, we are also NOT getting the discount applied (paypal_IPN sends amount before discount, even though it shows the discount applied in checkout_confirmation.php page).

And, yes, I do have it set to "aggregate" instead of "line item"...

Oh, I am running OscMax2.02, standard install, with color changes for pages and diff header icons, and only paypal addons attempted... It took me a long time to figure out the differences between what is available in addons, and what addons were included in the standard install of oscmax (finally found that page of whats included).

I did attempt a couple of paypal addons, thinking they were updates to the standard ones.

So, I guess I will attempt to install it again, and then do only the IPN addon... I hope that takes care of these two problems (cart not emptied and no discount to paypal)... I will post again to let you know (prolly within 24 hours).

Thanks again

ozy13122
05-04-2009, 05:09 AM
well, I reinstalled OscMax2.02, restored my database, and made NO coding changes (not even color changes). So, I am using Paypal IPN that comes standard with OscMax2.02 (which is apparently v2.3.3, according to admin panel).

Cart still not being emptied, and now the paypal IPN transaction isn't being finished - staying at "Preparing IPN" in status, whereas before I would get the next step of "Pending" with an email being sent. Which also means stock not reduced.

Also, I change permissions of /catalog/includes/configure.php to 644 and when I check site, it gives me the error at top of page to change permissions... I had to drop it to 444 in order to get rid of that error.

So, the re-installation of OscMax actually made things go even more awry.

Oh, and the coding changes I had asked about in first post for implementing code from paypal IPN 2.3.4.7 for shopping_cart.php, you stated:
If it is in the content of the shopping cart page, it will go into the tpl.php file in the templates/content dir, just look for the appropriate reference code in the paypal module install instructions.
Well, the reference code in module instructions tells me to look for a "$breadcrumb" line in shopping_cart.php and insert code AFTER that. The said "$breadcrumb" line is not in the .tpl.php file - which is why I had asked the question to begin with, wondering if it was the cause of non-emptying cart...

Sorry to keep asking for help, but I am getting more frustrated by the moment :(

dknowle
05-04-2009, 07:17 AM
I have a suggestion (although it does not address your specific problem).

I was having problems with the PayPal IPN module with osCMax 2.0.2 (would not carry over correct total for coupons), so I tried the 'PayPal Website Payments Standard' module. So far, it appears to be working great. My website is still in testing, but that module has performed flawlessly with all tests I have ran on it so far (including returning back to my website, completing order, & emptying cart).

michael_s
05-04-2009, 02:50 PM
I am sorry to say, but for our account, it cannot be blank. We have a "Business" account.I have 3 business paypal accounts, and ALL of them have the IPN return url blank. I have also set this up for about 200 other clients of mine, and ALL of them have the IPN return url blank on their business Paypal Accounts, so I am thinking that maybe you need to try it again :)

See the screenshot from one of my paypal accounts below. It shows a blank IPN url.

michael_s
05-12-2009, 06:49 AM
Just to follow up, Yes paypal recently (like April) changed the way the IPN page works and you are correct it can no longer be left blank.

Checking with paypal, apparently the IPN Notify Url can be set to anything, as the osCMax paypal module sends a "notify_url" in the payment post to paypal, which overrides whatever is set as the IPN Notify url at Paypal, per transaction. Apparently they have changed how the notify_url works and it will override the setting at your paypal account. So, the blank url is no longer required.

What platform are you installing osCMax on?

rosarystuff
08-29-2009, 09:11 AM
I'm having the same problem, so I was wondering. Is there a way we can have the return page be an information page (and still have the order go through). I mean something that says thanks for the order and here is some basic info. Does that make sense?

What do you think?

Tangwystel
10-19-2009, 11:46 PM
I'm having the same problem - Paypal always going to Checkout_processing, not emptying the cart, and generally being confusing to the customer. The orders are going through paypal, but the customer is redirected to processing.

I'm running the latest version OSCmax on a mac.

michael_s
10-20-2009, 08:55 AM
Something is not right with your setup, as it should return to the checkout_success.php page.

Tangwystel
10-20-2009, 09:47 AM
right, obviously there is something wrong, but is there a way to fix it? My paypal IPN is set to http://www.unplannedpeacock.com/catalog/checkout_success.php, my settings are at Paypal Processing IPN and default, I'm using website payments standard.

pgmarshall
10-20-2009, 09:55 AM
I have justed tested your site all the way through to actually paying for a 1c sheep! Unfortunately, I am not willing to pay the $27 postage to test if your site works! Everything looks fine right (for as far as I can go ... )

Obviosuly, your trouble happens after this which is very difficult to test for!

However, I would suggest that you double check the settings you have applied through PayPal ... Did it work when you were testing it in the PayPal Sandbox?

Regards,

michael_s
10-20-2009, 10:46 AM
Instead of the Paypal Web Payments Standard, use the Paypal IPN module. Give it a try and see if it works. If it does, we know the issue is with the WPS module. If not, it may be a setting in your paypal account.

Tangwystel
10-20-2009, 12:35 PM
are you talking about an IPN module separate from the Website Payments Standard in the standard OSCmax installation or another one I should download from the OsCommerce site?

Tangwystel
10-24-2009, 05:42 AM
I haven't had much time to deal with this lately, but I did test the IPN credit cards that is standard with OSC max and it was full of errors for me - didn't even get to the point of getting me to paypal. It did, however, reach the step of emailing me with the order, so the IPN is working, but then not transferring the user to paypal.

I just reinstalled the software too - I haven't changed anything. Should I try updating to the latest OScommerce Paypal IPN?

Tangwystel
10-26-2009, 05:50 AM
Here are the actual errors showing up with the IPN software - On the checkout_confirmation.php screen, I get


Warning: reset() [function.reset]: Passed variable is not an array or object in /home/posi2400/public_html/unplannedpeacock.com/catalog/includes/classes/payment.php on line 56

Warning: Variable passed to each() is not an array or object in /home/posi2400/public_html/unplannedpeacock.com/catalog/includes/classes/payment.php on line 66

and on the next screen, after pushing continue, I get the same messages, Paypal does not show up on the screen as an option, and then, the next screen, I get the same errors, and then the next screen I get

Parse error: syntax error, unexpected T_STRING in /home/posi2400/public_html/unplannedpeacock.com/catalog/includes/languages/english/checkout_success.php on line 18

My order will go through and I receive a confirmation email but no direction to paypal or payment.

I either need to fix this or the problem with website payments standard that doesn't ever direct me to the checkout success page and update my inventory, otherwise, i won't be able to use this software. Any ideas??

slotty7130
01-13-2010, 12:46 PM
Hi there,

i have similar problems with the PayPal Website Payments Standard Modul in oscmax

I made the site first in oscommerce and used the PayPal Website Payments Standard modul...everything worked fine...

now i migrated the site to oscmax 2.03....

PayPal Website Payments Standard is the only payment method and everything works well except the emtied cart after returning from paypal back to the site.

Could anyone give me a problem solution for that????

Would be really great....thanks in advance

slotty

michael_s
02-10-2010, 12:56 PM
This is resolved in the latest osCMax v2.0.15 release. Upgrading is recommended (at least upgrade your paypal modules to the ones in 2.0.15)