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

Add sending invoice email after capture #8

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Helper/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public function __construct(
* @param string $transactionId
* @param float $amount
* @param array $transData
*
* @return \Magento\Sales\Api\Data\OrderPaymentInterface
*/
public function proceedAuthorize($order, $transactionId, $amount, $transData = [])
{
Expand All @@ -80,13 +82,17 @@ public function proceedAuthorize($order, $transactionId, $amount, $transData = [
$transData
);
}

return $payment;
}

/**
* @param \Magento\Sales\Api\Data\OrderInterface $order
* @param string $transactionId
* @param float $amount
* @param array $transData
*
* @return \Magento\Sales\Api\Data\OrderPaymentInterface
*/
public function proceedCapture($order, $transactionId, $amount, $transData = [])
{
Expand All @@ -108,13 +114,17 @@ public function proceedCapture($order, $transactionId, $amount, $transData = [])
$transData
);
}

return $payment;
}

/**
* @param \Magento\Sales\Api\Data\OrderInterface $order
* @param string $transactionId
* @param string $parentTransactionId
* @param float $amount
*
* @return \Magento\Sales\Api\Data\OrderPaymentInterface
*/
public function proceedRefund($order, $transactionId, $parentTransactionId, $amount)
{
Expand All @@ -128,13 +138,17 @@ public function proceedRefund($order, $transactionId, $parentTransactionId, $amo
$payment->registerRefundNotification($amount);

$this->orderRepository->save($order);

return $payment;
}

/**
* @param \Magento\Sales\Api\Data\OrderInterface $order
* @param string $transactionId
* @param string $parentTransactionId
* @param float $amount
*
* @return \Magento\Sales\Api\Data\OrderPaymentInterface
*/
public function proceedVoid($order, $transactionId, $parentTransactionId, $amount)
{
Expand All @@ -144,13 +158,17 @@ public function proceedVoid($order, $transactionId, $parentTransactionId, $amoun
$payment->registerVoidNotification($amount);

$this->orderRepository->save($order);

return $payment;
}

/**
* @param \Magento\Sales\Api\Data\OrderInterface $order
* @param string $transactionId
* @param string $parentTransactionId
* @param mixed $transData
*
* @return \Magento\Sales\Api\Data\OrderPaymentInterface
*/
public function proceedReceipt($order, $transactionId, $parentTransactionId, $transData)
{
Expand Down Expand Up @@ -189,13 +207,17 @@ public function proceedReceipt($order, $transactionId, $parentTransactionId, $tr
);

$this->orderRepository->save($order);

return $payment;
}

/**
* @param \Magento\Sales\Api\Data\OrderInterface $order
* @param string $transactionId
* @param string $parentTransactionId
* @param mixed $transData
*
* @return \Magento\Sales\Api\Data\OrderPaymentInterface
*/
public function proceedRefundReceipt($order, $transactionId, $parentTransactionId, $transData)
{
Expand Down Expand Up @@ -234,6 +256,8 @@ public function proceedRefundReceipt($order, $transactionId, $parentTransactionI
);

$this->orderRepository->save($order);

return $payment;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion view/adminhtml/templates/form/form.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ $instructions = $block->getInstructions();
?>" style="display: none;">
<?php // @noEscape
echo nl2br($block->escapeHtml($instructions))
?>
?>
</div>
<?php endif;
2 changes: 1 addition & 1 deletion view/frontend/templates/form/form.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ $instructions = $block->getInstructions();
?>" style="display: none;">
<?php // @noEscape
echo nl2br($block->escapeHtml($instructions))
?>
?>
</div>
<?php endif;
Loading