예제 #1
0
 /**
  * @param string $payuplOrderId
  * @return bool
  */
 public function getOrderIdIfCanRepeat($payuplOrderId = null)
 {
     if ($payuplOrderId && $this->transactionResource->checkIfNewestByPayuplOrderId($payuplOrderId)) {
         return $this->transactionResource->getOrderIdByPayuplOrderId($payuplOrderId);
     }
     return false;
 }
예제 #2
0
 public function testCheckIfNewestByPayuplOrderIdSuccess()
 {
     $payuplOrderId = '123';
     $resultTableRow = ['newer_id' => null];
     $this->internalTestCheckIfNewestByPayuplOrderId($payuplOrderId, $resultTableRow);
     $this->assertTrue($this->model->checkIfNewestByPayuplOrderId($payuplOrderId));
 }
예제 #3
0
 /**
  * @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)->setContents('OK');
     return $result;
 }