本文整理汇总了PHP中Mage_Payment_Model_Method_Abstract::cancel方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Payment_Model_Method_Abstract::cancel方法的具体用法?PHP Mage_Payment_Model_Method_Abstract::cancel怎么用?PHP Mage_Payment_Model_Method_Abstract::cancel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Payment_Model_Method_Abstract
的用法示例。
在下文中一共展示了Mage_Payment_Model_Method_Abstract::cancel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cancel
public function cancel(Varien_Object $payment)
{
parent::cancel($payment);
Mage::helper('assist')->debug('cancel');
return $this;
}
示例2: cancel
/**
* Cancel payment
*
* @param Varien_Object $invoicePayment
* @return Mage_Payment_Model_Abstract
*/
public function cancel(Varien_Object $payment)
{
parent::cancel($payment);
return $this;
}
示例3: cancel
/**
* @desc Cancel order
* @param Varien_Object $payment
* @param type $amount
* @return Adyen_Payment_Model_Adyen_Abstract
*/
public function cancel(Varien_Object $payment, $amount = null)
{
parent::cancel($payment);
$this->writeLog("abstract -> cancel()" . get_class($this));
return $this;
}
示例4: cancel
/**
* Custom cancel behavior, deny cancel and force custom to use void instead
*
* @param Varien_Object $payment
* @return void
* @throws Mage_Core_Exception
*/
public function cancel(Varien_Object $payment)
{
/*
* Important: If an order was voided successfully and the user clicks on cancel in order-view
* this method is not triggered anymore
*/
//Proceed parent cancel method in case that regirstry value ops_auto_void is set
if (true === Mage::registry('ops_auto_void')) {
Mage::unregister('ops_auto_void');
return parent::cancel($payment);
}
//If order has state 'pending_payment' and the payment has Barclaycard-status 0 or null (unknown) then cancel the order
if (true === $this->canCancelManually($payment->getOrder())) {
$payment->getOrder()->addStatusHistoryComment($this->getHelper()->__("The order was cancelled manually. The Barclaycard-state is 0 or null."));
return parent::cancel($payment);
}
//Abort cancel method by throwing a Mage_Core_Exception
throw new Mage_Core_Exception($this->getHelper()->__('Please use void to cancel the operation.'));
}
示例5: cancel
public function cancel(Varien_Object $payment)
{
if (true === Mage::registry('postfinance_auto_void')) {
Mage::unregister('postfinance_auto_void');
return parent::cancel($payment);
}
throw new Mage_Core_Exception($this->getHelper()->__('Please use void to cancel the operation.'));
}