Click here to Skip to main content
15,888,908 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have PHP script that direct to the website for payment before you install it, i want to bypass the redirection to the payment. What do i change to make it work

PHP
Route::any('check/purchase-code', function() {if ($code = \Input::get('code')) {ini_set('user_agent', 'Mozilla/5.0');$result = file_get_contents("http://example.com/demo/install/check?code=".$code.'&domain='.\Request::server('HTTP_HOST'));if ($result == 1) {\Session::put('valid-usage','1');return \Redirect::route('install-db-info');}}return \Redirect::to('/install');});
Route::filter('user-auth', function()
{

    if (!Auth::check()) {
        if (Request::ajax()) {
            return json_encode(['content' => 'login']);
        } else {
            return Redirect::guest('/');
        }
    };
    /**
     * User is login we need to know if user has getstarted or not
     */
    if (Config::get('user-getstarted')) {
        if (Auth::user()->fully_started != 1 and !Request::ajax()) {
            return \Redirect::route('user.getstarted');
        }
    }
Posted
Comments
[no name] 29-Aug-18 4:47am    
Nothing. It doesn't work that way - that's the idea.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900