/**
  * Executing http request
  *
  * @param string $type
  * @param array  $requestParams
  */
 private function request($type, $requestParams)
 {
     $this->cleanup();
     $curl = new Curl();
     $curl->setCheckCertificates(Config::get('strongSSL'));
     $curl->post(Config::get('gatewayUrl'), array('type' => $type, 'input' => $requestParams));
     $this->parseErrors($curl);
     if (!$this->error || $this->error['type'] == self::C_ERROR_PROCESSING) {
         $this->response = json_decode($curl->result);
     }
 }
Example #2
0
}
if (class_exists('\\FintechFab\\BankEmulatorSdk\\OnlineFormWidget') && class_exists('\\FintechFab\\BankEmulatorSdk\\Config')) {
    ?>

	<div class="row container">
		<div class="col-md-12">
			<div class="panel panel-primary">
				<div class="panel-heading">
					<h3 class="panel-title">[<?php 
    echo Type::PAYMENT;
    ?>
] Платеж одной кнопкой (Bank Emulator SDK)</h3>
				</div>
				<div class="panel-body">
					<?php 
    \FintechFab\BankEmulatorSdk\Config::setAll(array('terminalId' => $terminal->id, 'secretKey' => $terminal->secret, 'endpointUrl' => URL::route('ff-bank-em-endpoint'), 'currency' => 'RUB', 'callbackUrl' => URL::current()));
    \FintechFab\BankEmulatorSdk\OnlineFormWidget::render(12345, 123.45, 'Example', 'Example Online Order');
    $gateway = new \FintechFab\BankEmulatorSdk\Gateway();
    $fields = $gateway->endpoint(array('orderId' => 12345, 'orderAmount' => 123.45, 'orderName' => 'Example', 'orderDesc' => 'Example Online Order'));
    ?>

				</div>
			</div>
		</div>
	</div>
<?php 
}
?>

<div class="row container">
	<div class="col-md-12">