If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Built-in Shipping and Payment Modules / PayPal Payflow Pro - "An Error has Occurred (0 <!-- Approved -->)"

PayPal Payflow Pro - "An Error has Occurred (0 <!-- Approved -->)"

Started by lightbrown on 20 Mar 2017, 9:55 PM · Views: 1,148

Results 1 to 10 of 10
20 Mar 2017, 9:55 PM
#1
lightbrown avatar

lightbrown

New Zenner

Join Date:
Jun 2015
Location:
California
Posts:
54
Plugin Contributions:
0

Post #1 by lightbrown

1.5.5d
php 5.4.43

PayPal Payflow Pro and PayPal Express payment modules are both active.

plugins:
COWOA
One Page Checkout (same error also occured before installing OPC)
a few other small ones

I seem to be showing the same problem as this thread from 2010: https://www.zen-cart.com/showthread.php?166294-An-Error-has-Occurred-%280-lt-!-Approved-gt-%29

This has happened from time to time for a while but quite rarely. Usually in weird spurts, like three or four errors over the course of a week and then nothing for months. This last weekend it happened four times and hasn't happened again since then.

Essentially, the customer inputs their CC info in the ZC payment page, then clicks the process order button and the payment succeeds through the Payflow gateway (money is received) but the customer is kicked back to the payment page with a red "0" where their would normally be a payment error message at the top of the payment page. So the customer thinks the order didn't go through. No order is recorded in ZC admin. The PayPal IPN log in admin doesn't record anything.

We receive an email with the subject line "An Error has Occurred (0 <!-- Approved -->)"

Dear store owner,
An error occurred when attempting to initiate a PayPal Express Checkout transaction. As a courtesy, only the error "number" was shown to your customer. The details of the error are shown below.

Approved

Zen Cart message: 0 <!-- Approved --> -

Transaction Response Details: Array
(
[RESULT] => 0
[PNREF] => BX0PF604DF10
[RESPMSG] => Approved
[AUTHCODE] => 111111
[AVSADDR] => Y
[AVSZIP] => Y
[CVV2MATCH] => Y
[PPREF] => 9FP02326LA472405N
[CORRELATIONID] => 3af892dc20820
[PROCAVS] => Y
[PROCCVV2] => M
[IAVS] => N
[PREFPSMSG] => No Rules Triggered
[POSTFPSMSG] => No Rules Triggered
[REQUEST_ID] => 1489425832
[CURL_ERRORS] =>
)

Transaction Submission: Array
(
[ACCT] => PRIVATE
[AMT] => 51.05
[CARDISSUE] =>
[CITY] => PRIVATE
[COUNTRY] => US
[CURRENCY] => USD
[CUSTOM] => PF-33854-1489425832
[CVV2] => ***
[EMAIL] => PRIVATE
[EXPDATE] => PRIVATE
[FIRSTNAME] => PRIVATE
[INVNUM] => 33854-1489425832-[PRIVATE]
[IPADDRESS] => PRIVATE
[ITEMAMT] => 32.00
[LASTNAME] => PRIVATE
[NOTIFYURL] => https://www.DOMAIN/ipn_main_handler.php
[PHONENUM] => PRIVATE
[SHIPPINGAMT] => 19.05
[STATE] => PRIVATE
[STREET] => PRIVATE
[TENDER] => C
[TRXTYPE] => S
[ZIP] => PRIVATE
[REQUEST_ID] => 1489425832
)

I had a back and forth with PayPal over the last week, and they eventually told me it must be an issue with Zen Cart. They looked at the transactions from their end and said that everything looked normal: "I was checking your IPN on your account and there is no problems on our end. PayPal sends IPN but we don't know what ZenCart is doing with it."

I cannot reliably reproduce the error, and I have only seen it from the customer's perspective once.

So it seems like there is a communication error between PayPal and Zencart. Any ideas or advice is greatly appreciated. I can't come up with any explanation for this.

(This error occurred while running 1.3.9 as well)

Cheers!

20 Mar 2017, 10:19 PM
#2
drbyte avatar

drbyte

Sensei

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

Post #2 by drbyte

It's not an issue with IPN.

It's probably an artifact of PayPal's almost-the-same-but-not-reliably-similar APIs and the need to support all. While I blame their APIs, evidently something in ZC isn't properly recognizing that you received a Payflow transaction approval instead of a PayPal transaction approval, and so it simply responded with the default value of 0.

It'd be a whole lot easier to "fix" if there were a way to consistently replicate 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.

21 Mar 2017, 4:46 PM
#3
lightbrown avatar

lightbrown

New Zenner

Join Date:
Jun 2015
Location:
California
Posts:
54
Plugin Contributions:
0

Post #3 by lightbrown

DrByte:

It'd be a whole lot easier to "fix" if there were a way to consistently replicate the problem.

Agreed.

I will keep watch in the future if it happens to try and find anything that the transactions may have in common or if there is any way to replicate the issue.

But I'm not holding out much hope.

Now I just have to explain that to the owner ;)

21 Mar 2017, 6:12 PM
#4
drbyte avatar

drbyte

Sensei

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

Post #4 by drbyte

Just to confirm: are you using the built-in PayPal Payments Pro module? Or did you install an additional set of PHP files to specifically do Payflow? I'm not suggesting making any changes, just asking to clarify what you're actually using.

(To check, you could confirm that the /includes/modules/payment/ folder doesn't contain a "payflow.php" file, but only paypal.php, paypaldp.php and paypalwpp.php files.)

.
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 Mar 2017, 6:39 PM
#5
lightbrown avatar

lightbrown

New Zenner

Join Date:
Jun 2015
Location:
California
Posts:
54
Plugin Contributions:
0

Post #5 by lightbrown

I thought we were using the built in PayPal Payments Pro module. I think we used a different addon for payflow in the past when running 1.3.9, but i never installed a new addon after updgading to 1.5.5.

However, it does look like the payflow.php file still exists in /includes/modules/payment

and...

in admin->modules->payment, "PayPal Payflow Pro - Gateway - payflow" and "PayPal Payments Pro (USA) - PayPal" both exist

and...

it looks like "PayPal Payflow Pro - Gateway - payflow" is currently enabled

It looks like this is the old 1.3.9 module and we have mistakenly allowed it to persist through the upgrade?

Which would mean I should switch over to the "PayPal Payments Pro (USA) - PayPal" module?

22 Mar 2017, 2:08 AM
#6
drbyte avatar

drbyte

Sensei

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

Post #6 by drbyte

That's helpful info.

But, I probably asked the question out of turn, since your first post quoted it as "An error occurred when attempting to initiate a PayPal Express Checkout transaction ..."
If the transaction request/response data you quoted was indeed from an Express Checkout transaction, then it wasn't from the payflow.php module.

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

22 Mar 2017, 5:13 PM
#7
lightbrown avatar

lightbrown

New Zenner

Join Date:
Jun 2015
Location:
California
Posts:
54
Plugin Contributions:
0

Post #7 by lightbrown

DrByte:

since your first post quoted it as "An error occurred when attempting to initiate a PayPal Express Checkout transaction ..."
If the transaction request/response data you quoted was indeed from an Express Checkout transaction, then it wasn't from the payflow.php module.

That keeps confusing me as well. I'm relatively sure that the problem transactions have been processed through the payflow module even though the error email says "PayPal Express." I think this because after the error, when the customer tries the transaction again, it goes through with payflow every time (in the admin Orders page it says "payflow" next to the order number, I believe if it was actually an express transaction it would say "paypalwpp").

23 Mar 2017, 4:09 AM
#8
drbyte avatar

drbyte

Sensei

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

Post #8 by drbyte

LightBrown:

I'm relatively sure that the problem transactions have been processed through the payflow module even though the error email says "PayPal Express." I think this because after the error, when the customer tries the transaction again, it goes through with payflow every time (in the admin Orders page it says "payflow" next to the order number, I believe if it was actually an express transaction it would say "paypalwpp").
Your assumptions are correct.

If you were to ask one of the customers, did they actually try with PayPal first, and then got an error so they tried with credit card instead?

.
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 Mar 2017, 4:35 PM
#9
lightbrown avatar

lightbrown

New Zenner

Join Date:
Jun 2015
Location:
California
Posts:
54
Plugin Contributions:
0

Post #9 by lightbrown

DrByte:

If you were to ask one of the customers, did they actually try with PayPal first, and then got an error so they tried with credit card instead?

I have been told by someone who saw the error happen that they were trying to place the order directly through the website--inputting their payment info directly on our site--when the error occurred. So that cannot actually be the actual PayPal Express module, at least as far as I understand it.

24 Mar 2017, 5:58 PM
#10
drbyte avatar

drbyte

Sensei

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

Post #10 by drbyte

LightBrown:

I have been told by someone who saw the error happen that they were trying to place the order directly through the website--inputting their payment info directly on our site--when the error occurred. So that cannot actually be the actual PayPal Express module, at least as far as I understand it.
Right: PayPal Express Checkout takes you to PayPal's site to enter credit card details.

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