offline_payment.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. use App\Http\Controllers\CustomerPackageController;
  3. use App\Http\Controllers\WalletController;
  4. use App\Http\Controllers\CustomerPackagePaymentController;
  5. use App\Http\Controllers\ManualPaymentMethodController;
  6. use App\Http\Controllers\SellerPackageController;
  7. use App\Http\Controllers\SellerPackagePaymentController;
  8. use App\Http\Controllers\SellerSpreadPackageController;
  9. use App\Http\Controllers\SellerSpreadPackagePaymentController;
  10. /*
  11. |--------------------------------------------------------------------------
  12. | Offline Payment Routes
  13. |--------------------------------------------------------------------------
  14. |
  15. | Here is where you can register admin routes for your application. These
  16. | routes are loaded by the RouteServiceProvider within a group which
  17. | contains the "web" middleware group. Now create something great!
  18. |
  19. */
  20. //Admin
  21. Route::group(['prefix' =>'admin', 'middleware' => ['auth', 'admin']], function(){
  22. Route::resource('manual_payment_methods', ManualPaymentMethodController::class);
  23. Route::get('/manual_payment_methods/destroy/{id}', [ManualPaymentMethodController::class, 'destroy'])->name('manual_payment_methods.destroy');
  24. Route::get('/offline-wallet-recharge-requests', [WalletController::class, 'offline_recharge_request'])->name('offline_wallet_recharge_request.index');
  25. Route::get('/offline-wallet-recharge-requests-by-seller', [WalletController::class, 'offline_recharge_request_by_seller'])->name('offline_wallet_recharge_request_by_seller.index');
  26. Route::post('/offline-wallet-recharge/approved', [WalletController::class, 'updateApproved'])->name('offline_recharge_request.approved');
  27. // Seller Package purchase request
  28. Route::get('/offline-seller-package-payment-requests', [SellerPackagePaymentController::class, 'offline_payment_request'])->name('offline_seller_package_payment_request.index');
  29. Route::post('/offline-seller-package-payment/approved', [SellerPackagePaymentController::class, 'offline_payment_approval'])->name('offline_seller_package_payment.approved');
  30. // Seller Spread Package purchase request
  31. Route::get('/offline-seller-spread-package-payment-requests', [SellerSpreadPackagePaymentController::class, 'offline_payment_request'])->name('offline_seller_spread_package_payment_request.index');
  32. Route::post('/offline-seller-spread-package-payment/approved', [SellerSpreadPackagePaymentController::class, 'offline_payment_approval'])->name('offline_seller_spread_package_payment.approved');
  33. // customer package purchase request
  34. Route::get('/offline-customer-package-payment-requests', [CustomerPackagePaymentController::class, 'offline_payment_request'])->name('offline_customer_package_payment_request.index');
  35. Route::post('/offline-customer-package-payment/approved', [CustomerPackagePaymentController::class, 'offline_payment_approval'])->name('offline_customer_package_payment.approved');
  36. });
  37. //salesman
  38. Route::group(['prefix' =>'salesman', 'middleware' => ['auth', 'salesman']], function(){
  39. Route::resource('salesman.manual_payment_methods', ManualPaymentMethodController::class);
  40. Route::get('/manual_payment_methods/destroy/{id}', [ManualPaymentMethodController::class, 'destroy'])->name('salesman.manual_payment_methods.destroy');
  41. Route::get('/offline-wallet-recharge-requests', [WalletController::class, 'offline_recharge_request'])->name('salesman.offline_wallet_recharge_request.index');
  42. Route::post('/offline-wallet-recharge/approved', [WalletController::class, 'updateApproved'])->name('salesman.offline_recharge_request.approved');
  43. // Seller Package purchase request
  44. Route::get('/offline-seller-package-payment-requests', [SellerPackagePaymentController::class, 'offline_payment_request'])->name('salesman.offline_seller_package_payment_request.index');
  45. Route::post('/offline-seller-package-payment/approved', [SellerPackagePaymentController::class, 'offline_payment_approval'])->name('salesman.offline_seller_package_payment.approved');
  46. // customer package purchase request
  47. Route::get('/offline-customer-package-payment-requests', [CustomerPackagePaymentController::class, 'offline_payment_request'])->name('salesman.offline_customer_package_payment_request.index');
  48. Route::post('/offline-customer-package-payment/approved', [CustomerPackagePaymentController::class, 'offline_payment_approval'])->name('salesman.offline_customer_package_payment.approved');
  49. });
  50. //FrontEnd
  51. Route::post('/purchase_history/make_payment', [ManualPaymentMethodController::class, 'show_payment_modal'])->name('checkout.make_payment');
  52. Route::post('/purchase_history/make_payment/submit', [ManualPaymentMethodController::class, 'submit_offline_payment'])->name('purchase_history.make_payment');
  53. Route::post('/offline-wallet-recharge-modal', [ManualPaymentMethodController::class, 'offline_recharge_modal'])->name('offline_wallet_recharge_modal');
  54. Route::group(['middleware' => ['user', 'verified']], function(){
  55. Route::post('/offline-wallet-recharge', [WalletController::class, 'offline_recharge'])->name('wallet_recharge.make_payment');
  56. });
  57. // customer package purchase
  58. Route::post('/offline-customer-package-purchase-modal', [ManualPaymentMethodController::class, 'offline_customer_package_purchase_modal'])->name('offline_customer_package_purchase_modal');
  59. Route::post('/offline-customer-package-paymnet', [CustomerPackageController::class, 'purchase_package_offline'])->name('customer_package.make_offline_payment');
  60. Route::group(['prefix' => 'seller', 'middleware' => ['seller', 'verified', 'user'], 'as' => 'seller.'], function () {
  61. // Seller Package purchase
  62. Route::post('/offline-seller-package-purchase-modal', [ManualPaymentMethodController::class, 'offline_seller_package_purchase_modal'])->name('offline_seller_package_purchase_modal');
  63. Route::post('/offline-seller-package-paymnet',[SellerPackageController::class, 'purchase_package_offline'])->name('make_offline_payment');
  64. // Seller Spread Package purchase
  65. Route::post('/offline-seller-spread-package-purchase-modal', [ManualPaymentMethodController::class, 'offline_seller_spread_package_purchase_modal'])->name('offline_seller_spread_package_purchase_modal');
  66. Route::post('/offline-seller-spread-package-paymnet',[SellerSpreadPackageController::class, 'purchase_spread_package_offline'])->name('spread_make_offline_payment');
  67. });