magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.58k stars 9.32k forks source link

Payflo Pro Credit cards always Zero #3509

Closed joebusby closed 8 years ago

joebusby commented 8 years ago

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?

asemenenko commented 8 years ago

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

joebusby commented 8 years ago

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

alena-marchenko commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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:

joebusby commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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.

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

joebusby commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

joebusby commented 8 years ago

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 commented 8 years ago

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.

.<

OleksiyOleksiyovych commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

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 https://github.com/magento/magento2/issues/3509#issuecomment-244187894, or mute the thread https://github.com/notifications/unsubscribe-auth/ALfSIUMJZ9eECYclxKYKUiNOmsj3bnyYks5qlyk-gaJpZM4HgHYJ .

brijeshjp2006 commented 6 years ago

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 commented 6 years ago

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

FanWenjun commented 5 years ago

Please refer to this answer https://github.com/magento/magento2/issues/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.