If the payment method is bank transfer, I need to show a custom message on success page of Magento 2.
I'm going to say
"don't forget: we will ship to you after your payment received to our bank account; here are our bank details; and you have 2 days left to make your payment"
etc..
I found the solution as like below (with editing success.phtml), but you know, I don't want to edit core files.
<?php if ($this->getOrderId()):?>
<div class="bank_detail">
<?php $orderId = $this->getOrderId(); ?>
<?php $order = Mage::getModel("sales/order")->loadByIncrementId($orderId); //load order by increment id?>
<?php $paymentCode = $order->getPayment()->getMethod(); ?>
<?php if ($paymentCode=='banktransfer') {
echo "whatever you want!";
} //you can also check for other payment method?>
Could someone help me to do this with the module?