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.57k stars 9.32k forks source link

Create Credit Memo for Braintree transactions. #17068

Closed devgoku closed 6 years ago

devgoku commented 6 years ago

Getting error when do the Credit Memo by clicking on Refund button in Braintree payment gateway. In debug log, it is saying that

Cannot refund a transaction unless it is settled

But transaction is showing settled in Braintree account.

image

Preconditions

  1. Magento 2.1.4

Steps to reproduce

  1. Order from frontend and make payment with credit card using Braintree payment gateway
  2. In admin , create credit memo from invoice detail page. Click on Refund button

Expected result

  1. It should show success message for credit memo.

Actual result

  1. Transaction has been declined. Please try again later.
  2. In log it says - [2018-07-24 12:55:05] main.CRITICAL: Braintree error response. [] []
  3. image
  4. In debug.log [2018-07-24 13:43:34] main.DEBUG: array ( 'request' => array ( 'transaction_id' => 'bh7598p1', 'amount' => '230.11', ), 'client' => 'Magento\Braintree\Gateway\Http\Client\TransactionRefund', 'response' => array ( 'success' => false, '' . "\0" . '*' . "\0" . '_attributes' => array ( 'errors' => Braintree\Error\ErrorCollection::set_state(array( '_errors' => Braintree\Error\ValidationErrorCollection::set_state(array( '_errors' => array ( ), '_nested' => array ( 'transaction' => Braintree\Error\ValidationErrorCollection::set_state(array( '_errors' => array ( 0 => Braintree\Error\Validation::set_state(array( '_attribute' => 'base', '_code' => '91506', '_message' => 'Cannot refund a transaction unless it is settled.', )), ), '_nested' => array ( ), '_collection' => array ( ), )), ), '_collection' => array ( ), )), )), 'params' => array ( 'transaction' => array ( 'amount' => '230.11', ), 'merchantId' => 'XXXXXXXXXX', 'id' => 'bh7598p1', ), 'message' => 'Cannot refund a transaction unless it is settled.', 'creditCardVerification' => NULL, 'transaction' => NULL, 'subscription' => NULL, 'merchantAccount' => NULL, ), ), ) {"is_exception":false} []
magento-engcom-team commented 6 years ago

Hi @devgoku. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me {$VERSION} instance

where {$VERSION} is version tags (starting from 2.2.0+) or develop branches (2.2-develop +). For more details, please, review the Magento Contributor Assistant documentation.

@devgoku do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

engcom-backlog-nickolas commented 6 years ago

Hello @devgoku, thank you for your report. We've acknowledged the issue and added to our backlog.

devgoku commented 6 years ago

@engcom-backlog-nickolas, So there will be release on v2.1.4? Or I need to upgrade Magento version

engcom-backlog-nickolas commented 6 years ago

@devgoku, there definitely won't be fix for 2.1.4, as it already has been released. The best solution is to upgrade you magento instance to released 2.2.x. Which is 2.2.5 currently.

magento-engcom-team commented 6 years ago

@devgoku We are closing this issue now, as we are winding down 2.1-develop in this repository. Please consider upgrading to the newer version where issue is fixed.

poojapawar12 commented 1 year ago

@magento-engcom-team I am using magento2.4.6 and getting same error 1) Create Order using any ship method 2) Paid amount using braintree sandbox credit card 3) in admin section while creating Credit-memo online refund 4) getting error : image image