 <?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::group(['prefix' => 'plugin'], function () {
    Route::get('/s',['uses'=>'MerchantsController@edit','as'=>'plugin.edit']);
    Route::get('/{order_id}',['uses'=>'MerchantsController@index','as'=>'plugin.index']);
    Route::get('finalizing/{order_id}',['uses'=>'MerchantsController@confirmation','as'=>'plugin.final']);
    Route::post('/',['uses'=>'MerchantsController@postRequest','as'=>'plugin.request']);
//    Route::post('/send/callback',['uses'=>'MerchantsController@postWcCallback','as'=>'plugin.send.callback']);
    Route::get('/check/{order_id}',['uses'=>'MerchantsController@checkPayment','as'=>'plugin.waiting']);
    Route::get('/merchant/{token}/{order_id}',['uses'=>'MerchantsController@checkMerchant','as'=>'plugin.merchant']);

});
