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


PHP Object::setStatus方法代码示例

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


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

示例1: initialize

 /**
  * Set order state and status
  *
  * @param string $paymentAction
  * @param \Magento\Framework\Object $stateObject
  * @return void
  */
 public function initialize($paymentAction, $stateObject)
 {
     $state = $this->getConfigData('order_status');
     $stateObject->setState($state);
     $stateObject->setStatus($state);
     $stateObject->setIsNotified(false);
 }
开发者ID:marcinNS,项目名称:magento2-samples,代码行数:14,代码来源:Payinstore.php

示例2: initialize

 /**
  * Instantiate state and set it to state object
  *
  * @param string $paymentAction
  * @param \Magento\Framework\Object $stateObject
  * @return void
  */
 public function initialize($paymentAction, $stateObject)
 {
     switch ($paymentAction) {
         case \Magento\Paypal\Model\Config::PAYMENT_ACTION_AUTH:
         case \Magento\Paypal\Model\Config::PAYMENT_ACTION_SALE:
             $payment = $this->getInfoInstance();
             $order = $payment->getOrder();
             $order->setCanSendNewEmailFlag(false);
             $payment->setAmountAuthorized($order->getTotalDue());
             $payment->setBaseAmountAuthorized($order->getBaseTotalDue());
             $this->_generateSecureSilentPostHash($payment);
             $request = $this->_buildTokenRequest($payment);
             $response = $this->_postRequest($request);
             $this->_processTokenErrors($response, $payment);
             $order = $payment->getOrder();
             $order->setCanSendNewEmailFlag(false);
             $stateObject->setState(\Magento\Sales\Model\Order::STATE_PENDING_PAYMENT);
             $stateObject->setStatus('pending_payment');
             $stateObject->setIsNotified(false);
             break;
         default:
             break;
     }
 }
开发者ID:pavelnovitsky,项目名称:magento2,代码行数:31,代码来源:Payflowlink.php

示例3: initialize

 /**
  * Set order state and status
  *
  * @param string $paymentAction
  * @param \Magento\Framework\Object $stateObject
  * @return void
  */
 public function initialize($paymentAction, $stateObject)
 {
     $state = $this->getConfigData('order_status');
     $this->_gateUrl = $this->getConfigData('cgi_url');
     $this->_testUrl = $this->getConfigData('cgi_url_test_mode');
     $this->_test = $this->getConfigData('test');
     $stateObject->setState($state);
     $stateObject->setStatus($state);
     $stateObject->setIsNotified(false);
 }
开发者ID:MagePsycho,项目名称:magento2-module-payment-tmrobokassa,代码行数:17,代码来源:TMRobokassa.php

示例4: processSuccessResult

 /**
  * Processes successful authorize/clone result
  *
  * @param \Magento\Framework\Object $payment
  * @param \Braintree_Result_Successful $result
  * @param float $amount
  * @return \Magento\Framework\Object
  */
 protected function processSuccessResult(\Magento\Framework\Object $payment, \Braintree_Result_Successful $result, $amount)
 {
     $additionalInformation = $this->getExtraTransactionInformation($result->transaction);
     $payment->setStatus(self::STATUS_APPROVED)->setCcTransId($result->transaction->id)->setLastTransId($result->transaction->id)->setTransactionId($result->transaction->id)->setIsTransactionClosed(0)->setAdditionalInformation($additionalInformation)->setAmount($amount)->setShouldCloseParentTransaction(false);
     return $payment;
 }
开发者ID:nja78,项目名称:magento2,代码行数:14,代码来源:PayPal.php

示例5: initialize

 /**
  * Instantiate state and set it to state object
  *
  * @param string $paymentAction
  * @param \Magento\Framework\Object $stateObject
  * @return void
  */
 public function initialize($paymentAction, $stateObject)
 {
     switch ($paymentAction) {
         case self::ACTION_AUTHORIZE:
         case self::ACTION_AUTHORIZE_CAPTURE:
             $payment = $this->getInfoInstance();
             $order = $payment->getOrder();
             $order->setCanSendNewEmailFlag(false);
             $payment->authorize(true, $order->getBaseTotalDue());
             // base amount will be set inside
             $payment->setAmountAuthorized($order->getTotalDue());
             $order->setState(\Magento\Sales\Model\Order::STATE_PENDING_PAYMENT, 'pending_payment', '', false);
             $stateObject->setState(\Magento\Sales\Model\Order::STATE_PENDING_PAYMENT);
             $stateObject->setStatus('pending_payment');
             $stateObject->setIsNotified(false);
             break;
         default:
             break;
     }
 }
开发者ID:aiesh,项目名称:magento2,代码行数:27,代码来源:Directpost.php

示例6: initialize

 /**
  * Instantiate state and set it to state object
  *
  * @param string $paymentAction
  * @param \Magento\Framework\Object $stateObject
  * @return void
  */
 public function initialize($paymentAction, $stateObject)
 {
     switch ($paymentAction) {
         case \Magento\Paypal\Model\Config::PAYMENT_ACTION_AUTH:
         case \Magento\Paypal\Model\Config::PAYMENT_ACTION_SALE:
             $payment = $this->getInfoInstance();
             $order = $payment->getOrder();
             $order->setCanSendNewEmailFlag(false);
             $payment->setAmountAuthorized($order->getTotalDue());
             $payment->setBaseAmountAuthorized($order->getBaseTotalDue());
             $this->_setPaymentFormUrl($payment);
             $stateObject->setState(\Magento\Sales\Model\Order::STATE_PENDING_PAYMENT);
             $stateObject->setStatus('pending_payment');
             $stateObject->setIsNotified(false);
             break;
         default:
             break;
     }
 }
开发者ID:nja78,项目名称:magento2,代码行数:26,代码来源:Hostedpro.php

示例7: processSuccessResult

 /**
  * Processes successful authorize/clone result
  *
  * @param \Magento\Framework\Object $payment
  * @param \Braintree_Result_Successful $result
  * @param float $amount
  * @return \Magento\Framework\Object
  */
 protected function processSuccessResult(\Magento\Framework\Object $payment, \Braintree_Result_Successful $result, $amount)
 {
     $payment->setStatus(self::STATUS_APPROVED)->setCcTransId($result->transaction->id)->setLastTransId($result->transaction->id)->setTransactionId($result->transaction->id)->setIsTransactionClosed(0)->setCcLast4($result->transaction->creditCardDetails->last4)->setAdditionalInformation($this->getExtraTransactionInformation($result->transaction))->setAmount($amount)->setShouldCloseParentTransaction(false);
     if (isset($result->transaction->creditCard['token']) && $result->transaction->creditCard['token']) {
         $payment->setTransactionAdditionalInfo('token', $result->transaction->creditCard['token']);
     }
     return $payment;
 }
开发者ID:nja78,项目名称:magento2,代码行数:16,代码来源:PaymentMethod.php


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