Skip to main content
4 votes
Accepted

How to send Transaction email from controller in Magento 2

it's working for me $emailTemplateVariables = array(); $emailTempVariables['myvar'] = $myvar; $senderName = 'test'; $senderEmail = '[email protected]'; $...
Rv Singh's user avatar
  • 1,637
3 votes

Magento 2 programmatically online refund

Try the service layer. This interface was added in 2.1.3 for exactly this purpose: \Magento\Sales\Api\RefundInvoiceInterface // Inject \Magento\Sales\Api\RefundInvoiceInterface $invoiceRefunder $...
Ryan Hoerr's user avatar
  • 12.3k
2 votes

Get list of transactions for order

Inside your class needing the transaction list inject the following (and assign them to appropriate class properties): Magento\Sales\Model\Order\Payment\Transaction\Repository, \Magento\Framework\Api\...
adjco's user avatar
  • 300
2 votes

Magento2: Asymmetric transaction rollback

To resolve this follow following steps: Reset and reindex indexes php bin/magento indexer:reset php bin/magento indexer:reindex Remove cache and delete/rename /var and /generated (in case of ...
Vivek Kumar's user avatar
  • 5,740
2 votes

How to create actions column use layout block magento2

This can help you for adding new action in to the grid which is created through the Grid.php file. $this->addColumn( 'action', [ 'header' => __('Action'), '...
sabarivenkatesankrish's user avatar
1 vote

Save multiple repository with rollback(if any error)

The code below uses the transaction mechanism. And you're right thinking it looks after the rollback as well. I found it being used in \Magento\SalesSampleData\Model\Order\Processor::shipOrder. ...
Herve Tribouilloy's user avatar
1 vote

How to get all transaction_email ,transaction status from sql query Magento 2

I believe, by transaction_email you meant customer email and by transaction status you meant a way to identify whether order was placed successfully or not. Customer email is present in sales_order ...
amitshree's user avatar
  • 7,076
1 vote

rest api invoice capture does not save entry to transaction log

It looks like the problem is with my assumption that the REST API endpoint would automatically handle any notes or comments. It seems I need to add a hook into my script that will create that note for ...
hanmari's user avatar
  • 121
1 vote
Accepted

Saving OrderID received from Payment Gateway

At first, I will explain why solution from @Keyur Shah not so good. \Magento\Sales\Api\Data\OrderInterface doesn't have setData method, this method relates to \Magento\Sales\Model\Order class. So ...
joni jones's user avatar
  • 2,559
1 vote

Saving OrderID received from Payment Gateway

By default, Magento creates an external attribute to save external order id(Just to save data from external payment provider), which is ext_order_id so you can save this value in this attribute. ...
Keyur Shah's user avatar
  • 18.1k

Only top scored, non community-wiki answers of a minimum length are eligible