protected function getGatewayClass() { $alias = post('gateway_alias', $this->gatewayAlias); if ($this->gatewayClass !== null) { return $this->gatewayClass; } if (!($gateway = GatewayManager::instance()->findByAlias($alias))) { throw new Exception('Unable to find gateway with alias ' . $alias); } return $this->gatewayClass = $gateway->class; }
<?php Route::group(['prefix' => 'api_responsiv_pay'], function () { Route::any('{code}/{slug}', function ($code, $uri) { return \Responsiv\Pay\Classes\GatewayManager::runAccessPoint($code, $uri); })->where('slug', '(.*)?'); });