Forums / Bug Reports / Paypal Express with Payflow-UK

Paypal Express with Payflow-UK

Views: 15,830

Results 1 to 20 of 27
11 Nov 2019, 11:04 PM
#1
digitalshadow avatar

digitalshadow

Totally Zenned

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

Paypal Express with Payflow-UK

1.5.6c

https://www.zen-cart.com/showthread.php?221847-possible-express-checkout-bug

https://www.zen-cart.com/showthread.php?221845-Express-checket-error-invalid-amount&p=1360684#post1360684

I can't update my server to php 7+ as this bug still exists.

I desperately need to upgrade to the latest php and until this is solved I can't.

Can we please work to solve this problem.

Please, i've tried to solve it on my own and I desperately need the ZenCart team to help on this one.

20 Nov 2019, 5:32 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Paypal Express with Payflow-UK

FWIW, I found this (https://www.paypal.com/us/smarthelp/article/why-did-i-get-result-code-4-ts1205) PayPal posting describing the reasons that a result code 4 (Invalid amount) would be returned. It appears that 'Invalid amount' can mean a lot of things (not necessarily due to an amount-related issue)!

20 Nov 2019, 9:27 PM
#3
digitalshadow avatar

digitalshadow

Totally Zenned

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

Re: Paypal Express with Payflow-UK

The amount being passed contains an invalid character or amount.
The address contains a period (for example, "Ave." or "Rd.").

Use only two digits to the right of the decimal point. For example, "137.899" is incorrect. The correct format is "137.89" or "137.90" (if you're rounding up).

Difference I can see in CURL log is

The pricing amount values in 1.5.4 are always to 2 decimal places in 1.5.6 they are rounded

[AMT] => 15.90
[ITEMAMT] => 12.00
[SHIPPINGAMT] => 3.90

[PAYMENTREQUEST_0_AMT] => 15.9
[PAYMENTREQUEST_0_ITEMAMT] => 12
[PAYMENTREQUEST_0_SHIPPINGAMT] => 3.9

What does DrB think? Can someone who talks to DrB ask him to come to this thread please

22 Nov 2019, 3:59 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: Paypal Express with Payflow-UK

Elsewhere you posted:

DigitalShadow:

Would like to add to this that I've had the same error.

Replacing /includes/modules/payment/paypalwpp.php from v1.5.4-12302014 fixed issue on v1.5.6c-07162019

The file from v1.5.5-03172016 onwards has the problem

If replacing the 1.5.4 file with the 1.5.6 file works, then what's the goal regarding 1.5.5?

DigitalShadow]1.5.6c
...
I can't update my server to php 7+ as this bug still exists.I'm not sure I understand why you can't upgrade your PHP. I'm guessing you're thinking this "invalid amount" error is caused by PHP 7?
But, then you said it's fixed on 1.5.6c. And you said you're using 1.5.6c.

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

25 Nov 2019, 1:32 PM
#5
digitalshadow avatar

digitalshadow

Totally Zenned

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

Re: Paypal Express with Payflow-UK

I am running zen-cart 1.5.6c apart from the paypal files which I've pulled from 1.5.4.

The paypal files from 1.5.5 onwards do not work with paypal/payflow UK (regardless of php version) I mentioned this as there is a clear change in the way the paypal code is written from 1.5.4 to 1.5.5.

The paypal files from 1.5.4 do work with payflow uk, but do not work with php 7

So as the 1.5.4 paypal files do not work with php7+ I have to run the site in php 5.6 to ensure the paypal files from 1.5.4 work even though the rest of my website is running zen 1.5.6c

5 Dec 2019, 11:57 AM
#6
digitalshadow avatar

digitalshadow

Totally Zenned

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

Re: Paypal Express with Payflow-UK

I've replied DrB, I think you mis-understand the issue, please reply back.

1.5.5 onwards is broken for payflow UK

I am using 1.5.4 paypal files to make 1.5.6c work

so can't use php 7> as 1.5.4 code doesn't work with php 7

please help :smile:

11 Dec 2019, 10:49 AM
#7
digitalshadow avatar

digitalshadow

Totally Zenned

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

Re: Paypal Express with Payflow-UK

still broken DrB

3 Jan 2020, 5:21 PM
#8
digitalshadow avatar

digitalshadow

Totally Zenned

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

Re: Paypal Express with Payflow-UK

Still need help! Please

17 Jan 2020, 2:42 PM
#9
digitalshadow avatar

digitalshadow

Totally Zenned

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

Re: Paypal Express with Payflow-UK

Any reason you are ignoring this bug that causes any version after 1.5.5 to not work with payflow UK?

I don't understand why you aren't willing to investigate this issue.

23 Jan 2020, 12:53 PM
#10
digitalshadow avatar

digitalshadow

Totally Zenned

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

Re: Paypal Express with Payflow-UK

I will gladly donate/pay to get this bug fixed!

26 Jan 2020, 11:02 AM
#11
digitalshadow avatar

digitalshadow

Totally Zenned

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

Re: Paypal Express with Payflow-UK

Would still love to join the rest of the world on php 7+

Any chance of a discussion on this issue?

19 Feb 2020, 3:58 PM
#12
digitalshadow avatar

digitalshadow

Totally Zenned

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

Re: Paypal Express with Payflow-UK

Still a problem

24 Feb 2020, 6:01 PM
#13
digitalshadow avatar

digitalshadow

Totally Zenned

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

Re: Paypal Express with Payflow-UK

Begining to find the lack of communication bewildering.

The one time DrB replied you got the issue the wrong way round.

I've made it clear I will work with you to solve the problem by providing full logs of the issue once I know a resolution is being worked towards.

21 Feb 2021, 6:51 PM
#14
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: Paypal Express with Payflow-UK

DigitalShadow:

Would still love to join the rest of the world on php 7+

Any chance of a discussion on this issue?
Hi @DrByte
I have two sites for the same client one runs Zencart 1.5.6a and the other 1.5.6c both run on a server running PHP 7 and recently switched to using PayPal Express with Payflow-UK. Both sites offer either payment by CC/DC and PAYPAL if the customer selects CC payment goes through without any issues . But if they opt for PayPal they get the "An error occurred when we tried to contact the payment processor. Please try agin , select an alternative payment method, or contact the store owner for assistance. (4) 4 Invalid Amount - Invalid Amount"

Can anyone throw some light on this please, thank you.

22 Feb 2021, 11:25 PM
#15
drbyte avatar

drbyte

Sensei

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

Re: Paypal Express with Payflow-UK

ianhg:

(4) 4 Invalid Amount - Invalid Amount"
If you enable logging for the module, what's in the PayPal-CURL-xxxxx.log file generated by the transaction attempt? The actual details being transmitted should appear there. What's the amount of the transaction?

Is it just something with a comma as a thousands-separator?

.
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 Feb 2021, 10:54 AM
#16
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: Paypal Express with Payflow-UK

DrByte:

If you enable logging for the module, what's in the PayPal-CURL-xxxxx.log file generated by the transaction attempt? The actual details being transmitted should appear there. What's the amount of the transaction?

Is it just something with a comma as a thousands-separator?
This is the CURL Log
2021-02-23 10:51:16


(live transaction) --> https://payflowpro.paypal.com/transaction
Request Headers:
Array
(
[0] => Content-Type: text/namevalue
[1] => X-VPS-Timeout: 90
[2] => X-VPS-VIT-Client-Type: PHP/cURL
[3] => X-VPS-VIT-Integration-Product: PHP::Zen Cart(R) - PayPal/Payflow Pro
[4] => X-VPS-VIT-Integration-Version: 1.5.6
)

Request Parameters: {SetExpressCheckout}
Array
(
[PAYMENTREQUEST_0_AMT] => 1
[PAYMENTREQUEST_0_ITEMAMT] => 0.83
[PAYMENTREQUEST_0_TAXAMT] => 0.17
[L_PAYMENTREQUEST_0_NUMBER0] => test
[L_PAYMENTREQUEST_0_NAME0] => test [894]
[L_PAYMENTREQUEST_0_QTY0] => 1
[L_PAYMENTREQUEST_0_AMT0] => 0.83
[PAYMENTREQUEST_0_CURRENCYCODE] => GBP
[LOCALECODE] => GB
[GIFTMESSAGEENABLE] => 0
[GIFTRECEIPTEENABLE] => 0
[GIFTWRAPENABLE] => 0
[GIFTWRAPNAME] =>
[GIFTWRAPAMOUNT] => 0
[BUYEREMAILOPTINENABLE] => 0
[CUSTOMERSERVICENUMBER] =>
[BRANDNAME] => *****
[PAYMENTREQUEST_0_PAYMENTACTION] => Sale
[ALLOWNOTE] => 1
[LANDINGPAGE] => Billing
[NOSHIPPING] => 0
[REQCONFIRMSHIPPING] => 1
[EMAIL] => *******
[PAYMENTREQUEST_0_SHIPTOPHONENUM] => 5445454545
[ACTION] => S
[TENDER] => P
[TRXTYPE] => S
[RETURNURL[61]] => https://domain/ipn_main_handler.php?type=ec
[CANCELURL[82]] => https://domain/index.php?main_page=checkout_shipping
[ec_cancel] => 1
[PAGESTYLE] => Primary
[REQUEST_ID] => 1614077475
[USER] =>*******
[PWD] => ****************
[PARTNER] => PayPalUK
[VENDOR] => ******
)

Response:
Array
(
[RESULT] => 4
[RESPMSG] => Invalid amount
[REQUEST_ID] => 1614077475
[CURL_ERRORS] =>
)

SetExpressCheckout, Elapsed: 699ms -- Failed

RESULT=4&RESPMSG=Invalid amount&REQUEST_ID=1614077475&CURL_ERRORS=

The strange thing is if I change the option to PayPal and not Payflow-UK in admin express checkout the problem does not occur. Dr Byte for your info when the client applied to Paypal for pro, PayPal had to give them a special link for the option for Payflow-UK as it did not appear in their account. I spoke with PayPal and they have changed or are going to change something. I have emailed PayPal but still awaiting a reply from them!
Thanks for your help.

23 Feb 2021, 2:54 PM
#17
drbyte avatar

drbyte

Sensei

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

Re: Paypal Express with Payflow-UK

I'm wondering:

  • Is it because the amount is so low? ie: under 1.00 when the tax portion is separated out for PayPal's calculations?
  • How is the log different when using "PayPal" vs "Payflow-UK"?

.
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 Feb 2021, 3:30 PM
#18
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: Paypal Express with Payflow-UK

DrByte:

I'm wondering:

  • Is it because the amount is so low? ie: under 1.00 when the tax portion is separated out for PayPal's calculations?
  • How is the log different when using "PayPal" vs "Payflow-UK"?
    The Test purchase of £1.00 is not an issue when the Payflow-UK has been changed to PayPal. The amount of purchase does not seem to matter as some purchases produced the warning that were £50 plus, customers where unable to complete the purchase. CC payments go through OK . It's only when the customers opts to pay via PayPal express, and we have set express to use Payflow-UK that we get a problem.

When using PayPal no log is generated as far as I can see, apart from the usual in admin/orders details.

Just as a side issue, as I understand it Cardinal Commerce has an agreement with PayPal and all you need to do is register, the link that PayPal sent no longer works. Are you aware of a link that allows Zencart users to register with Cardinal Commerce?

Thanks

27 Feb 2021, 1:45 PM
#19
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: Paypal Express with Payflow-UK

@DrByte
Something has changed at PayPal. We have contacted PayPal and they are looking into why the Cardinal Commerce process is not working . Because the link that PayPal provided no longer works (same link on zen cart documents). The client contacted Cardinal Commerce with the following reply:"Basically you will need to go back to PayPal as they currently do not have an EMV 3D Secure solution in place." Paypal support has been emailed with this information, and we await a reply.
So we have stopped using the Payflow-uk option in Zencart and currently use Paypal option. This works for customer paying via PayPal express or PayPal, no logs appear.
However, if the CC version of payment is used the payment goes through but an email is generated saying "Cardinal Lookup 3[nn2ej6m516kr6sf8hf420ta7h9] Cardinal Centinel - cmpi_lookup error - 1002, 2002, 2020 - Error Processing Lookup Request Message, Invalid Merchant Id or Processor Id, Invalid Transaction Password

There are 3 steps to configuring your Cardinal 3D-Secure service properly:
1-Login to the Cardinal Merchant Admin URL supplied in your welcome package (NOT the test URL), and accept the license agreement.
2-Set a transaction password.
3-Copy your Cardinal Merchant ID and Cardinal Transaction Password into your ZC PayPal module. etc"

My question is how can I disable the cardinal merchant aspect, is it really necessary in the UK as PayPal UK as I understand it are registered as a bank and would apply their own 2 part authentication or have I got this wrong?

2 Mar 2021, 11:00 AM
#20
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: Paypal Express with Payflow-UK

ianhg:

@DrByte
Something has changed at PayPal. We have contacted PayPal and they are looking into why the Cardinal Commerce process is not working . Because the link that PayPal provided no longer works (same link on zen cart documents). The client contacted Cardinal Commerce with the following reply:"Basically you will need to go back to PayPal as they currently do not have an EMV 3D Secure solution in place." Paypal support has been emailed with this information, and we await a reply.
So we have stopped using the Payflow-uk option in Zencart and currently use Paypal option. This works for customer paying via PayPal express or PayPal, no logs appear.
However, if the CC version of payment is used the payment goes through but an email is generated saying "Cardinal Lookup 3[nn2ej6m516kr6sf8hf420ta7h9] Cardinal Centinel - cmpi_lookup error - 1002, 2002, 2020 - Error Processing Lookup Request Message, Invalid Merchant Id or Processor Id, Invalid Transaction Password

There are 3 steps to configuring your Cardinal 3D-Secure service properly:
1-Login to the Cardinal Merchant Admin URL supplied in your welcome package (NOT the test URL), and accept the license agreement.
2-Set a transaction password.
3-Copy your Cardinal Merchant ID and Cardinal Transaction Password into your ZC PayPal module. etc"

My question is how can I disable the cardinal merchant aspect, is it really necessary in the UK as PayPal UK as I understand it are registered as a bank and would apply their own 2 part authentication or have I got this wrong?
Further information from Cardinal Commerce:
"At this time in 2021 we are referring PayPal Pro merchants back to PayPal for boarding on Complete Payments. We have been working on cleaning up the merchant messaging to minimize confusion but realize there is still some confusion out there. We were not able to enable 3DS 2.1 in a timely fashion for the UK merchants whom will need to support this protocol for issuers impacted by PSD2 mandates."