本文整理汇总了PHP中Mage_Payment_Block_Info类的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Payment_Block_Info类的具体用法?PHP Mage_Payment_Block_Info怎么用?PHP Mage_Payment_Block_Info使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage_Payment_Block_Info类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _prepareSpecificInformation
protected function _prepareSpecificInformation($transport = null)
{
if (null !== $this->_paymentSpecificInformation) {
return $this->_paymentSpecificInformation;
}
$transport = Mage_Payment_Block_Info::_prepareSpecificInformation($transport);
$data = array();
Mage::dispatchEvent('tokenbase_before_load_payment_info', array('method' => $this->getInfo()->getMethod(), 'customer' => Mage::helper('tokenbase')->getCurrentCustomer(), 'transport' => $transport, 'info' => $this->getInfo()));
$ccType = $this->getCcTypeName();
if (!empty($ccType) && $ccType != 'N/A') {
$data[Mage::helper('payment')->__('Credit Card Type')] = $ccType;
}
// If this is an eCheck, show different info.
if ($this->getInfo()->getCcLast4()) {
if ($this->getInfo()->getAdditionalInformation('method') == 'ECHECK') {
$data[Mage::helper('payment')->__('Paid By')] = Mage::helper('payment')->__('eCheck');
$data[Mage::helper('payment')->__('Account Number')] = sprintf('x-%s', $this->getInfo()->getCcLast4());
} else {
$data[Mage::helper('payment')->__('Credit Card Number')] = sprintf('XXXX-%s', $this->getInfo()->getCcLast4());
}
}
// If this is admin, show different info.
if (Mage::app()->getStore()->isAdmin()) {
$data[Mage::helper('payment')->__('Transaction ID')] = $this->getInfo()->getAdditionalInformation('transaction_id');
}
$transport->setData(array_merge($data, $transport->getData()));
Mage::dispatchEvent('tokenbase_after_load_payment_info', array('method' => $this->getInfo()->getMethod(), 'customer' => Mage::helper('tokenbase')->getCurrentCustomer(), 'transport' => $transport, 'info' => $this->getInfo()));
return $transport;
}
示例2: _prepareSpecificInformation
/**
* Prepare credit card related payment info
*
* @param Varien_Object|array $transport
* @return Varien_Object
*/
protected function _prepareSpecificInformation($transport = null)
{
if (null !== $this->_paymentSpecificInformation) {
return $this->_paymentSpecificInformation;
}
$transport = Mage_Payment_Block_Info::_prepareSpecificInformation($transport);
$data = array();
if ($paymentProfile = $this->_getCcDetails()) {
if ($ccType = $this->getCcTypeName()) {
if ($ccType == "N/A") {
$ccType = 'Stored';
}
$data[$this->__('Credit Card Type')] = $ccType;
}
if ($ccNumber = $paymentProfile->ccAccountNum) {
$data[$this->__('Credit Card Number')] = sprintf('xxxx-%s', substr($ccNumber, -4));
}
return $transport->setData(array_merge($data, $transport->getData()));
} else {
if ($ccType = $this->getCcTypeName()) {
$data[$this->__('Credit Card Type')] = $ccType;
}
if ($ccNumber = $this->getInfo()->getCcLast4()) {
$data[$this->__('Credit Card Number')] = sprintf('xxxx-%s', $ccNumber);
}
return $transport->setData(array_merge($data, $transport->getData()));
}
}
示例3: _prepareSpecificInformation
/**
* Prepare credit card related payment info
*
* @param Varien_Object|array $transport
* @return Varien_Object
*/
protected function _prepareSpecificInformation($transport = null)
{
if (null !== $this->_paymentSpecificInformation) {
return $this->_paymentSpecificInformation;
}
$transport = parent::_prepareSpecificInformation($transport);
$data = array();
if ($ccType = $this->getCcTypeName()) {
$data[Mage::helper('payment')->__('Credit Card Type')] = $ccType;
}
if ($this->getInfo()->getCcLast4()) {
$data[Mage::helper('payment')->__('Credit Card Number')] = sprintf('xxxx-%s', $this->getInfo()->getCcLast4());
}
if (!$this->getIsSecureMode()) {
if ($ccSsIssue = $this->getInfo()->getCcSsIssue()) {
$data[Mage::helper('payment')->__('Switch/Solo/Maestro Issue Number')] = $ccSsIssue;
}
$year = $this->getInfo()->getCcSsStartYear();
$month = $this->getInfo()->getCcSsStartMonth();
if ($year && $month) {
$data[Mage::helper('payment')->__('Switch/Solo/Maestro Start Date')] = $this->_formatCardDate($year, $month);
}
}
return $transport->setData(array_merge($data, $transport->getData()));
}
示例4: _toHtml
public function _toHtml()
{
if ($this->getMethod()->getCode() == 'sofortvorkasse') {
$this->setTemplate('pnsofortueberweisung/info/sofortvorkasse.phtml');
}
return parent::_toHtml();
}
示例5: _prepareSpecificInformation
/**
* Add custom information to payment method information
*
* @param Varien_Object|array $transport
*/
protected function _prepareSpecificInformation($transport = null)
{
$transport = parent::_prepareSpecificInformation($transport);
$data = $this->getInfo()->getAdditionalInformation();
$data['imgUrl'] = Mage::helper('paymill')->getImagePath() . "icon_paymill.png";
return $transport->setData(array_merge($data, $transport->getData()));
}
示例6: _prepareSpecificInformation
/**
* Prepare po and credit card related payment info
*
* @param Varien_Object|array $transport
* @return Varien_Object
*/
protected function _prepareSpecificInformation($transport = null)
{
if (null !== $this->_paymentSpecificInformation) {
return $this->_paymentSpecificInformation;
}
$transport = new Varien_Object();
$transport = parent::_prepareSpecificInformation($transport);
$transport->addData(array(Mage::helper('payment')->__('Purchase Order Number') => $this->getInfo()->getPoNumber(), Mage::helper('payment')->__('Purchase Order Amount') => '$' . number_format($this->getInfo()->getPoAmount(), 2)));
$data = array();
$orderTotal = Mage::getSingleton('checkout/cart')->getQuote()->collectTotals()->getGrandTotal();
if ($this->getInfo()->getPoAmount() < $orderTotal) {
if ($ccType = $this->getCcTypeName()) {
$data[Mage::helper('payment')->__('Credit Card Type')] = $ccType;
}
if ($this->getInfo()->getCcLast4()) {
$data[Mage::helper('payment')->__('Credit Card Number')] = sprintf('xxxx-%s', $this->getInfo()->getCcLast4());
}
if (!$this->getIsSecureMode()) {
if ($ccSsIssue = $this->getInfo()->getCcSsIssue()) {
$data[Mage::helper('payment')->__('Switch/Solo/Maestro Issue Number')] = $ccSsIssue;
}
$year = $this->getInfo()->getCcSsStartYear();
$month = $this->getInfo()->getCcSsStartMonth();
if ($year && $month) {
$data[Mage::helper('payment')->__('Switch/Solo/Maestro Start Date')] = $this->_formatCardDate($year, $month);
}
}
$data[Mage::helper('payment')->__('Credit Card Amount')] = '$' . number_format($orderTotal - $this->getInfo()->getPoAmount(), 2);
}
$transport->setData(array_merge($transport->getData(), $data));
return $transport;
}
示例7: _toHtml
/**
* (non-PHPdoc)
* @see app/code/core/Mage/Core/Block/Mage_Core_Block_Template#_toHtml()
*/
protected function _toHtml()
{
if ($this->getForm()->getMethodCode() != self::PAYMENT_METHOD_CODE) {
return;
}
return parent::_toHtml();
}
示例8: _prepareSpecificInformation
/**
* Prepare credit card related payment info
*
* @param Varien_Object|array $transport
* @return Varien_Object
*/
protected function _prepareSpecificInformation($transport = null)
{
if (null !== $this->_paymentSpecificInformation) {
return $this->_paymentSpecificInformation;
}
$transport = parent::_prepareSpecificInformation($transport);
$data = array();
$details = @unserialize($this->getInfo()->getAdditionalData());
if (!isset($details['pbridge_data']['x_params'])) {
return $transport;
}
$xParams = @unserialize($details['pbridge_data']['x_params']);
if (isset($xParams['dd_bankaccountholder']) && !empty($xParams['dd_bankaccountholder'])) {
$data[Mage::helper('enterprise_pbridge')->__('Account holder')] = $xParams['dd_bankaccountholder'];
}
if (isset($xParams['dd_bankaccount'])) {
$data[Mage::helper('enterprise_pbridge')->__('Account number')] = sprintf('xxxx-%s', $xParams['dd_bankaccount']);
}
if (isset($xParams['dd_bankcode']) && !empty($xParams['dd_bankcode'])) {
$data[Mage::helper('enterprise_pbridge')->__('Bank code')] = $xParams['dd_bankcode'];
}
if (!empty($data)) {
return $transport->setData(array_merge($data, $transport->getData()));
} else {
return $transport;
}
}
示例9: _prepareSpecificInformation
/**
* Prepare credit card related payment info
*
* @param Varien_Object|array $transport
* @return Varien_Object
*/
protected function _prepareSpecificInformation($transport = null)
{
if (null !== $this->_paymentSpecificInformation) {
return $this->_paymentSpecificInformation;
}
$transport = parent::_prepareSpecificInformation($transport);
$data = array();
if ($this->getInfo()->getGwapBoletoType()) {
$data[Mage::helper('payment')->__('Banco')] = $this->getInfo()->getGwapBoletoType();
}
if ($this->getInfo()->getOrder() && $this->getInfo()->getOrder()->hasData()) {
$order = $this->getInfo()->getOrder();
$orderId = $order->getId();
$customerId = $order->getCustomerId();
if ($this->getInfo()->getOrder()->getId()) {
$gwapItem = Mage::getModel('gwap/order')->load($this->getInfo()->getOrder()->getId(), 'order_id');
if ($gwapItem->getStatus() == Allpago_Gwap_Model_Order::STATUS_CAPTUREPAYMENT || $gwapItem->getStatus() == Allpago_Gwap_Model_Order::STATUS_CREATED) {
$store = Mage::getModel('core/store')->load($order->getStoreId());
/* @var $store Mage_Core_Model_Store */
$boletoUrl = $store->getUrl('allpago_gwap/imprimir/boleto', array('id' => $orderId, 'ci' => $customerId));
$transport->addData(array(Mage::helper('payment')->__('Reimprimir Boleto') => "<a href=\"{$boletoUrl}\" target=\"_blank\">Clique aqui para abrir o boleto</a>"));
}
}
}
return $transport->setData(array_merge($data, $transport->getData()));
}
示例10: _prepareSpecificInformation
protected function _prepareSpecificInformation($transport = null)
{
if (null !== $this->_paymentSpecificInformation) {
return $this->_paymentSpecificInformation;
}
$transport = parent::_prepareSpecificInformation($transport);
$data = array();
if ($this->getInfo()->getFastcashDepostitoType()) {
$data[Mage::helper('payment')->__('Banco')] = $this->getInfo()->getFastcashDepostitoType();
}
// if( $this->getInfo()->getOrder() && $this->getInfo()->getOrder()->hasData() ){
// $order = $this->getInfo()->getOrder();
// $orderId = $order->getId();
// $customerId = $order->getCustomerId();
// if ($this->getInfo()->getOrder()->getId()) {
// $fastcashItem = Mage::getModel('fastcash/order')->load($this->getInfo()->getOrder()->getId(), 'order_id');
// if( $fastcashItem->getStatus() == Miziagui_Fastcash_Model_Order::STATUS_CAPTUREPAYMENT || $fastcashItem->getStatus() == Miziagui_Fastcash_Model_Order::STATUS_CREATED ){
// $store = Mage::getModel('core/store')->load($order->getStoreId());
// /* @var $store Mage_Core_Model_Store */
// $depositoUrl = $store->getUrl('fastcash/imprimir/deposito', array('id'=>$orderId, 'ci'=>$customerId));
// $transport->addData(array(
// Mage::helper('payment')->__('Reimprimir Deposito') => "<a href=\"{$depositoUrl}\" target=\"_blank\">Clique aqui para abrir o deposito</a>")
// );
//
// }
// }
// }
return $transport->setData(array_merge($data, $transport->getData()));
}
示例11: _construct
protected function _construct()
{
parent::_construct();
/*
$this->setTemplate('webpos/admin/webpos/payment/method/info/cash.phtml');
*/
}
示例12: _construct
protected function _construct()
{
parent::_construct();
$this->setInfoMessage(Mage::helper('vtmandiri/data')->_getInfoTypeIsImage() == true ? '<img src="' . $this->getSkinUrl('images/Veritrans.png') . '"/>' : '<b>' . Mage::helper('vtmandiri/data')->_getTitle() . '</b>');
$this->setPaymentMethodTitle(Mage::helper('vtmandiri/data')->_getTitle());
$this->setTemplate('vtmandiri/info.phtml');
}
示例13: _prepareSpecificInformation
protected function _prepareSpecificInformation($transport = null)
{
$transport = parent::_prepareSpecificInformation($transport);
$data = array();
$info = $this->getInfo();
$data[Mage::helper("payment")->__("Payment Type")] = "Secure Token";
return $transport->setData(array_merge($data, $transport->getData()));
}
示例14: _construct
protected function _construct()
{
parent::_construct();
$this->setTemplate('payex/partpayment/info.phtml');
// Template for Checkout page
if ($this->getRequest()->getRequestedActionName() === 'progress') {
$this->setTemplate('payex/partpayment/title.phtml');
}
}
示例15: _prepareSpecificInformation
protected function _prepareSpecificInformation($transport = null)
{
$oDataObj = parent::_prepareSpecificInformation();
$aData = $this->getIsSecureMode() === FALSE ? $this->getMethod()->cms_dibs_getAdminOrderInfo() : $this->getMethod()->cms_dibs_getOrderInfo();
foreach ($aData as $sKey => $sVal) {
$oDataObj->setData($sKey, $sVal);
}
return $oDataObj;
}