- $reference = $this->_banktransfer->createOrder($orderId, $amount, $currency, $description, $customer);
-
- if ($reference) {
- if ($order->getPayment()->getMethodInstance() instanceof ING_PSP_Model_Banktransfer &&
- $paymentBlock = $order->getPayment()->getMethodInstance()->getMailingAddress($order->getStoreId())
- ) {
- $details = array();
- $grandTotal = $order->getGrandTotal();
- $currency = Mage::app()->getLocale()->currency($order->getOrderCurrencyCode())->getSymbol();
- $amountStr = $currency.' '.number_format(round($grandTotal, 2), 2, '.', '');
-
- $paymentBlock = str_replace('%AMOUNT%', $amountStr, $paymentBlock);
- $paymentBlock = str_replace('%REFERENCE%', $reference, $paymentBlock);
- $paymentBlock = str_replace('\n', PHP_EOL, $paymentBlock);
-
- $details['mailing_address'] = $paymentBlock;