Пример #1
0
 /**
  * Endpoint 'payment' request
  */
 public function endpointAuth()
 {
     /**
      * @var Processor $processor
      */
     $type = Type::PAYMENT;
     $input = Input::all();
     $input = Type::clearInput($type, $input);
     $term = Terminal::find($input['term']);
     Secure::sign($input, $type, $term->secret);
     $processor = $this->makeProcessor($type, $input);
     $errorMessage = null;
     try {
         $response = $processor->response();
         if ($response->rc !== '00') {
             $errorMessage = ProcessorException::getCodeMessage($response->rc);
         }
         // need auth
         if ($response->auth()) {
             return Redirect::to($response->auth());
         }
     } catch (ProcessorException $e) {
         $errorMessage = $e->getMessage();
     }
     if (!$errorMessage) {
         return Views::reload(Views::url($input['back'], array('resultBankEmulatorPayment' => 'success')), array('Платеж принят!', 'Ждите перехода в интернет-магазин'), 'success');
     }
     return Views::reload(Views::url($input['back'], array('resultBankEmulatorPayment' => 'error')), array($errorMessage, 'Ждите перехода в интернет-магазин'), 'danger');
 }
Пример #2
0
				<td><?php 
    echo $payment->status;
    ?>
</td>
				<td><?php 
    echo $payment->rrn;
    ?>
</td>
				<td><?php 
    echo $payment->irn;
    ?>
</td>
				<td><?php 
    echo $payment->rc;
    ?>
</td>
				<td><?php 
    echo $payment->pan;
    ?>
</td>
				<td><?php 
    echo ProcessorException::getCodeMessage($payment->rc);
    ?>
</td>
			</tr>
		<?php 
}
?>
	</table>
<?php 
echo $payments->links();