Zen Cart Logo
Forums / PayPal Website Payments Pro support / ALERT: PayPal Direct Payment Error ( <!-- -->)

ALERT: PayPal Direct Payment Error ( <!-- -->)

Locked

Views: 24,361

Results 21 to 33 of 33
This thread is locked. New replies are disabled.
31 Mar 2008, 8:07 PM
#21
zb21hay avatar

zb21hay

New Zenner

Join Date:
Jan 2006
Posts:
21
Plugin Contributions:
0

ALERT: PayPal Direct Payment Error ( <!-- -->)

The customers I have contacted who have this issue are receiving messages about the credit card billing address is not correct.

Any help would be great.

Z

10 Jun 2008, 11:16 PM
#22
mfkap avatar

mfkap

New Zenner

Join Date:
Jun 2005
Posts:
8
Plugin Contributions:
0

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

I can say that I was getting this error related to an incorrect Address (zip) validation as well. Is there any way to intercept the error from paypal and display a little bit nicer error message? I know that if I was buying something and got some random paypal message on a site that doesn't even appear to be using paypal, I would be gone. Where can I intercept and restate the error?

11 Jun 2008, 12:06 AM
#23
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

This change in error handling has worked for me. Caution, it may break other things.

IN FILE:
includes\modules\payment\paypaldp.php

Near Lines 1455
REPLACE or REMARK:
if ($basicError ||
(isset($_SESSION['paypal_ec_token']) && $_SESSION['paypal_ec_token'] != urldecode($response['TOKEN'])) ) {

WITH:
if ($basicError) {

5 Aug 2008, 6:40 PM
#24
drbyte avatar

drbyte

Sensei

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

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

stagebrace:

This change in error handling has worked for me. Caution, it may break other things.

IN FILE:
includes\modules\payment\paypaldp.php

Near Lines 1455
REPLACE or REMARK:
if ($basicError ||
(isset($_SESSION['paypal_ec_token']) && $_SESSION['paypal_ec_token'] != urldecode($response['TOKEN'])) ) {

WITH:
if ($basicError) {

Stagebrace, you're correct -- the $response[TOKEN] isn't always set in the data that comes back from PayPal. So much for consistency in their APIs. Your approach should be fine. Nevertheless ...

I think the following is slightly more efficient from a security standpoint:
Replace this:if ($basicError || (isset($_SESSION['paypal_ec_token']) && $_SESSION['paypal_ec_token'] != urldecode($response['TOKEN'])) ) {with this:```
if ($basicError ||
([B]([/B]isset($_SESSION['paypal_ec_token'])[B] && isset($response['TOKEN']))[/B] && $_SESSION['paypal_ec_token'] != urldecode($response['TOKEN'])) ) {

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

5 Aug 2008, 6:46 PM
#25
newbey avatar

newbey

New Zenner

Join Date:
Nov 2006
Posts:
22
Plugin Contributions:
0

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

Thanks for your diligence in resolving this issue.
Will the code change eliminate the errors with PayPal Website Payments Pro module? Would love to use the integrated payment processing, but can't afford to lose any sales...

5 Aug 2008, 7:02 PM
#26
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

Will the code change eliminate the errors with PayPal Website Payments Pro module?

The code suggested has elemiated the **ALERT: PayPal Direct Payment Error ( <!-- -->) **for me.

5 Aug 2008, 10:39 PM
#27
enigmabomb avatar

enigmabomb

New Zenner

Join Date:
Jan 2008
Posts:
49
Plugin Contributions:
0

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

me too.

28 Aug 2008, 8:00 PM
#28
dunktastic avatar

dunktastic

New Zenner

Join Date:
Oct 2007
Posts:
7
Plugin Contributions:
0

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

Does this change need to be made in paypalwpp.php too?

Thanks

Duncan

28 Aug 2008, 11:12 PM
#29
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

No, just the file name mentioned in post #24

12 Nov 2008, 3:18 AM
#30
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

I too am getting the error.. so I will try the fix as well. I'll let you all know if there are issues.

~ jasmel : ** My Store** Using Contributions: Wallet Theme | Simple Google | Quantity Discounts | Godaddy | FAQ's | Confirm Email Address Entry | Admin login as customer | Newsletter Subscribe | CampaingMonitor

17 Feb 2009, 11:31 PM
#31
highstyleinc avatar

highstyleinc

New Zenner

Join Date:
Jan 2008
Posts:
29
Plugin Contributions:
0

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

I am getting this error as well but I cannot open the includes\modules\payment\paypaldp.php

3 Mar 2009, 5:28 PM
#32
jaxbakers avatar

jaxbakers

New Zenner

Join Date:
Mar 2006
Location:
Jacksonville Fl
Posts:
73
Plugin Contributions:
0

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

I have had my cart up and working for over a month, now this. Have applied the code && isset($response['TOKEN'])). Will see if it works.

9 Mar 2009, 3:03 AM
#33
seventhwhiskey avatar

seventhwhiskey

New Zenner

Join Date:
Mar 2009
Posts:
3
Plugin Contributions:
0

Re: ALERT: PayPal Direct Payment Error ( <!-- -->)

Just had the 10413 problem on my site and spent 6 hours figuring it out. If Sub-total in Modules>Order Total is disabled it gave me the error, but once I turned it back on it now works fine.