当前位置: 首页>>代码示例>>PHP>>正文


PHP EnmasseHelper::getOrderStatusByOrderId方法代码示例

本文整理汇总了PHP中EnmasseHelper::getOrderStatusByOrderId方法的典型用法代码示例。如果您正苦于以下问题:PHP EnmasseHelper::getOrderStatusByOrderId方法的具体用法?PHP EnmasseHelper::getOrderStatusByOrderId怎么用?PHP EnmasseHelper::getOrderStatusByOrderId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EnmasseHelper的用法示例。


在下文中一共展示了EnmasseHelper::getOrderStatusByOrderId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 function display($tpl = null)
 {
     $orderId = JRequest::getVar('orderid', null);
     $buyerId = JRequest::getVar('buyerid', null);
     //Get Id of current user
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $pointPaid = EnmasseHelper::getPointPaidByOrderId($orderId);
     $totalPrice = EnmasseHelper::getTotalPriceByOrderId($orderId);
     $orderStatus = EnmasseHelper::getOrderStatusByOrderId($orderId);
     //If current user is owner of the order and the order was paid with point
     if ($buyerId == $userId && $pointPaid > 0 && $orderStatus == 'Refunded') {
         $dealName = EnmasseHelper::getDealNameByOrderId($orderId);
         $this->assignRef('dealName', $dealName);
         $this->assignRef('orderId', $orderId);
         $this->assignRef('totalPrice', $totalPrice);
         $this->assignRef('pointPaid', $pointPaid);
         $this->assignRef('buyerId', $buyerId);
         $this->_setPath('template', JPATH_SITE . DS . "components" . DS . "com_enmasse" . DS . "theme" . DS . EnmasseHelper::getThemeFromSetting() . DS . "tmpl" . DS);
         $this->_layout = "point_refund";
         parent::display($tpl);
     } else {
         $link = JRoute::_("index.php?option=com_enmasse&view=deallisting", false);
         JFactory::getApplication()->redirect($link);
     }
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:26,代码来源:view.html.php

示例2: doRefund

 function doRefund()
 {
     $post = JRequest::get('post');
     $orderId = $post['orderid'];
     $pointRefund = $post['point'];
     $buyerId = $post['buyerid'];
     //Get Id of current user
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $pointPaid = EnmasseHelper::getPointPaidByOrderId($orderId);
     $totalPrice = EnmasseHelper::getTotalPriceByOrderId($orderId);
     $orderStatus = EnmasseHelper::getOrderStatusByOrderId($orderId);
     $refundedAmount = EnmasseHelper::getRefundedAmountByOrderId($orderId);
     //Check the last time to be sure we do for right buyer and do on a right order
     $pass = true;
     if ($pointRefund == '') {
         $msg = JText::_('INVALID_POINT');
         $pass = false;
     }
     if ($pointPaid < 0) {
         $msg = JText::_('NOT_PAID_WITH_POINT');
         $pass = false;
     }
     if ($pointRefund > $totalPrice) {
         $msg = JText::_('POINT_NOT_GREATE_TOTAL_PRICE');
         $pass = false;
     }
     if ($buyerId != $userId) {
         $msg = JText::_('NOT_OWNER');
         $pass = false;
     }
     if ($refundedAmount != 0) {
         $msg = JText::_('ALREADY_REQUESTED');
         $pass = false;
     }
     if ($pass) {
         if (JModel::getInstance('point', 'enmasseModel')->doRefund($userId, $orderId, $pointRefund)) {
             $msg = JText::_('REFUND_SUCCESSFULLY');
         } else {
             $msg = JText::_('REFUND_FAILED');
         }
         $link = JRoute::_("index.php?option=com_enmasse&controller=point&task=refundForm&orderid=" . $orderId . "&buyerid=" . $buyerid, false);
         JFactory::getApplication()->redirect($link, $msg);
     } else {
         $link = JRoute::_("index.php?option=com_enmasse&controller=point&task=refundForm&orderid=" . $orderId . "&buyerid=" . $buyerid, false);
         JFactory::getApplication()->redirect($link, $msg);
     }
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:48,代码来源:point.php

示例3: notifyUrl


//.........这里部分代码省略.........
                 if ($_GET['flag'] == "cancelUrl") {
                     $msg = JText::_("Your payment was cancelled.");
                 }
             }
             $link = JRoute::_("index.php?option=com_enmasse&controller=deal", false);
             JFactory::getApplication()->redirect($link, $msg);
         } elseif ($payClass == "twocheckout") {
             $payGty = JModel::getInstance('payGty', 'enmasseModel')->getByClass($payClass);
             $attribute_config = json_decode($payGty->attribute_config);
             $accountNumber = $attribute_config->sid;
             $demo = $attribute_config->demo;
             if ($demo == "Y" && $_REQUEST["credit_card_processed"] == "Y") {
                 $orderId = $_REQUEST["cart_order_id"];
                 EnmasseHelper::doNotify($orderId);
                 JModel::getInstance('order', 'enmasseModel')->updatePayDetail($orderId, $payDetail);
                 $msg = JText::_("Thank you for purchasing!");
             } elseif (demo != "Y" && $_REQUEST["credit_card_processed"] == "Y") {
                 $secretWord = $attribute_config->secret_word;
                 $string_to_hash = $secretWord . $accountNumber . $_REQUEST["order_number"] . $_REQUEST["total"];
                 $check_key = strtoupper(md5($string_to_hash));
                 if ($check_key == $_REQUEST["key"]) {
                     $orderId = $_REQUEST["cart_order_id"];
                     EnmasseHelper::doNotify($orderId);
                     JModel::getInstance('order', 'enmasseModel')->updatePayDetail($orderId, $payDetail);
                     $msg = JText::_("Thank you for purchasing!");
                 } else {
                     $msg = JText::_("Can't verify your payment! Please contact Administrator!");
                 }
             }
             $link = JRoute::_("index.php?option=com_enmasse&controller=deal", false);
             JFactory::getApplication()->redirect($link, $msg);
         } elseif ($payClass == "authorizenet") {
             if ($_POST['approved'] == 'true') {
             }
             $orderId = $_POST['invoice_number'];
             EnmasseHelper::doNotify($orderId);
             JModel::getInstance('order', 'enmasseModel')->updatePayDetail($orderId, $payDetail);
             $msg = JText::_("Thank you for purchasing! Your transaction ID is " . $_POST['transaction_id'] . ".");
             $link = JRoute::_("index.php?option=com_enmasse&controller=deal", false);
             JFactory::getApplication()->redirect($link, $msg);
         } elseif ($payClass == "ewayhosted") {
             if ($_REQUEST['trxnstatus'] == 'true') {
             }
             $orderId = $_REQUEST['orderId'];
             EnmasseHelper::doNotify($orderId);
             JModel::getInstance('order', 'enmasseModel')->updatePayDetail($orderId, $payDetail);
             $msg = JText::_("Thank you for purchasing!");
             $link = JRoute::_("index.php?option=com_enmasse&view=orderlist", false);
             JFactory::getApplication()->redirect($link, $msg);
         } elseif ($payClass == "paypal") {
             $payDta = call_user_func_array(array($className, "generatePaymentDetail"), array());
             $payDetail = json_encode($payDta);
             JModel::getInstance('order', 'enmasseModel')->updatePayDetail($orderId, $payDetail);
             $link = JRoute::_("index.php?option=com_enmasse&controller=payment&task=doNotify&{$postData}&orderId={$orderId}", false);
             JFactory::getApplication()->redirect($link);
         } elseif ($payClass == "moneybookers") {
             if (isset($_POST['transaction_id']) && $_POST['status'] == 2) {
                 $orderId = $_POST['transaction_id'];
                 if (EnmasseHelper::getOrderStatusByOrderId($orderId) == "Unpaid") {
                     EnmasseHelper::doNotify($orderId);
                     JModel::getInstance('order', 'enmasseModel')->updatePayDetail($orderId, $payDetail);
                 }
             }
         } elseif ($payClass == "ogone") {
             $aData = array();
             foreach ($_REQUEST as $key => $value) {
                 $aData[strtoupper($key)] = $value;
             }
             $orderId = $aData['ORDERID'];
             if ($aData['STATUS'] == '5' || $aData['STATUS'] == '9') {
                 EnmasseHelper::doNotify($orderId);
                 JModel::getInstance('order', 'enmasseModel')->updatePayDetail($orderId, $payDetail);
                 $sMessage = JText::_('PAYMENT_BEING_PROCESS_MSG');
             } else {
                 $sMessage = JTEXT::_("PAYMENT_VALIDATION_FAILED");
             }
             $link = JRoute::_("/", false);
             JFactory::getApplication()->redirect($link, $sMessage);
         } elseif ($payClass == "worldpay") {
             if (isset($_POST['status'])) {
                 $flag = JRequest::getVar('flag');
                 if ($_POST['status'] == "COMPLETE") {
                     $orderId = $_POST['cartId'];
                     EnmasseHelper::doNotify($orderId);
                     JModel::getInstance('order', 'enmasseModel')->updatePayDetail($orderId, $payDetail);
                 }
             }
             $msg = '';
             if ($_GET['flag'] == "returnUrl") {
                 $msg = JText::_("Thank you for purchasing!");
             } else {
                 if ($_GET['flag'] == "cancelUrl") {
                     $msg = JText::_("Your payment was cancelled.");
                 }
             }
             $link = JRoute::_("index.php?option=com_enmasse&controller=deal", false);
             JFactory::getApplication()->redirect($link, $msg);
         }
     }
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:101,代码来源:_payment.php


注:本文中的EnmasseHelper::getOrderStatusByOrderId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。