/** * @param string $payuplOrderId * @return bool */ public function getOrderIdIfCanRepeat($payuplOrderId = null) { if ($payuplOrderId && $this->transactionResource->checkIfNewestByPayuplOrderId($payuplOrderId)) { return $this->transactionResource->getOrderIdByPayuplOrderId($payuplOrderId); } return false; }
public function testGetOrderIdByPayuplOrderIdSuccess() { $payuplOrderId = 'ABC'; $resultTableRow = ['order_id' => 1]; $this->internalTestGetOrderIdByPayuplOrderId($payuplOrderId, $resultTableRow); $this->assertEquals($resultTableRow['order_id'], $this->model->getOrderIdByPayuplOrderId($payuplOrderId)); }