Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / PayPal Express Checkout support / [Fixed v1.5.0] Payments STD (IPN) issue where order is not received in ZC

[Fixed v1.5.0] Payments STD (IPN) issue where order is not received in ZC

Locked

Started by uneek on 10 Nov 2010, 12:48 AM · Views: 7,491

Results 21 to 40 of 42
This thread is locked. New replies are disabled.
16 Nov 2010, 2:54 PM
#21
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Post #21 by smoke133

I installed the module Paypal Session View. This module works fine on 1.3.9g. This works great if you do get this issue and want to recover the order in your system so you have a record of the order in your zencart store. I still would like to know why this is happening to my orders.

https://www.jhelectronics.com
Using Zencart 1.3.9h

16 Nov 2010, 7:21 PM
#22
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #22 by drbyte

DrByte:

uneek:

With regards to the detailed line item, if I have a product called Chocolate which has 2 options of Dark and White, then the detailed line item sent to Paypal appears as the option name, i.e. 1x Dark instead of something like 1x Chocolate - Dark.
Try making the following change to /includes/modules/payment/paypal/paypal_functions.php
around line 771:```
// if there are attributes, loop thru them and add to description
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0 ) {
[B]//[/B] $optionsLI["item_name_$k"] = '';
for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {

> (Just add the** //** as shown.)

uneek, you never did confirm whether you made that change and whether it solved the matter for you

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Nov 2010, 7:25 PM
#23
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #23 by drbyte

For those of you having problems with Website Payments Standard, we're investigating the cause of the problem. Unfortunately the fix is rather complicated and affects a number of other things. We're working on a possible solution. No ETA available as yet.

HOWEVER, it's IMPORTANT to note that if you switch to PayPal Express Checkout, you WILL NOT HAVE THOSE PROBLEMS, because there will be no need to rely on matching up two different systems that handle things differently. Express Checkout works inline seamlessly completing orders when the customer pays. The WPS module is way more complicated, using technologies PayPal should have dumped years ago.
Apart from ToniScrapperoni's unique situation (discussed elsewhere), there's very little reason for anyone to "need" to use Website Payments Standard.

There's no cost-difference to using Express Checkout compared to WPS. The Express Checkout technology is contemporary and up-to-date. WPS is not. Customers still visit PayPal to login and authorize their payment. You won't lose out on any features by moving to EC.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Nov 2010, 7:54 PM
#24
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Post #24 by smoke133

DrByte:

HOWEVER, it's IMPORTANT to note that if you switch to PayPal Express Checkout, you WILL NOT HAVE THOSE PROBLEMS, because there will be no need to rely on matching up two different systems that handle things differently. Express Checkout works inline seamlessly completing orders when the customer pays. The WPS module is way more complicated, using technologies PayPal should have dumped years ago.
Apart from ToniScrapperoni's unique situation (discussed elsewhere), there's very little reason for anyone to "need" to use Website Payments Standard.

There's no cost-difference to using Express Checkout compared to WPS. The Express Checkout technology is contemporary and up-to-date. WPS is not. Customers still visit PayPal to login and authorize their payment. You won't lose out on any features by moving to EC.

Without Website Payments Standard, how would you accept credit cards using Paypal? Express Checkout can't do that.

https://www.jhelectronics.com
Using Zencart 1.3.9h

17 Nov 2010, 9:44 AM
#25
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #25 by drbyte

smoke133:

Without Website Payments Standard, how would you accept credit cards using Paypal? Express Checkout can't do that.
Yes it can, and always has.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Nov 2010, 4:19 PM
#26
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Post #26 by toniscraparoni

Hi, DrB!

Just wanted to say thanks for looking into this! I feel better already. :)

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

23 Nov 2010, 2:40 AM
#27
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #27 by drbyte

As I've said previously, a "proper" fix is much more complicated than just one or two lines of changed code.

The BEST solution is to use Express Checkout instead, since it's not prone to these problems, nor the other many problems with the Website Payments Standard methodology.

If, however, you cannot use EC for very specific carefully calculated reasons, you can try making the following change:

/includes/modules/payment/paypal.php
line 161:```
$this->totalsum = $order->info['total'];

to:```
[B]    $my_currency = select_pp_currency();
[/B]    $this->totalsum = $order->info['total'][B] = zen_round($order->info['total'], $currencies->get_decimal_places($my_currency));[/B]

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Nov 2010, 5:55 AM
#28
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Post #28 by toniscraparoni

Thanks, DrB! I appreciate this very much. I've made the change and will report back if I receive another payment without order. I hope the more complicated fix won't be necessary and this will do the trick.

So don't worry, I won't take it personally if you're hoping you won't see me very soon! ;)

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

12 Dec 2010, 1:13 AM
#29
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Post #29 by toniscraparoni

Hi, DrB!

I'm happy to report the incidents of currency mismatches have decreased, though not entirely gone away. It seems they still happen when odd-cent items are on sale and Zen has to round to the penny.

For example, a product selling for $8.95 is on sale at 45% off. Going to four decimal places, the discount is $4.0275, which leaves a net price of $4.9225, and should be rounded to $4.92. Yet, on the mc_gross line item, this particular item is showing as $4.93.

Which would be fine in the grand scheme of things if mc_gross matched converted_amount and order_amount. There, Zen is rounding up even more.

| mc_currency = USD
| submitted_currency = USD
| order_currency = USD
| mc_gross = 33.01
| converted_amount = 33.03
| order_amount = 33.0345

Adding the rounded up individual totals of this order equals $33.01. Any idea where the extra two cents could be coming from?

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

12 Dec 2010, 8:42 PM
#30
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Post #30 by toniscraparoni

Hi, again, DrB!

We may have to throw our rounding theory out the window. At least as the sole culprit. It just happened for the first time on a single, evenly priced item. This item is on sale, though. Look at this:

| mc_currency = USD
| submitted_currency = USD
| order_currency = USD
| mc_gross = 1.50
| converted_amount = 4.50
| order_amount = 4.5

The Paypal receipt was for $1.50. I can't see on the receipt what the item was, only who it came from. This particular manufacturer is having a 50% sale. So the item must have originally been $3.00, which looks like is being added to the order amount in addition to the sale price.

Help! LOL!

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

13 Dec 2010, 2:45 AM
#31
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #31 by drbyte

I'll need to see logs, as well as some links to the products in question.
The price and the sale percentage are important points too, so thanks for those.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Dec 2010, 4:03 AM
#32
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Post #32 by toniscraparoni

Hi, DrB!

Logs have been uploaded. I shall PM with a pickup link.

I've added some informational notes and product links towards the bottom of each log, on top of the little section I usually paste. There are two for each order. Wasn't sure which ones you would pull, so they've both been noted accordingly.

Unfortunately, the customer from today's pasting has not yet reordered, so I don't know what the exact item was, but you've been linked to a similarly priced product from that manufacturer for reference. Just give me a shout if you'd like to see anything in admin.

Again, many thanks for your help on this! :)

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

8 Mar 2011, 4:06 AM
#33
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #33 by drbyte

ToniScraparoni:

It seems they still happen when odd-cent items are on sale and Zen has to round to the penny.

For example, a product selling for $8.95 is on sale at 45% off. Going to four decimal places, the discount is $4.0275, which leaves a net price of $4.9225, and should be rounded to $4.92. Yet, on the mc_gross line item, this particular item is showing as $4.93.

Which would be fine in the grand scheme of things if mc_gross matched converted_amount and order_amount. There, Zen is rounding up even more.

| mc_currency = USD
| submitted_currency = USD
| order_currency = USD
| mc_gross = 33.01
| converted_amount = 33.03
| order_amount = 33.0345

Adding the rounded up individual totals of this order equals $33.01. Any idea where the extra two cents could be coming from?
Can you list the prices and taxes of all the other line items in that order, and the shipping prices and taxes?
I'm trying to reconstruct this one using the code changes I posted above, and can't seem to trigger the problem.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Mar 2011, 4:55 AM
#34
uneek avatar

uneek

New Zenner

Join Date:
Mar 2008
Posts:
27
Plugin Contributions:
0

Post #34 by uneek

Sorry haven't weighed in on this for a few months. I will try the code change and let you know.

A bit more info from another occurrence.

Item was an even $42, not on special/sale. A quantity of 3 were ordered. Shipping was $9.

So 3x42=126+9=135

Log shows:

| mc_currency = AUD
| submitted_currency = AUD
| order_currency = AUD
| mc_gross = 135.01
| converted_amount = 135.00
| order_amount = 134.99994

Item price of $42 is inclusive of 10% GST, so net price shows as 38.1818. 3x38.1818=114.5454

If you round that last figure up you get 114.55. 114.55 + 10% = 126.005 which would round up to 126.01 + $9 shipping = 135.01

Without rounding to 2 decimals at each step you get this:

3x38.1818=114.5454
114.5454x1.1=125.99994
125.99994+9=134.99994

So am I correct in assuming there is probably some additional rounding that isn't necessary (either at ZC end or PayPal end?).

8 Mar 2011, 5:49 AM
#35
uneek avatar

uneek

New Zenner

Join Date:
Mar 2008
Posts:
27
Plugin Contributions:
0

Post #35 by uneek

I tested same product and same quantity but the code suggested in post #27 did not make any difference.

I tested the same product again but with a different quantity (5) and it worked fine.

BTW I've never tried Express Checkout on any of the sites I am caretaker of. I recall reading a while back you're required to use the ugly PayPal buttons on your site and I'd rather not. Does it also mean it's possible you'll get less subscribers if people are checking out and using their Paypal account for shipping address etc and not signing up to your site and therefore not subscribing?

8 Mar 2011, 12:19 PM
#36
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #36 by drbyte

uneek:

BTW I've never tried Express Checkout on any of the sites I am caretaker of. I recall reading a while back you're required to use the ugly PayPal buttons on your site and I'd rather not. Does it also mean it's possible you'll get less subscribers if people are checking out and using their Paypal account for shipping address etc and not signing up to your site and therefore not subscribing?
Those are incorrect assumptions.
EC does not require the buttons anymore. You can turn them off with a switch in your admin panel as long as you're using the latest version of ZC. But, if you do that, then just as you have with IPN, customers will have to create an account on your store before they can go thru checkout.
Further, EC does not require customers to have a PayPal account as long as you've enabled "paypal account optional" inside your merchant PayPal account's settings. https://www.zen-cart.com/tutorials/index.php?article=28

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Mar 2011, 5:17 PM
#37
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Post #37 by toniscraparoni

Hi, DrB!

I'm sorry, I just found this post notification via webmail while doing my weekly trash removal. Apologies again I can't help with those order details. I do have the debug logs still turned on, but I have no idea at this point which order that was from.

The problems are definitely IPN. Tried your code changes, which helped some, but didn't completely solve the problem. The order mismatches still happened, just not quite as often. I made a small coding change of my own to one of the Paypal files, paypal_functions.php, which seemed to get rid of the mismatch problem, although it certainly isn't a fix, just a big band-aid. Basically instructing that, if the order totals are different by a nickel or less either way, to convert the transaction amount to mc_gross and send it on through. It's worked to avoid the mismatches due to rounding.

OTOH, nothing has worked to solve the "freebie breakage" problem, where the order cuts off after a free product has been put into the cart, and anything after the free product never makes it to Paypal, yet it stays on record with Zen - meaning the customer receives goods they didn't pay for. Too much hassle, all things considered, so I've finally switched to Express - again.

Last time I tried Express, we had issues with customer addresses being rejected, despite not requiring a confirmed address in the module's admin settings. Customers were then put into an endless loop between Paypal and the checkout page. Hoping that won't happen again, because Express passes the freebie check with flying colors! If it can round and route right, I'll be a very happy camper! :)

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

24 Apr 2011, 1:40 AM
#38
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #38 by drbyte

ToniScraparoni:

Last time I tried Express, we had issues with customer addresses being rejected, despite not requiring a confirmed address in the module's admin settings. Customers were then put into an endless loop between Paypal and the checkout page. Hoping that won't happen again, because Express passes the freebie check with flying colors! If it can round and route right, I'll be a very happy camper! :)Try this tiny change: http://www.zen-cart.com/forum/showpost.php?p=1019237&postcount=26

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Apr 2011, 8:16 AM
#39
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Post #39 by toniscraparoni

Done! Although I haven't had this problem - that I know of LOL - since switching to Express the second time. It seems to be working great. Nevertheless, I appreciate you thinking of me. Thanks a bunch, DrB! :)

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

20 May 2011, 12:06 AM
#40
jodijean avatar

jodijean

New Zenner

Join Date:
Dec 2005
Posts:
10
Plugin Contributions:
0

Post #40 by jodijean

Dr. Byte ... THANK YOU SOOOOO MUCH!!! my website has been intermittently sending me order info and not sending me order info ... here's hoping changing to Express Checkout solves the problem. just the answer i was hoping for (an easy fix, instead of some coding!!) you are awesome.

now if only someone would checkout so i can test it ;p