Closed Dannez83 closed 3 years ago
Hi @Dannez83. 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 give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento give me 2.4-develop instance
Hi @Dannez83. Thank you for your request. I'm working on Magento instance for you.
Hi @Dannez83, here is your Magento Instance: https://867d47e268d04f63a0aacd52ed9f3943-2-4-develop.instances.magento-community.engineering Admin access: https://867d47e268d04f63a0aacd52ed9f3943-2-4-develop.instances.magento-community.engineering/admin_2722 Login: 22fad94e Password: 76109a82fc5b
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!
+1
+1
To get this fixed after refund on payment method you need to set the following payment fields with the generated refund transaction ID ($refund->getId() is just an example)
$payment->setLastTransId($refund->getId());
$payment->setTransactionId($refund->getId());
Check in here vendor/magento/module-sales/Model/Order/Payment.php
When a refund is made with a $creditmemo
, lines 699-701
$gateway->refund($this, $baseAmountToRefund);
$creditmemo->setTransactionId($this->getLastTransId());
Some lines below it will call addTransaction
function that will use from payment the transaction_id
// update transactions and order state
$transaction = $this->addTransaction(
Transaction::TYPE_REFUND,
$creditmemo,
$isOnline
);
Description (*)
Braintree refunds display the original/parent transaction id with "-refund" appended. This is not helpful from an accounts reconciliation point of view or from a customer service point of view when communicating the transaction id of the refund to the customer. The actual refund transaction id would be much more suitable. The parent transaction ID is already set in a separate field in the table. Duplicating the transaction ID into another field and adding "-refund" onto the end provides no benefit and actually fails to provide accurate information
Expected behavior (*)
The refund transaction ID should match the refund transaction id in Braintree.
Benefits
The refund transaction id will match the refund transaction id in Braintree. The customer is given more accurate information. The store owner is able to reconcile payments more easily
Additional information
None necessary. This seems pretty self explanatory to me. Real transaction id better than made up transaction id.