Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payflo Pro Credit cards always Zero #3509

Closed
joebusby opened this issue Feb 22, 2016 · 26 comments
Closed

Payflo Pro Credit cards always Zero #3509

joebusby opened this issue Feb 22, 2016 · 26 comments
Assignees

Comments

@joebusby
Copy link

Using PHP Version 5.6.17-0+deb8u1 on OpenVZ deb 8 Several cores and 3GB memory

The cart reports Zero dollars on all transactions. I have looked at the configuration several times and can't seem to find anything there (help here maybe). PayPal support says:

Nothing in PayPal Manager would affect the information that Magento is
passing in. Basically what is happening is that Magento is sending the
amount as $0.00 for the credit card payments, but is sending the
correct amount information for Express Checkout.

I tried different users to no avail. Does anyone have this working? Ideas?

@alena-marchenko alena-marchenko self-assigned this Feb 23, 2016
@asemenenko
Copy link

Hi @joebusby can you send a debug log for actions you tried to perform along with screenshots of configuration?

@joebusby
Copy link
Author

Here is the debug showing the transaction amount as zero, config below

'request' =>
array (
'user' => '_',
'vendor' => 'compay_name',
'partner' => 'PayPal',
'pwd' => '
_
',
'verbosity' => 'HIGH',
'BNCODE' => 'Magento_Cart_Community',
'tender' => 'C',
'trxtype' => 'A',
'amt' => 0,
'createsecuretoken' => 'Y',
'securetokenid' => 'longnumberhere',
'returnurl' => 'https://mydomain.com/paypal/transparent/response/',
'errorurl' => 'https://mydomain.com/paypal/transparent/response/',
'cancelurl' => 'https://mydomain.com/paypal/transparent/cancel/',
'disablereceipt' => 'TRUE',
'silenttran' => 'TRUE',
'firstname' => 'Fred',
'lastname' => 'Farnsworth',
'street' => '123 AnyStreet',
'city' => 'AnyCity',
'state' => 'OH',
'zip' => '12345',
'country' => 'US',
'email' => NULL,
'shiptofirstname' => 'Fred',
'shiptolastname' => 'Farnsworth',
'shiptostreet' => '123 Anystreet',
'shiptocity' => 'AnyCity',
'shiptostate' => 'OH',
'shiptozip' => '12345',
'shiptocountry' => 'US',
),
'result' =>
array (
'result' => '0',
'securetoken' => 'token_here',
'securetokenid' => 'tokenID_here',
'respmsg' => 'Approved',
'result_code' => '0',
),
) {"is_exception":false} []
[2016-02-23 15:05:49] main.DEBUG: array (
) {"is_exception":false} []

ccbasic

ccadvanced

@joebusby joebusby reopened this Feb 23, 2016
@alena-marchenko
Copy link

Hi,

When you are using PayPal Payments Pro or Payflow Pro solution first request sent to PayPal intended for account verification. Account verification, also known as zero-amount authorizations, are used for verifying the validity of customer credit card information. You can find more information at PayPal documentation.

@joebusby
Copy link
Author

Okay, but my business will not work if I never capture any transactions
and people see there transaction as "declined". So why am I submitting
only verification transactions? If I had Magento 2 set for this, you
would think PayPal express payments would also be zero. Is there a
setting somewhere I am missing? I have never seen these "verification" transactions in my account until using Magento 2, and they should not be there.

@joebusby
Copy link
Author

Another conversation with PayPal support, and they think the issue I am having may be related to the DNS resolution and network configuration. I will update after this is explored.

@joebusby
Copy link
Author

I went back to Paypal and they again stated that the transaction amount is working with paypal express but my Magento 2.0 server is sending Zero for the amount. PayPal can do nothing to fix this, so the problem is a Bug. Please re-open this.

Here is the incoming transaction for Paypal from my server:

user
paypal_gateway_api1.paypal.com
subject
PJSARGEAXMSVU
seller_acct_num
134567890123456
correlation_id
8e0645a3b09285
pymt_action
Authorization
actor_acct_num
0
amt
0.00
currency_code
USD
cc_last_4
xxxx
merchant_acct_num
13459851234562196
avs_result
Success
buyer_acct_num
12274864123456995
pymt_flow_id
12345678946
cc_trans_id
1234567890979
processor_response
pimp_rc
9296
txn_id
5012346y88859214C
DoDirectPaymentResponse
msgsubid
"BQ1PD08B2DAD"
timestamp
"2016-02-25T15:07:29Z"
correlationid
"8e0645a3bcc30"
ack
"SuccessWithWarning"
version
"115.0"
build
"18316154"
errorcode
10574
shortmessage
"Credit card verified."
longmessage
"This card authorization verification is not a payment transaction."
severitycode
"Warning"
errorparamid
""
errorparamvalue
""
amt
"0.00"
currencycode
"USD"
avscode
"Z"
cvv2match
"M"
transactionid
"123456789014C"

Paypal Transaction ID:
5123456789059214D
Card Balance Amount:
Account Number:
xxxx
Expiration Date:
03 / 2018
ABA Number:
Account Type:
SS Number:
DL Number:
Amount:
USD 0.00
CVV2:
Y
Transaction State:
0
Batch ID:
Time:
Feb 25, 2016 07:07:26 AM
Transaction Type:
Authorization
Tender:
MasterCard
Original Transaction ID:
Original State:
Result:
0
Authorization Response Text:
Response Message:
Approved
CVV2 Match:
Y
Authorization Code:
111111
AVS Street Match:
N
Error Code:
AVS ZIP Match:
Y
Recurring:
Customer Reference:
International AVS Indicator:
N
ACI Result:
Stock Keeping Unit(SKU):
Merchant Serv Num:
Merchant Desc:

@asemenenko asemenenko reopened this Feb 25, 2016
@joebusby
Copy link
Author

I set the default URLs in magento (mydomain.com)to match the DNS entry for the site and the problem still exists. When i go to http://mydomain.com the site is resolved from anywhere. It does not appear at this point to be DNS related, and that it works just fine with paypal express indicates that the problem is not a DNS problem.

@joebusby
Copy link
Author

More info:

The site has been upgraded twice starting at 2.0.0, (now 2.0.2) the second time from the command line since the web mechanism would not work properly after one upgrade.

The sample data was loaded (mostly removed now) initially.

Not sure if that helps any. . .

@dkvashninbay
Copy link
Contributor

Hi,
Please review Paypal Transparent Redirect integration detail and requirements, described in this document:
https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/paypal_transparent_redirect.pdf
p.6-8 - Transparent Redirect description,
p. 10-11 - Merchant account requirements.

  • review that you have enabled Reference transactions in your account.

As i reviewed your incoming transaction from Paypal and it has different format from what we expect in our integration.

@joebusby
Copy link
Author

So. . . I have requested that Paypal adjust my account to handle transparent redirect

And: the Magento 2 cart needs to accommodate tokens to support this (maybe implemented already)

And: the format of the PayPal incoming request should be corrected.

Is that the correct assessment?

Thanks for any help.

@joebusby
Copy link
Author

Here is a link in Magento Community with others having the same problem:
https://community.magento.com/t5/Installing-Magento-2/Magento-2-PayPal-Payflow-Payments-Pro/td-p/28188

@dkvashninbay
Copy link
Contributor

@joebusby Yes, thats right.
Also please notice that Paypal has upgraded to TLS1.2 https://www.paypal-knowledge.com/infocenter/index?page=content&widgetview=true&id=FAQ1914&viewlocale=en_US
Which means that your server should have libcurl v 7.34 or later.

Another issue you may face is that PayPal should be configured to use POST method to send verification transaction details instead of GET which is insecure(manager.paypal.com -> Service Settings -> Set Up -> set all return url methods to POST) and HTTPS should be enabled for Store.

@joebusby
Copy link
Author

joebusby commented Mar 4, 2016

My phpinfo says:
cURL support enabled
cURL Information 7.38.0

My site uses Https, and I have configured PayPal to "Enable Secure Token: Yes" if that is what you mean by HTTPS should be enabled for Store

The settings you refer to are under "PayPal Hosted pages" and I have that working as a work-around using the "Payments Advanced" config. Do these "POST" settings affect PayPal PayFlo Pro? I was hoping to get the PayFlo Pro solution working.

@asemenenko
Copy link

Hi @joebusby

So. . . I have requested that Paypal adjust my account to handle transparent redirect

Is request resolved already? Is something changed in logs?

@fhennessy
Copy link

I changed the return URL to POST and I am still having the decline error when the payment did go through.. any help?

@joebusby
Copy link
Author

joebusby commented Mar 4, 2016

I changed to "POST" on two places per: (manager.paypal.com -> Service Settings -> Set Up -> set all return url methods to POST)

I requested that PayPal change my account to support "transparent redirect" and they said the would create a ticket and let me know when it was complete. I never heard back so I don't know what went on on that end, but I just tested my site using PayFlo Pro and it worked!

The authorization did take several seconds with the spinner running, but the solution is much nicer than the "c" paypal box on my checkout page.

Thanks to those who helped. If this remains a solid fix, it would be helpful to let the PayPal Techs know about the process to make it easier for others.

@fhennessy
Copy link

We found out that we had the pricing precision on for 4 decimals, so the price that we were sending to PayPal was $5.7193 and PayPal was processing the payment and sending $5.72 back to Magento, and Magento then rejected the payment thinking it was incorrect.

.<

@joebusby joebusby closed this as completed Mar 8, 2016
@OleksiyOleksiyovych
Copy link

I am sorry, but I have this issue too (Magento version 2.0.2)
Pardon, but I don't understand, will it fix on next release or I can fix it now?

@joebusby
Copy link
Author

joebusby commented Mar 9, 2016

@OleksiyOleksiyovych 2.0.2 is working for me with changes above. I can't be sure what changes worked because I once it worked I don't want to experiment.
I changed to "Post" on the Paypal manager as described above and Paypal had to enable my account for "transparent redirect" (not sure what they did really). Other settings in "PayFlo Pro" can be configured with the help of PayPal if you need it. Mine are mostly detailed above except I have changed the SSL Verification to "Yes" now.

@OleksiyOleksiyovych
Copy link

Thank you!
"Cancel URL Method" and "Return URL Method" were set to "POST".
But "Enable Secure Token" was set to "No" by default. I changed to "Yes" and all works well for me now.

@gabriel-sf
Copy link

Just to add a note (since I just fixed it after 3 full days), renaming the tables and removing the table prefix solved the 400 error for me using PayFlow Pro. --> Same thing as other posts using BrainTree

@amarroni
Copy link

amarroni commented Sep 1, 2016

@gabriel-sf what do you mean "renaming the tables and removing the table prefix"

We are trying to configure PayPal PayFlow Pro (test mode first) in our site and we are expecting the error of AMT 0.00
We tried all mentioned above, nothing works, any additional help? I appreciate!
Cc: @OleksiyOleksiyovych

@gabriel-sf
Copy link

Hi @OleksiyOleksiyovych
Check if your database table manes have any kind of prefix. For example
"mg_" and remove them so they have the default name from Magento.
It seems that there is a function somewhere that had a bug which did not
added the prefix to the table and it's causing this issue.
Hope it helps

On 2 Sep 2016 5:36 AM, "Alejandro Marroni" notifications@github.com wrote:

@gabriel-sf https://github.com/gabriel-sf what do you mean "renaming
the tables and removing the table prefix"

We are trying to configure PayPal PayFlow Pro (test mode first) in our
site and we are expecting the error of AMT 0.00
We tried all mentioned above, nothing works, any additional help? I
appreciate!
Cc: @OleksiyOleksiyovych https://github.com/OleksiyOleksiyovych


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3509 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALfSIUMJZ9eECYclxKYKUiNOmsj3bnyYks5qlyk-gaJpZM4HgHYJ
.

@brijeshjp2006
Copy link

If You do payment on test mode for Paypal Payflow then go
vendor\magento\module-paypal\Model\Payflow\Service\Request\SecureToken.php

then find
$request->setAmt(0);
After you can change payment according you like
$request->setAmt(10.50);

@mariamghalleb
Copy link

@amarroni Hey, me too I tried everything in vain, did u find a fix for the problem, please?

magento-engcom-team pushed a commit that referenced this issue Dec 5, 2018
[TSG] Backporting for 2.2 (pr60) (2.2.8)
@FanWenjun
Copy link

FanWenjun commented Aug 24, 2019

Please refer to this answer #3509:
1: go to your manager.paypal.com,
go Home->Service Summary-> Hosted Checkout Pages->Set up->Cancel URL Method: POST;
Return URL Method: POST; Enable Secure Token: Yes;
This will capture the real amount after authorize the amount 0, this action works immediately.
You do not need to change the setAmount(0), the 0 is on purpose, for authorization Credit card.

2: still at the manager.paypal.com (if you get the Failed merchant rule check error with result code 117 )
go Account Administration->transaction Settings->Allow reference transactions: Yes
This action will take effect in an hour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests