Пример #1
0
 /**
  * Register payment provided in the request.
  *
  * @return void
  * @access public
  */
 public function registerPayment()
 {
     unset($_SESSION['no_store']);
     $url = parse_url($_REQUEST['url']);
     parse_str($url['query'], $params);
     $fines = new Fines();
     $res = $fines->processPayment($params);
     if ($res['success']) {
         $this->output('', JSON::STATUS_OK);
     } else {
         $this->output(isset($res['msg']) ? $res['msg'] : '', JSON::STATUS_ERROR);
     }
 }
Пример #2
0
 /**
  * Process incoming Paytrail notify request.
  * This should not be accessed by user.
  *
  * @return void
  * @access public
  */
 public function launch()
 {
     $url = parse_url($_SERVER["REQUEST_URI"]);
     parse_str($url['query'], $params);
     $fines = new Fines(true);
     $res = $fines->processPayment($params, false);
     if (!$res['success']) {
         error_log('PaytrailNotify error: ' . $_SERVER["REQUEST_URI"]);
         if (isset($res['msg'])) {
             error_log('   ' . $res['msg']);
         }
     }
 }