<?php

Route::group([
    'namespace' => 'Customers',
    'prefix'  => 'onenet',
    'as'      => 'onenet.',
], function() {
    Route::match(['get', 'post'], '/handler', 'OnenetController@MessageHandler')->name('handler');
    Route::post('/orderExpire', 'OnenetController@orderExpire')->name('orderExpire');
    Route::get('/testOpenMultiple', 'OnenetController@testOpenMultiple')->name('testOpenMultiple');

    Route::group([
        'middleware' => 'apiAuth'
    ], function() {
        Route::post('/open', 'OnenetController@charge')->name('charge');
        Route::post('/openMultiple', 'OnenetController@stopCharge')->name('stopCharge');
    });
});