本文整理汇总了PHP中Mage_Payment_Model_Method_Abstract::acceptPayment方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Payment_Model_Method_Abstract::acceptPayment方法的具体用法?PHP Mage_Payment_Model_Method_Abstract::acceptPayment怎么用?PHP Mage_Payment_Model_Method_Abstract::acceptPayment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Payment_Model_Method_Abstract
的用法示例。
在下文中一共展示了Mage_Payment_Model_Method_Abstract::acceptPayment方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: acceptPayment
/**
* Attempt to accept a pending payment
*
* @param Mage_Sales_Model_Order_Payment $payment
* @return bool
*/
public function acceptPayment(Mage_Payment_Model_Info $payment)
{
parent::acceptPayment($payment);
return $this->_pro->reviewPayment($payment, Mage_Paypal_Model_Pro::PAYMENT_REVIEW_ACCEPT);
}
示例2: acceptPayment
/**
* Accepts an order in review by placing it back into the Pending state where it can
* then be processed manually. No action is taken on the actual PinPayments charge. The Magento admin is
* responsible for reprocessing the transaction.
*
* @param Mage_Payment_Model_Info $payment
* @return bool
*/
public function acceptPayment(Mage_Payment_Model_Info $payment)
{
parent::acceptPayment($payment);
$message = Mage::helper('pinpay')->__('Order returned to Pending status.
Please reprocess this transaction manually through the PIN Payments portal before progressing this order.');
$payment->getOrder()->setState(Mage_Sales_Model_Order::STATE_NEW, true, $message, false);
$payment->setPreparedMessage($message);
Mage::getSingleton('adminhtml/session')->addWarning($message);
return false;
}
示例3: acceptPayment
/**
*
* @param Mage_Payment_Model_Info $payment
* @return bool
*/
public function acceptPayment(Mage_Payment_Model_Info $payment)
{
parent::acceptPayment($payment);
$sessionId = $payment->getLastTransId();
if (empty($sessionId)) {
return false;
}
if (!$this->orderStatusUpdateRequest(self::ORDER_V2_COMPLETED, $sessionId)) {
return false;
}
return true;
}
示例4: acceptPayment
public function acceptPayment(Mage_Payment_Model_Info $payment)
{
parent::acceptPayment($payment);
$transactionId = $payment->getLastTransId();
$amount = $payment->getAmountAuthorized();
$transactionId = $payment->getLastTransId();
$gatewayParams = array('operation' => self::OPERATION_MAINTENANCE_ACCEPT_CHALLENGE, 'amount' => $amount);
$this->_debug($gatewayParams);
/* @var $request Allopass_Hipay_Model_Api_Request */
$request = Mage::getModel('hipay/api_request', array($this));
$uri = Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_MAINTENANCE . $transactionId;
$gatewayResponse = $request->gatewayRequest($uri, $gatewayParams, $payment->getOrder()->getStoreId());
$this->_debug($gatewayResponse->debug());
$receiver = Mage::getModel('customer/customer')->load($payment->getOrder()->getCustomerId());
$message = Mage::helper('hipay')->__('Your transaction has been approved.');
$email_key = "fraud_payment_accept";
if ($this->canSendFraudEmail($payment->getOrder()->getStoreId())) {
$this->getHelper()->sendFraudPaymentEmail($receiver, $payment->getOrder(), $message, $email_key);
}
$payment->setPreparedMessage(Mage::helper('hipay')->__('Transaction is in pending notification.'));
// Return false because payment is accepted by notification
return false;
}