<?php

use Illuminate\Support\Facades\Route;

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

Route::get('/health', function () {
    return response()->json(['ok' => true]);
});

Route::get('/{id}', function () {
    return view('ssl/checkout_hosted_id');
});

Route::get('/new/{id}', 'PaynowController@hostedcheckout_new');

// SSLCOMMERZ Start
Route::any('/example1', 'PaynowController@easycheckout');
Route::get('/example2', 'PaynowController@exampleHostedCheckout');

Route::any('/pay', 'PaynowController@index');
Route::any('/paynow/{id}', 'PaynowController@paynow');
Route::post('/pay-via-ajax', 'PaynowController@payViaAjax');

Route::any('/success', 'PaynowController@success');
Route::any('/fail', 'PaynowController@fail');
Route::any('/cancel', 'PaynowController@cancel');

Route::any('/ipn', 'PaynowController@ipn');
//SSLCOMMERZ END
//Nagad Start
Route::get('/pay-nagad/{id}', 'PaynowController@payNagad');
Route::get('/pay-nagad/callback', 'PaynowController@payNagadCallback');
//Nagad End

Route::get('/info/{id}', 'PaynowController@get_connection_details');
Route::post('/info_details', 'PaynowController@get_connection_details_amount');

//api
Route::any('/Api/info', 'ApiController@get_connection_details');
Route::any('/Api/info-v2', 'ApiController@get_connection_details_v2');
Route::any('/Api/reset', 'ApiController@reset');
Route::any('/Api/payment', 'ApiController@index');
Route::any('/Api/payment-v2', 'ApiController@index_v2');
Route::any('/Api/transaction-check', 'ApiController@transaction_check');

//cron
Route::any('/Cron/due_payments_sms', 'CronController@due_payments_sms');
Route::any('/Cron/due_payments_sms_bangla', 'CronController@due_payments_sms_bangla');
Route::any('/Cron/due_payments_sms_prepaid', 'CronController@due_payments_sms_prepaid');
Route::any('/Cron/due_payments_email', 'CronController@due_payments_email');
Route::any('/Cron/ping_monitor_ip/{device_id}', 'CronController@ping_monitor_ip');
Route::any('/Cron/ping_monitor_ip_bandwidth/{device_id}', 'CronController@ping_monitor_ip_bandwidth');
Route::any('/Cron/ping_monitor_by_cid/{cid}', 'CronController@ping_monitor_by_cid');
Route::any('/Cron/ping_monitor_no_activity', 'CronController@ping_monitor_no_activity');
Route::any('/Cron/ping_monitor_status_off', 'CronController@ping_monitor_status_off');
Route::any('/Cron/bad_debt_sms', 'CronController@bad_debt_sms');
Route::any('/Cron/device_wise_disconnect/{device_id}', 'CronController@device_wise_disconnect');
Route::any('/Cron/device_wise_disconnect_all', 'CronController@device_wise_disconnect_all');
Route::any('/Cron/device_automation_cron_by_connection/{id}', 'CronController@device_automation_cron_by_connection');
Route::any('/Cron/recurring_invoice_create_cron', 'CronController@recurring_invoice_create_cron');
Route::any('/Cron/recurring_prepaid_invoice_create_cron', 'CronController@recurring_prepaid_invoice_create_cron');
Route::any('/Cron/daily_report', 'CronController@daily_report');
Route::any('/Cron/payment_clear', 'CronController@payment_clear');
Route::any('/Cron/ssl_comm_admin_payment_check', 'CronController@ssl_comm_admin_payment_check');
Route::any('/Cron/device_wise_ppoe_setup/{device_id}', 'CronController@device_wise_ppoe_setup');

//route created by arafat for custom testing
Route::any('/Cron/due_payments_sms_arafat', 'CronController@due_payments_sms_arafat');
Route::any('/Cron/recurring_invoice_create_cron_custom', 'CronController@recurring_invoice_create_cron_custom');
Route::any('/Cron/recurring_invoice_create_cron_custom_submit', 'CronController@recurring_invoice_create_cron_custom_submit');
Route::any('/Cron/recurring_invoice_create_cron_custom_process', 'CronController@recurring_invoice_create_cron_custom_process');
Route::any('/Cron/recurring_invoice_create_cron_new', 'CronController@recurring_invoice_create_cron_new');
Route::any('/Cron/recurring_check_invoice_created', 'CronController@recurring_check_invoice_created');
Route::any('/Cron/recurring_check_invoice_duplicate', 'CronController@recurring_check_invoice_duplicate');
Route::get('recurring-dup/{offset}/{limit}', 'CronController@recurring_duplicate_batch');
Route::any('/Cron/recurring_check_invoice_duplicate_other', 'CronController@recurring_check_invoice_duplicate_other');
Route::any('/Cron/recurring_check_invoice_id', 'CronController@recurring_check_invoice_id');
?>