本文整理匯總了PHP中type::getStatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP type::getStatus方法的具體用法?PHP type::getStatus怎麽用?PHP type::getStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類type
的用法示例。
在下文中一共展示了type::getStatus方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: affiliateplus_cancel_transaction_multipleprogram
/**
* Changed By Adam 06/10/2014
* Fix bug: cancel order => cancel transactiion, commission and discount in transaction = 0 but in program_transaction, commission still stays
* @param type $observer
*/
public function affiliateplus_cancel_transaction_multipleprogram($observer)
{
$transaction = $observer->getTransaction();
$transactionStatus = $observer->getStatus();
$programTransaction = Mage::getModel('affiliateplusprogram/transaction')->load($transaction->getId(), "transaction_id");
if ($programTransaction && $programTransaction->getId()) {
$programTransaction->setCommission(0)->save();
}
}
示例2: mopt_payone__handleRedirectFeedback
/**
* handles redirect feedback
* on success redirect customer to submitted(from Pay1) redirect url
*
* @param type $response
*/
protected function mopt_payone__handleRedirectFeedback($response)
{
if ($response->getStatus() == 'ERROR') {
$this->View()->errormessage = $this->moptPayoneMain->getPaymentHelper()->moptGetErrorMessageFromErrorCodeViaSnippet(false, $response->getErrorcode());
$this->forward('error');
} else {
$session = Shopware()->Session();
$session->txId = $response->getTxid();
$session->txStatus = $response->getStatus();
$shopwareTemporaryId = $this->admin->sSYSTEM->sSESSION_ID;
//set txid
$sql = 'UPDATE `s_order`' . 'SET transactionID=? WHERE temporaryID = ?';
Shopware()->Db()->query($sql, array($response->getTxid(), $shopwareTemporaryId));
$this->redirect($response->getRedirecturl());
}
}
示例3: setRefundAuthorized
/**
* @since v0.1.0.8
* @param type $order
* @param type $success
*/
public function setRefundAuthorized($order, $success = false)
{
if ($success && !empty($order)) {
$status = $this->_getConfigData('refund_authorized');
$status = !empty($status) ? $status : $order->getStatus();
$order->addStatusHistoryComment(Mage::helper('adyen')->__('Adyen Refund Successfully completed'), $status);
$order->sendOrderUpdateEmail((bool) $this->_getConfigData('send_update_mail'));
$order->save();
return true;
}
return false;
}
示例4: buildParamDetails
/**
*
*
* @param type $response
* @return type
*/
protected function buildParamDetails($request, $response)
{
$details = array_merge($request->toArray(), array('response_state' => $response->getStatus()));
ksort($details);
return $details;
}
示例5: cancelTransaction
/**
*
* @param type $observer
* @return type
*/
public function cancelTransaction($observer)
{
/* hainh edit 25-04-2014 */
if (!Mage::helper('affiliatepluslevel')->isPluginEnabled()) {
return;
}
$transaction = $observer->getTransaction();
$transactionStatus = $observer->getStatus();
$commission = $observer->getCommission();
$tierTransactions = $this->_getTierTransactions($transaction);
try {
$account = Mage::getModel('affiliateplus/account')->setStoreId($transaction->getStoreId());
foreach ($tierTransactions as $tierTransaction) {
if ($transactionStatus == 1) {
$account->load($tierTransaction->getTierId());
if ($tierTransaction->getLevel() == 0) {
$balanceAdded = $transaction->getCommission() + $transaction->getCommissionPlus() + $transaction->getCommission() * $transaction->getPercentPlus() / 100;
$balance = $account->getData('balance') + $balanceAdded - $tierTransaction->getCommission() - $tierTransaction->getCommissionPlus();
// $balance = $account->getBalance() + $balanceAdded - $tierTransaction->getCommission() - $tierTransaction->getCommissionPlus();
} else {
$balance = $account->getData('balance') - $tierTransaction->getCommission() - $tierTransaction->getCommissionPlus();
// $balance = $account->getBalance() - $tierTransaction->getCommission() - $tierTransaction->getCommissionPlus();
}
$account->setBalance($balance)->save();
}
$tierTransaction->setCommission(0)->setCommissionPlus(0)->save();
//send mail Complete to account
if ($tierTransaction->getLevel() > 0) {
$tierTransaction->sendMailUpdatedTransactionToAccount($transaction, false);
}
}
} catch (Exception $e) {
}
}