コード例 #1
2
ファイル: Repeat.php プロジェクト: tozwierz/magento2_payupl
 public function execute()
 {
     $resultRedirect = $this->resultRedirectFactory->create();
     $payuplOrderId = $this->context->getRequest()->getParam('id');
     $orderId = $this->paymentHelper->getOrderIdIfCanRepeat($payuplOrderId);
     if ($orderId) {
         $resultRedirect->setPath('orba_payupl/payment/repeat_start');
         $this->session->setLastOrderId($orderId);
     } else {
         $resultRedirect->setPath('orba_payupl/payment/repeat_error');
         $this->messageManager->addError(__('The repeat payment link is invalid.'));
     }
     return $resultRedirect;
 }
コード例 #2
0
ファイル: Fail.php プロジェクト: tozwierz/magento2_payupl
 /**
  * @return string|false
  */
 public function getPaymentUrl()
 {
     $orderId = $this->session->getLastOrderId();
     if ($orderId) {
         $repeatPaymentUrl = $this->paymentHelper->getRepeatPaymentUrl($orderId);
         if (!$repeatPaymentUrl) {
             return $this->paymentHelper->getStartPaymentUrl($orderId);
         }
         return $repeatPaymentUrl;
     }
     return false;
 }