Sergey
Sergey

Reputation: 258

magento payment method

I have created magento payment method, but after creating order with this method in admin area block Payment Information shows only Order was placed using USD

Other payment methods automatically attache title here (like standart saved cc / check money order / etc.)

Can anyone tell what I must to do to fix this?

Upvotes: 1

Views: 4031

Answers (1)

Vinai
Vinai

Reputation: 14182

By default payment information is displayed in the adminhtml order view using the template app/design/adminhtml/default/default/template/payment/info/default.phtml (sometimes payment info blocks set a different one).
In that template the payment method title is output using

<?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?>

The method Mage_Payment_Block_Info::getMethod() simply returns an instance of the payment method.

The method getTitle() already is implemented in Mage_Payment_Model_Method_Abstract.

public function getTitle()
{
    return $this->getConfigData('title');
}

This means you only need to set the title in the configuration of your payment method at payment/$methodCode/title and you are set.

Upvotes: 1

Related Questions