public function testUpdateStatusSuccessClose() { $payuplOrderId = 'ABC'; $status = 'COMPLETED'; $transaction = $this->getTransactionMockForUpdateStatus($payuplOrderId, $status); $transaction->expects($this->once())->method('setIsClosed')->with($this->equalTo(1))->will($this->returnSelf()); $transaction->expects($this->once())->method('save')->will($this->returnSelf()); $this->model->updateStatus($payuplOrderId, $status, true); }
/** * @param string $payuplOrderId * @param string $status * @param float $amount * @throws LocalizedException */ public function processCompleted($payuplOrderId, $status, $amount) { $order = $this->loadOrderByPayuplOrderId($payuplOrderId); $this->orderHelper->completePayment($order, $amount, $payuplOrderId); $this->transactionService->updateStatus($payuplOrderId, $status, true); }