<?php namespace App\Services; use Session; use DB; use Auth; use Illuminate\Support\Facades\Redirect; if (session_status() == PHP_SESSION_NONE) { session_start(); } define("IPAY_AUTHORIZATION", "Bearer MDcxMDRlNGItOTM5OC00NTllLTg5YjItNzkzODA2ZGZkZjY5"); //define("IPAY_AUTHORIZATION", "Bearer 3db2fcf5-f6f6-4feb-9e71-df081110933e"); # IF SANDBOX TRUE, THEN IT WILL CONNECT WITH SSLCOMMERZ SANDBOX (TEST) SYSTEM define("IPAY_SANDBOX", true); class IPay { /*protected $ipay_submit_url; protected $ipay_validation_url; protected $ipay_mode; protected $ipay_data; protected $store_id; protected $store_pass; public $error = '';*/ protected $base_url; public function __construct() { //$this->setSSLCommerzMode((SSLCZ_IS_SANDBOX) ? 1 : 0); //$this->store_id = SSLCZ_STORE_ID; //$this->store_pass = SSLCZ_STORE_PASSWD; //$this->ipay_submit_url = "https://" . $this->ipay_mode . ".ipayommerz.com/gwprocess/v3/api.php"; //$this->ipay_validation_url = "https://" . $this->ipay_mode . ".sslcommerz.com/validator/api/validationserverAPI.php"; $this->base_url = url('/');; } public function submitpayment($request, $referencedId) { $curl = curl_init(); curl_setopt_array($curl, array(
* As this class is mainly used during Kernel boot, where nothing is yet * available, the Response content is always HTML. * * @author Fabien Potencier <fabien@symfony.com> * @author Nicolas Grekas <p@tchwork.com> */ class ExceptionHandler { private $debug; private $charset; private $handler; private $caughtBuffer; private $caughtLength; private $fileLinkFormat; public function __construct($debug = true, $charset = null, $fileLinkFormat = null) { $this->debug = $debug; $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8'; $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); } /** * Registers the exception handler. * * @param bool $debug Enable/disable debug mode, where the stack trace is displayed * @param string|null $charset The charset used by exception messages * @param string|null $fileLinkFormat The IDE link template * * @return static */ public static function register($debug = true, $charset = null, $fileLinkFormat = null) { $handler = new static($debug, $charset, $fileLinkFormat); $prev = set_exception_handler(array($handler, 'handle')); if (is_array($prev) && $prev[0] instanceof ErrorHandler) { restore_exception_handler(); $prev[0]->setExceptionHandler(array($handler, 'handle')); }
* As this class is mainly used during Kernel boot, where nothing is yet * available, the Response content is always HTML. * * @author Fabien Potencier <fabien@symfony.com> * @author Nicolas Grekas <p@tchwork.com> */ class ExceptionHandler { private $debug; private $charset; private $handler; private $caughtBuffer; private $caughtLength; private $fileLinkFormat; public function __construct($debug = true, $charset = null, $fileLinkFormat = null) { $this->debug = $debug; $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8'; $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); } /** * Registers the exception handler. * * @param bool $debug Enable/disable debug mode, where the stack trace is displayed * @param string|null $charset The charset used by exception messages * @param string|null $fileLinkFormat The IDE link template * * @return static */ public static function register($debug = true, $charset = null, $fileLinkFormat = null) { $handler = new static($debug, $charset, $fileLinkFormat); $prev = set_exception_handler(array($handler, 'handle')); if (is_array($prev) && $prev[0] instanceof ErrorHandler) { restore_exception_handler(); $prev[0]->setExceptionHandler(array($handler, 'handle')); }
* As this class is mainly used during Kernel boot, where nothing is yet * available, the Response content is always HTML. * * @author Fabien Potencier <fabien@symfony.com> * @author Nicolas Grekas <p@tchwork.com> */ class ExceptionHandler { private $debug; private $charset; private $handler; private $caughtBuffer; private $caughtLength; private $fileLinkFormat; public function __construct($debug = true, $charset = null, $fileLinkFormat = null) { $this->debug = $debug; $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8'; $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); } /** * Registers the exception handler. * * @param bool $debug Enable/disable debug mode, where the stack trace is displayed * @param string|null $charset The charset used by exception messages * @param string|null $fileLinkFormat The IDE link template * * @return static */ public static function register($debug = true, $charset = null, $fileLinkFormat = null) { $handler = new static($debug, $charset, $fileLinkFormat); $prev = set_exception_handler(array($handler, 'handle')); if (is_array($prev) && $prev[0] instanceof ErrorHandler) { restore_exception_handler(); $prev[0]->setExceptionHandler(array($handler, 'handle')); }
* As this class is mainly used during Kernel boot, where nothing is yet * available, the Response content is always HTML. * * @author Fabien Potencier <fabien@symfony.com> * @author Nicolas Grekas <p@tchwork.com> */ class ExceptionHandler { private $debug; private $charset; private $handler; private $caughtBuffer; private $caughtLength; private $fileLinkFormat; public function __construct($debug = true, $charset = null, $fileLinkFormat = null) { $this->debug = $debug; $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8'; $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); } /** * Registers the exception handler. * * @param bool $debug Enable/disable debug mode, where the stack trace is displayed * @param string|null $charset The charset used by exception messages * @param string|null $fileLinkFormat The IDE link template * * @return static */ public static function register($debug = true, $charset = null, $fileLinkFormat = null) { $handler = new static($debug, $charset, $fileLinkFormat); $prev = set_exception_handler(array($handler, 'handle')); if (is_array($prev) && $prev[0] instanceof ErrorHandler) { restore_exception_handler(); $prev[0]->setExceptionHandler(array($handler, 'handle')); }
* As this class is mainly used during Kernel boot, where nothing is yet * available, the Response content is always HTML. * * @author Fabien Potencier <fabien@symfony.com> * @author Nicolas Grekas <p@tchwork.com> */ class ExceptionHandler { private $debug; private $charset; private $handler; private $caughtBuffer; private $caughtLength; private $fileLinkFormat; public function __construct($debug = true, $charset = null, $fileLinkFormat = null) { $this->debug = $debug; $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8'; $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); } /** * Registers the exception handler. * * @param bool $debug Enable/disable debug mode, where the stack trace is displayed * @param string|null $charset The charset used by exception messages * @param string|null $fileLinkFormat The IDE link template * * @return static */ public static function register($debug = true, $charset = null, $fileLinkFormat = null) { $handler = new static($debug, $charset, $fileLinkFormat); $prev = set_exception_handler(array($handler, 'handle')); if (is_array($prev) && $prev[0] instanceof ErrorHandler) { restore_exception_handler(); $prev[0]->setExceptionHandler(array($handler, 'handle')); }
* As this class is mainly used during Kernel boot, where nothing is yet * available, the Response content is always HTML. * * @author Fabien Potencier <fabien@symfony.com> * @author Nicolas Grekas <p@tchwork.com> */ class ExceptionHandler { private $debug; private $charset; private $handler; private $caughtBuffer; private $caughtLength; private $fileLinkFormat; public function __construct($debug = true, $charset = null, $fileLinkFormat = null) { $this->debug = $debug; $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8'; $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); } /** * Registers the exception handler. * * @param bool $debug Enable/disable debug mode, where the stack trace is displayed * @param string|null $charset The charset used by exception messages * @param string|null $fileLinkFormat The IDE link template * * @return static */ public static function register($debug = true, $charset = null, $fileLinkFormat = null) { $handler = new static($debug, $charset, $fileLinkFormat); $prev = set_exception_handler(array($handler, 'handle')); if (is_array($prev) && $prev[0] instanceof ErrorHandler) { restore_exception_handler(); $prev[0]->setExceptionHandler(array($handler, 'handle')); }
* As this class is mainly used during Kernel boot, where nothing is yet * available, the Response content is always HTML. * * @author Fabien Potencier <fabien@symfony.com> * @author Nicolas Grekas <p@tchwork.com> */ class ExceptionHandler { private $debug; private $charset; private $handler; private $caughtBuffer; private $caughtLength; private $fileLinkFormat; public function __construct($debug = true, $charset = null, $fileLinkFormat = null) { $this->debug = $debug; $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8'; $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); } /** * Registers the exception handler. * * @param bool $debug Enable/disable debug mode, where the stack trace is displayed * @param string|null $charset The charset used by exception messages * @param string|null $fileLinkFormat The IDE link template * * @return static */ public static function register($debug = true, $charset = null, $fileLinkFormat = null) { $handler = new static($debug, $charset, $fileLinkFormat); $prev = set_exception_handler(array($handler, 'handle')); if (is_array($prev) && $prev[0] instanceof ErrorHandler) { restore_exception_handler(); $prev[0]->setExceptionHandler(array($handler, 'handle')); }
* As this class is mainly used during Kernel boot, where nothing is yet * available, the Response content is always HTML. * * @author Fabien Potencier <fabien@symfony.com> * @author Nicolas Grekas <p@tchwork.com> */ class ExceptionHandler { private $debug; private $charset; private $handler; private $caughtBuffer; private $caughtLength; private $fileLinkFormat; public function __construct($debug = true, $charset = null, $fileLinkFormat = null) { $this->debug = $debug; $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8'; $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); } /** * Registers the exception handler. * * @param bool $debug Enable/disable debug mode, where the stack trace is displayed * @param string|null $charset The charset used by exception messages * @param string|null $fileLinkFormat The IDE link template * * @return static */ public static function register($debug = true, $charset = null, $fileLinkFormat = null) { $handler = new static($debug, $charset, $fileLinkFormat); $prev = set_exception_handler(array($handler, 'handle')); if (is_array($prev) && $prev[0] instanceof ErrorHandler) { restore_exception_handler(); $prev[0]->setExceptionHandler(array($handler, 'handle')); }