コード例 #1
0
 public function testProcessStatusChangeCompleted()
 {
     $orderId = 1;
     $status = Order::STATUS_COMPLETED;
     $this->orderProcessor->expects($this->once())->method('processCompleted')->with($this->equalTo($orderId), $this->equalTo($status))->willReturn(true);
     $this->assertTrue($this->model->processStatusChange($orderId, $status));
 }
コード例 #2
0
ファイル: Order.php プロジェクト: ORBA/magento2_payupl
 /**
  * @inheritdoc
  */
 public function processNotification($payuplOrderId, $status, $amount)
 {
     /**
      * @var $result \Magento\Framework\Controller\Result\Raw
      */
     $newest = $this->transactionResource->checkIfNewestByPayuplOrderId($payuplOrderId);
     $this->orderProcessor->processStatusChange($payuplOrderId, $status, $amount, $newest);
     $result = $this->rawResultFactory->create();
     $result->setHttpResponseCode(200);
     return $result;
 }