Forums / Addon Payment Modules / PayPal Payment Pro, no 'Decline error"?

PayPal Payment Pro, no 'Decline error"?

Views: 4,754

Results 1 to 16 of 16
19 Aug 2011, 4:26 AM
#1
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

PayPal Payment Pro, no 'Decline error"?

ver 1.3.9h

Have PayPal website payment pro

I have had a couple customers tell me they complete the payment form hit continue and it returns them back to the payment form, with No error message.

The problem is usually their bank declining the payment. However, they don't know this because the payment mod is not returning a Decline error ???
site is
https://www.cvtreasures.com

19 Aug 2011, 4:30 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: PayPal Payment Pro, no 'Decline error"?

It can only display the error message if your template still has the code in it to display the errors. Oftentimes people decide that the $messageStack section of the various template files aren't doing anything so they just remove it, and then come complaining about the symptoms you describe.

Have you replicated the problem?
Have you then tested the same thing using the default template instead of your custom template (assuming you've properly built your own custom template instead of editing the original template_default files)?

What exactly is the error that PayPal is sending back, according to the debug logs?

.
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 Sep 2011, 12:59 AM
#3
milkyway avatar

milkyway

Inactive

Join Date:
Aug 2006
Location:
Singapore
Posts:
167
Plugin Contributions:
1

Re: PayPal Payment Pro, no 'Decline error"?

Hi DrByte,

We are the one building template for our friend's site https://www.cvtreasures.com and we didn't remove the $messageStack from our template because no beneficial purpose of doing that.

Upon further checking we realized that we used FEC (checkout) module in this site, and the related file is actually tpl_checkout_stacked.php

In this file I didn't see the standard zencart's $messageStack which are below:

<?php if ($messageStack->size('redemptions') > 0) echo $messageStack->output('redemptions'); ?>
<?php if ($messageStack->size('checkout') > 0) echo $messageStack->output('checkout'); ?>
<?php if ($messageStack->size('checkout_payment') > 0) echo $messageStack->output('checkout_payment'); ?>

So I put that codes into this file (mod), not sure if this proper because I dont really inspect this mod deeper and how they work.

My conclusion that this issue has something to do with the mod it self, probably we can post in their support thread later for clarification

Perhaps you have other opinion?

Best regards!

Responsive ZenCart Templates that automatically adapt itself with iPad, iPhone, BlackBerry, Androids and any monitor screen size
Buy a coffee for Zen-Cart devs. http://www.zen-cart.com/donate

23 Sep 2011, 3:44 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: PayPal Payment Pro, no 'Decline error"?

I'm not intimately acquainted with every alteration that mod has made to accomplish its goals, so can't comment on what it's doing differently.

A payment module written for the current version of Zen Cart should indeed set error messages into the 'checkout' messageStack. If it does that, then the code you posted is likely to show those messages properly.

So, if it's displaying no error message, then either no error message was trapped, or none was set to messageStack, or wasn't set to the 'checkout' messageStack, or the module isn't the one encountering the problem that's doing the redirect back to that page.

You'll probably need to do some code tracing to see what's breaking "where" and "why". Logs can be useful in that process too.

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

21 Oct 2011, 12:46 PM
#5
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: PayPal Payment Pro, no 'Decline error"?

I'm using the built in Paypal Website Payments Pro and Express Checkout modules, and I also do not get an error. Just returns me to the payment page with no error.

I have not modified the tpl_checkout_payment_default.php page, the messageStack code is there in the template_default/template/tpl_checkout_payment_default.php file.

I'm on 1.3.9d

11 Nov 2011, 6:59 PM
#6
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Re: PayPal Payment Pro, no 'Decline error"?

Apparently, we are having a similar problem. It's been happening for some time, though I just found out about it.

Message Stack shows some errors, like invalid CC number, and incorrect CCV code. However, when the billing address is incorrect, it comes back to the payment page with no error.

Also, I received an "Internal Error" when a cc had insufficient funds. That seams misleading.

Using paypal pro and express checkout.
v1.3.9h

http://www.divinelighting.com -- Super Orders 3.0 -- Ultimate SEO -- Quantity Discounts -- SitemapXML -- Image Handler -- Shipworks

11 Nov 2011, 11:47 PM
#7
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: PayPal Payment Pro, no 'Decline error"?

I find it doesn't show if the error code is 15005, but it works if it is 15006 or another error message. I don't see any reference to these error codes in the payment module though...

22 Nov 2011, 4:09 AM
#8
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

Re: PayPal Payment Pro, no 'Decline error"?

Do you also have Fast Easy Checkout installed ? I think that may be the culprit

divinelighting:

Apparently, we are having a similar problem. It's been happening for some time, though I just found out about it.

Message Stack shows some errors, like invalid CC number, and incorrect CCV code. However, when the billing address is incorrect, it comes back to the payment page with no error.

Also, I received an "Internal Error" when a cc had insufficient funds. That seams misleading.

Using paypal pro and express checkout.
v1.3.9h

22 Nov 2011, 4:55 AM
#9
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Re: PayPal Payment Pro, no 'Decline error"?

Do not have Fast and Easy Checkout installed.

About the only mod we use that is active during checkout is Quantity Discounts by That Software Guy.

Still wondering why message stack does not show when AVS mismatch.

http://www.divinelighting.com -- Super Orders 3.0 -- Ultimate SEO -- Quantity Discounts -- SitemapXML -- Image Handler -- Shipworks

8 Jun 2012, 7:46 PM
#10
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: PayPal Payment Pro, no 'Decline error"?

Has anyone had more luck with this. One of my sites has this issue. It is still 1.3.9h and there are no changes to the files in question. As numinix says the issue seems to occur just with 15005 errors and seems a bit intermittent. So a nightmare to reproduce...

Nick
iszent.com

11 Jun 2012, 1:20 AM
#11
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Re: PayPal Payment Pro, no 'Decline error"?

niccol:

Has anyone had more luck with this. One of my sites has this issue. It is still 1.3.9h and there are no changes to the files in question. As numinix says the issue seems to occur just with 15005 errors and seems a bit intermittent. So a nightmare to reproduce...

We have put this in "the cost of doing business" category. Lets me sleep at night.

http://www.divinelighting.com -- Super Orders 3.0 -- Ultimate SEO -- Quantity Discounts -- SitemapXML -- Image Handler -- Shipworks

24 Jul 2012, 8:34 PM
#12
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: PayPal Payment Pro, no 'Decline error"?

I'm surprised this hasn't been resolved yet. It's a widespread issue with a module that comes with Zen Cart.

Anyways, I've debugged further and found that in paypaldp.php if the error code is 15005, then the function terminateEC will have a blank value for the $error_msg parameter on line 1758.

This is coming from line 1853:
$detailedMessage = ($errorText == MODULE_PAYMENT_PAYPALDP_INVALID_RESPONSE || $errorText == MODULE_PAYMENT_PAYPALDP_TEXT_DECLINED || $this->enableDebugging || $response['CURL_ERRORS'] != '' || $this->emailAlerts) ? (isset($response['RESULT']) && $response['RESULT'] != 0 ? MODULE_PAYMENT_PAYPALDP_CANNOT_BE_COMPLETED . ' (' . $errorNum . ')' : $errorNum) . ' ' . urldecode(' ' . $response['L_SHORTMESSAGE0'] . ' - ' . $response['L_LONGMESSAGE0'] . ' ' . $response['CURL_ERRORS']) : '';

Likely while the Zen Cart developers were testing this, they had enableDebugging true so this worked every time. But with it disabled, all the other conditions are failing. The reason they are failing is because $errorText is getting reassigned above and so it will never match the MODULE_PAYMENT_PAYPALDP_INVALID_RESPONSE or MODULE_PAYMENT_PAYPALDP_TEXT_DECLINED definitions.

So, bandaid solution is to enable debugging or email alerts. But ultimately this needs to be fixed for those who do not want to receive an email every time a customer's credit card declines.

24 Jul 2012, 11:26 PM
#13
drbyte avatar

drbyte

Sensei

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

Re: PayPal Payment Pro, no 'Decline error"?

numinix:

This is coming from line 1853:
$detailedMessage = ($errorText == MODULE_PAYMENT_PAYPALDP_INVALID_RESPONSE || $errorText == MODULE_PAYMENT_PAYPALDP_TEXT_DECLINED || $this->enableDebugging || $response['CURL_ERRORS'] != '' || $this->emailAlerts) ? (isset($response['RESULT']) && $response['RESULT'] != 0 ? MODULE_PAYMENT_PAYPALDP_CANNOT_BE_COMPLETED . ' (' . $errorNum . ')' : $errorNum) . ' ' . urldecode(' ' . $response['L_SHORTMESSAGE0'] . ' - ' . $response['L_LONGMESSAGE0'] . ' ' . $response['CURL_ERRORS']) : '';
Thanks for the detailed report.
I haven't done any regression testing on this yet, but it appears that replacing $this->enableDebugging with $this->enableDebugging || (int)trim($errorNum) > 0 appears to solve the specific problem stated.

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

1 Aug 2012, 9:32 PM
#14
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: PayPal Payment Pro, no 'Decline error"?

Yes that will work. Will you include this fix in the next version?

2 Aug 2012, 7:47 PM
#15
drbyte avatar

drbyte

Sensei

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

Re: PayPal Payment Pro, no 'Decline error"?

It will be included in a future release.

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

7 Aug 2012, 9:51 AM
#16
derek_bryant avatar

derek_bryant

Zen Follower

Join Date:
Jul 2008
Location:
Bristol UK
Posts:
162
Plugin Contributions:
0

Re: PayPal Payment Pro, no 'Decline error"?

Hi

my customer is using 1.39h with paypal pro - would you advise to make the above mod and if so where is the file located?

thanks

Derek