Файловый менеджер - Редактировать - /home/c7lekhnath/silverray.com.au/Modules/Language/database/seeders/68334/BasicPayment.tar
Назад
lang/.gitkeep 0000644 00000000000 15012237313 0007101 0 ustar 00 module.json 0000644 00000000362 15012237313 0006722 0 ustar 00 { "name": "BasicPayment", "alias": "basicpayment", "description": "", "keywords": [], "priority": 0, "providers": [ "Modules\\BasicPayment\\app\\Providers\\BasicPaymentServiceProvider" ], "files": [] } tests/Unit/.gitkeep 0000644 00000000000 15012237313 0010241 0 ustar 00 tests/Feature/.gitkeep 0000644 00000000000 15012237313 0010715 0 ustar 00 vite.config.js 0000644 00000001316 15012237313 0007313 0 ustar 00 import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; export default defineConfig({ build: { outDir: '../../public/build-basicpayment', emptyOutDir: true, manifest: true, }, plugins: [ laravel({ publicDirectory: '../../public', buildDirectory: 'build-basicpayment', input: [ __dirname + '/resources/assets/sass/app.scss', __dirname + '/resources/assets/js/app.js' ], refresh: true, }), ], }); //export const paths = [ // 'Modules/$STUDLY_NAME$/resources/assets/sass/app.scss', // 'Modules/$STUDLY_NAME$/resources/assets/js/app.js', //]; wsus.json 0000644 00000000641 15012237313 0006436 0 ustar 00 { "name": "Basic Payment Addon", "is_default": true, "description": "This is Basic Payment Addon", "author": { "name": "Websolutionsus", "email": "websolutionus1@gmail.com", "website": "https://websolutionus.com" }, "license": "Proprietary", "url": "", "options" : { "setting_route" : "" }, "last_update": "2024-03-31", "version": "1.0.0" } routes/.gitkeep 0000644 00000000000 15012237313 0007501 0 ustar 00 routes/error_log 0000644 00000001124 15012237313 0007775 0 ustar 00 [12-May-2025 17:16:55 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Facades\Route" not found in /home/lekhnath/silverray.com.au/Modules/BasicPayment/routes/api.php:5 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/BasicPayment/routes/api.php on line 5 [13-May-2025 08:05:04 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Facades\Route" not found in /home/lekhnath/silverray.com.au/Modules/BasicPayment/routes/web.php:8 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/BasicPayment/routes/web.php on line 8 routes/web.php 0000644 00000003224 15012237313 0007351 0 ustar 00 <?php use Illuminate\Support\Facades\Route; use Modules\BasicPayment\app\Http\Controllers\BasicPaymentController; use Modules\BasicPayment\app\Http\Controllers\FrontPaymentController; use Modules\BasicPayment\app\Http\Controllers\PaymentGatewayController; Route::group(['as' => 'admin.', 'prefix' => 'admin', 'middleware' => ['auth:admin','translation']], function () { Route::controller(BasicPaymentController::class)->group(function () { Route::get('basicpayment', 'basicpayment')->name('basicpayment'); Route::put('update-stripe', 'update_stripe')->name('update-stripe'); Route::put('update-paypal', 'update_paypal')->name('update-paypal'); Route::put('update-bank-payment', 'update_bank_payment')->name('update-bank-payment'); }); Route::controller(PaymentGatewayController::class)->group(function () { Route::get('paymentgateway', 'paymentgateway')->name('paymentgateway'); Route::put('razorpay-update', 'razorpay_update')->name('razorpay-update'); Route::put('flutterwave-update', 'flutterwave_update')->name('flutterwave-update'); Route::put('paystack-update', 'paystack_update')->name('paystack-update'); Route::put('mollie-update', 'mollie_update')->name('mollie-update'); Route::put('instamojo-update', 'instamojo_update')->name('instamojo-update'); Route::put('sslcommerz-update', 'sslcommerz_update')->name('sslcommerz-update'); Route::put('crypto-update', 'crypto_update')->name('crypto-update'); }); }); Route::get('basicpayment/paypal-success-payment', [FrontPaymentController::class, 'paypal_success'])->name('basicpayment.paypal-success-payment'); routes/api.php 0000644 00000000214 15012237313 0007341 0 ustar 00 <?php use Illuminate\Support\Facades\Route; Route::middleware(['auth:sanctum'])->prefix('v1')->name('api.')->group(function () { }); composer.json 0000644 00000001333 15012237313 0007263 0 ustar 00 { "name": "nwidart/basicpayment", "description": "", "authors": [ { "name": "Nicolas Widart", "email": "n.widart@gmail.com" } ], "extra": { "laravel": { "providers": [], "aliases": { } } }, "autoload": { "psr-4": { "Modules\\BasicPayment\\": "", "Modules\\BasicPayment\\App\\": "app/", "Modules\\BasicPayment\\Database\\Factories\\": "database/factories/", "Modules\\BasicPayment\\Database\\Seeders\\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Modules\\BasicPayment\\Tests\\": "tests/" } } } config/config.php 0000644 00000000553 15012237313 0007767 0 ustar 00 <?php return [ 'name' => 'BasicPayment', 'default_schema_string_length' => (int) env('DEFAULT_SCHEMA_STRING_LENGTH', 255), 'default_status' => [ 'active_text' => 'active', 'inactive_text' => 'inactive', 'active_bool' => true, 'inactive_bool' => false, 'active_int' => 1, 'inactive_int' => 0, ], ]; config/.gitkeep 0000644 00000000000 15012237313 0007425 0 ustar 00 config/error_log 0000644 00000000436 15012237313 0007726 0 ustar 00 [12-May-2025 17:29:29 UTC] PHP Fatal error: Uncaught Error: Call to undefined function env() in /home/lekhnath/silverray.com.au/Modules/BasicPayment/config/config.php:5 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/BasicPayment/config/config.php on line 5 package.json 0000644 00000000410 15012237313 0007022 0 ustar 00 { "private": true, "type": "module", "scripts": { "dev": "vite", "build": "vite build" }, "devDependencies": { "axios": "^1.1.2", "laravel-vite-plugin": "^0.7.5", "sass": "^1.69.5", "postcss": "^8.3.7", "vite": "^4.0.0" } } app/Http/Controllers/BasicPaymentController.php 0000644 00000013325 15012237313 0015706 0 ustar 00 <?php namespace Modules\BasicPayment\app\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Http\UploadedFile; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Cache; use Modules\Currency\app\Models\MultiCurrency; use Modules\BasicPayment\app\Models\BasicPayment; use Modules\BasicPayment\app\Models\PaymentGateway; class BasicPaymentController extends Controller { public function basicpayment() { checkAdminHasPermissionAndThrowException('basic.payment.view'); $payment_info = BasicPayment::get(); $basic_payment = []; foreach ($payment_info as $payment_item) { $basic_payment[$payment_item->key] = $payment_item->value; } $basic_payment = (object) $basic_payment; $payment_info = PaymentGateway::get(); $payment_setting = []; foreach ($payment_info as $payment_item) { $payment_setting[$payment_item->key] = $payment_item->value; } $payment_setting = (object) $payment_setting; $currencies = MultiCurrency::get(); return view('basicpayment::index', compact('basic_payment', 'payment_setting', 'currencies')); } public function update_stripe(Request $request) { checkAdminHasPermissionAndThrowException('basic.payment.update'); $rules = [ 'stripe_key' => 'required', 'stripe_secret' => 'required', 'stripe_charge' => 'required|numeric|max:100', 'stripe_status' => 'required|in:inactive,active', ]; $customMessages = [ 'stripe_key.required' => __('Stripe key is required'), 'stripe_secret.required' => __('Stripe secret is required'), 'stripe_charge.required' => __('Gateway charge is required'), 'stripe_charge.numeric' => __('Gateway charge should be numeric'), ]; $request->validate($rules, $customMessages); if ($request->file('stripe_image')) $this->updateImage($request->stripe_image, 'stripe_image'); $this->updateColumns($request->only('stripe_key', 'stripe_secret', 'stripe_charge', 'stripe_status')); $notification = __('Update Successfully'); $notification = ['messege' => $notification, 'alert-type' => 'success']; return redirect()->back()->with($notification); } public function update_paypal(Request $request) { checkAdminHasPermissionAndThrowException('basic.payment.update'); $rules = [ 'paypal_client_id' => 'required', 'paypal_secret_key' => 'required', 'paypal_charge' => 'required|numeric|max:100', 'paypal_app_id' => 'required', 'paypal_status' => 'required|in:inactive,active', ]; $customMessages = [ 'paypal_client_id.required' => __('Client is required'), 'paypal_secret_key.required' => __('Secret key is required'), 'paypal_charge.required' => __('Gateway charge is required'), 'paypal_app_id.required' => __('App id is required'), 'paypal_charge.numeric' => __('Gateway charge should be numeric'), ]; $request->validate($rules, $customMessages); if ($request->file('paypal_image')) $this->updateImage($request->paypal_image, 'paypal_image'); $this->updateColumns($request->only('paypal_client_id', 'paypal_secret_key','paypal_app_id', 'paypal_charge', 'paypal_status', 'paypal_account_mode')); $notification = __('Update Successfully'); $notification = ['messege' => $notification, 'alert-type' => 'success']; return redirect()->back()->with($notification); } public function update_bank_payment(Request $request) { checkAdminHasPermissionAndThrowException('basic.payment.update'); $rules = [ 'bank_information' => 'required', 'bank_charge' => 'required|numeric', 'bank_status' => 'required|in:inactive,active', ]; $customMessages = [ 'bank_information.required' => __('Bank information is required'), 'bank_charge.required' => __('Gateway charge is required'), 'bank_charge.numeric' => __('Gateway charge should be numeric'), ]; $request->validate($rules, $customMessages); if ($request->file('bank_image')) $this->updateImage($request->bank_image, 'bank_image'); $this->updateColumns($request->only('bank_information', 'bank_charge', 'bank_status')); $notification = __('Update Successfully'); $notification = ['messege' => $notification, 'alert-type' => 'success']; return redirect()->back()->with($notification); } private function updateColumns($request) { foreach ($request as $key => $value) { BasicPayment::where('key', $key)->update(['value' => $value]); } $this->put_basic_payment_cache(); } private function updateImage(UploadedFile $image, string $fieldName) { $bank_setting = BasicPayment::where('key', $fieldName)->first(); $basicImage = $bank_setting ? $bank_setting?->value : null; if($file_name = file_upload($image, 'uploads/custom-images/', $basicImage)){ $bank_setting->value = $file_name; $bank_setting->save(); } } private function put_basic_payment_cache() { $payment_info = BasicPayment::get(); $basic_payment = []; foreach ($payment_info as $payment_item) { $basic_payment[$payment_item->key] = $payment_item->value; } $basic_payment = (object) $basic_payment; Cache::put('basic_payment', $basic_payment); } } app/Http/Controllers/.gitkeep 0000644 00000000000 15012237313 0012165 0 ustar 00 app/Http/Controllers/PaymentGatewayController.php 0000644 00000034045 15012237313 0016270 0 ustar 00 <?php namespace Modules\BasicPayment\app\Http\Controllers; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; use Modules\Currency\app\Models\MultiCurrency; use Modules\BasicPayment\app\Models\PaymentGateway; class PaymentGatewayController extends Controller { public function razorpay_update(Request $request) { checkAdminHasPermissionAndThrowException('basic.payment.update'); $rules = [ 'razorpay_key' => 'required', 'razorpay_secret' => 'required', 'razorpay_currency_id' => 'required', 'razorpay_charge' => 'required|numeric', 'razorpay_name' => 'required', 'razorpay_description' => 'required', 'razorpay_theme_color' => 'required', ]; $customMessages = [ 'razorpay_key.required' => __('Razorpay key is required'), 'razorpay_secret.required' => __('Razorpay secret is required'), 'razorpay_currency_id.required' => __('Currency is required'), 'razorpay_charge.required' => __('Gateway charge is required'), 'razorpay_charge.numeric' => __('Gateway charge should be numeric'), 'razorpay_name.required' => __('Name is required'), 'razorpay_description.required' => __('Description is required'), 'razorpay_theme_color.required' => __('Theme is required'), ]; $request->validate($rules, $customMessages); PaymentGateway::where('key', 'razorpay_key')->update(['value' => $request->razorpay_key]); PaymentGateway::where('key', 'razorpay_secret')->update(['value' => $request->razorpay_secret]); PaymentGateway::where('key', 'razorpay_currency_id')->update(['value' => $request->razorpay_currency_id]); PaymentGateway::where('key', 'razorpay_charge')->update(['value' => $request->razorpay_charge]); PaymentGateway::where('key', 'razorpay_status')->update(['value' => $request->razorpay_status]); PaymentGateway::where('key', 'razorpay_name')->update(['value' => $request->razorpay_name]); PaymentGateway::where('key', 'razorpay_description')->update(['value' => $request->razorpay_description]); PaymentGateway::where('key', 'razorpay_theme_color')->update(['value' => $request->razorpay_theme_color]); if ($request->file('razorpay_image')) { $razorpay_setting = PaymentGateway::where('key', 'razorpay_image')->first(); $file_name = file_upload($request->razorpay_image, 'uploads/custom-images/', $razorpay_setting->value); $razorpay_setting->value = $file_name; $razorpay_setting->save(); } $this->put_payment_cache(); $notification = __('Update Successfully'); $notification = ['messege' => $notification, 'alert-type' => 'success']; return redirect()->back()->with($notification); } public function flutterwave_update(Request $request) { checkAdminHasPermissionAndThrowException('basic.payment.update'); $rules = [ 'flutterwave_public_key' => 'required', 'flutterwave_secret_key' => 'required', 'flutterwave_currency_id' => 'required', 'flutterwave_charge' => 'required|numeric', 'flutterwave_app_name' => 'required', ]; $customMessages = [ 'flutterwave_public_key.required' => __('Public key is required'), 'flutterwave_secret_key.required' => __('Secret key is required'), 'flutterwave_currency_id.required' => __('Currency is required'), 'flutterwave_charge.required' => __('Gateway charge is required'), 'flutterwave_charge.numeric' => __('Gateway charge should be numeric'), 'flutterwave_app_name.required' => __('Name is required'), ]; $request->validate($rules, $customMessages); PaymentGateway::where('key', 'flutterwave_currency_id')->update(['value' => $request->flutterwave_currency_id]); PaymentGateway::where('key', 'flutterwave_charge')->update(['value' => $request->flutterwave_charge]); PaymentGateway::where('key', 'flutterwave_public_key')->update(['value' => $request->flutterwave_public_key]); PaymentGateway::where('key', 'flutterwave_secret_key')->update(['value' => $request->flutterwave_secret_key]); PaymentGateway::where('key', 'flutterwave_app_name')->update(['value' => $request->flutterwave_app_name]); PaymentGateway::where('key', 'flutterwave_status')->update(['value' => $request->flutterwave_status]); if ($request->file('flutterwave_image')) { $flutterwave_setting = PaymentGateway::where('key', 'flutterwave_image')->first(); $file_name = file_upload($request->flutterwave_image, 'uploads/custom-images/', $flutterwave_setting->value); $flutterwave_setting->value = $file_name; $flutterwave_setting->save(); } $this->put_payment_cache(); $notification = __('Update Successfully'); $notification = ['messege' => $notification, 'alert-type' => 'success']; return redirect()->back()->with($notification); } public function paystack_update(Request $request) { checkAdminHasPermissionAndThrowException('basic.payment.update'); $rules = [ 'paystack_public_key' => 'required', 'paystack_secret_key' => 'required', 'paystack_currency_id' => 'required', 'paystack_charge' => 'required|numeric', ]; $customMessages = [ 'paystack_public_key.required' => __('Public key is required'), 'paystack_secret_key.required' => __('Secret key is required'), 'paystack_currency_id.required' => __('Currency is required'), 'paystack_charge.required' => __('Gateway charge is required'), 'paystack_charge.numeric' => __('Gateway charge should be numeric'), ]; $request->validate($rules, $customMessages); PaymentGateway::where('key', 'paystack_currency_id')->update(['value' => $request->paystack_currency_id]); PaymentGateway::where('key', 'paystack_charge')->update(['value' => $request->paystack_charge]); PaymentGateway::where('key', 'paystack_public_key')->update(['value' => $request->paystack_public_key]); PaymentGateway::where('key', 'paystack_secret_key')->update(['value' => $request->paystack_secret_key]); PaymentGateway::where('key', 'paystack_status')->update(['value' => $request->paystack_status]); if ($request->file('paystack_image')) { $paystack_setting = PaymentGateway::where('key', 'paystack_image')->first(); $file_name = file_upload($request->paystack_image, 'uploads/custom-images/', $paystack_setting->value); $paystack_setting->value = $file_name; $paystack_setting->save(); } $this->put_payment_cache(); $notification = __('Update Successfully'); $notification = ['messege' => $notification, 'alert-type' => 'success']; return redirect()->back()->with($notification); } public function mollie_update(Request $request) { checkAdminHasPermissionAndThrowException('basic.payment.update'); $rules = [ 'mollie_key' => 'required', 'mollie_currency_id' => 'required', 'mollie_charge' => 'required|numeric', ]; $customMessages = [ 'mollie_key.required' => __('Mollie key is required'), 'mollie_currency_id.required' => __('Currency is required'), 'mollie_charge.required' => __('Gateway charge is required'), 'mollie_charge.numeric' => __('Gateway charge should be numeric'), ]; $request->validate($rules, $customMessages); PaymentGateway::where('key', 'mollie_currency_id')->update(['value' => $request->mollie_currency_id]); PaymentGateway::where('key', 'mollie_charge')->update(['value' => $request->mollie_charge]); PaymentGateway::where('key', 'mollie_key')->update(['value' => $request->mollie_key]); PaymentGateway::where('key', 'mollie_status')->update(['value' => $request->mollie_status]); if ($request->file('mollie_image')) { $mollie_setting = PaymentGateway::where('key', 'mollie_image')->first(); $file_name = file_upload($request->mollie_image, 'uploads/custom-images/', $mollie_setting->value); $mollie_setting->value = $file_name; $mollie_setting->save(); } $this->put_payment_cache(); $notification = __('Update Successfully'); $notification = ['messege' => $notification, 'alert-type' => 'success']; return redirect()->back()->with($notification); } public function instamojo_update(Request $request) { checkAdminHasPermissionAndThrowException('basic.payment.update'); $rules = [ 'instamojo_api_key' => 'required', 'instamojo_auth_token' => 'required', 'instamojo_currency_id' => 'required', 'instamojo_charge' => 'required|numeric', ]; $customMessages = [ 'instamojo_api_key.required' => __('API key is required'), 'instamojo_auth_token.required' => __('Auth token is required'), 'instamojo_currency_id.required' => __('Currency is required'), 'instamojo_charge.required' => __('Gateway charge is required'), 'instamojo_charge.numeric' => __('Gateway charge should be numeric'), ]; $request->validate($rules, $customMessages); PaymentGateway::where('key', 'instamojo_currency_id')->update(['value' => $request->instamojo_currency_id]); PaymentGateway::where('key', 'instamojo_charge')->update(['value' => $request->instamojo_charge]); PaymentGateway::where('key', 'instamojo_api_key')->update(['value' => $request->instamojo_api_key]); PaymentGateway::where('key', 'instamojo_auth_token')->update(['value' => $request->instamojo_auth_token]); PaymentGateway::where('key', 'instamojo_status')->update(['value' => $request->instamojo_status]); PaymentGateway::where('key', 'instamojo_account_mode')->update(['value' => $request->instamojo_account_mode]); if ($request->file('instamojo_image')) { $instamojo_setting = PaymentGateway::where('key', 'instamojo_image')->first(); $file_name = file_upload($request->instamojo_image, 'uploads/custom-images/', $instamojo_setting->value); $instamojo_setting->value = $file_name; $instamojo_setting->save(); } $this->put_payment_cache(); $notification = __('Update Successfully'); $notification = ['messege' => $notification, 'alert-type' => 'success']; return redirect()->back()->with($notification); } public function sslcommerz_update(Request $request) { checkAdminHasPermissionAndThrowException('basic.payment.update'); $rules = [ 'sslcommerz_store_id' => 'required', 'sslcommerz_store_password' => 'required', ]; $customMessages = [ 'sslcommerz_store_id.required' => __('Store ID is required'), 'sslcommerz_store_password.required' => __('Store Password is required'), ]; $request->validate($rules, $customMessages); PaymentGateway::where('key', 'sslcommerz_store_id')->update(['value' => $request->sslcommerz_store_id]); PaymentGateway::where('key', 'sslcommerz_store_password')->update(['value' => $request->sslcommerz_store_password]); PaymentGateway::where('key', 'sslcommerz_test_mode')->update(['value' => $request->sslcommerz_test_mode]); PaymentGateway::where('key', 'sslcommerz_localhost')->update(['value' => $request->sslcommerz_localhost]); PaymentGateway::where('key', 'sslcommerz_status')->update(['value' => $request->sslcommerz_status]); if ($request->file('sslcommerz_image')) { $sslcommerz_setting = PaymentGateway::where('key', 'sslcommerz_image')->first(); $file_name = file_upload($request->sslcommerz_image, 'uploads/custom-images/', $sslcommerz_setting->value); $sslcommerz_setting->value = $file_name; $sslcommerz_setting->save(); } $this->put_payment_cache(); $notification = __('Update Successfully'); $notification = ['messege' => $notification, 'alert-type' => 'success']; return redirect()->back()->with($notification); } public function crypto_update(Request $request) { checkAdminHasPermissionAndThrowException('basic.payment.update'); $request->validate(['crypto_api_key' => 'required'], ['crypto_api_key.required' => __('API key is required')]); PaymentGateway::where('key', 'crypto_api_key')->update(['value' => $request->crypto_api_key]); PaymentGateway::where('key', 'crypto_sandbox')->update(['value' => $request->crypto_sandbox]); PaymentGateway::where('key', 'crypto_status')->update(['value' => $request->crypto_status]); if ($request->file('crypto_image')) { $crypto_setting = PaymentGateway::where('key', 'crypto_image')->first(); $file_name = file_upload($request->crypto_image, 'uploads/custom-images/', $crypto_setting->value); $crypto_setting->value = $file_name; $crypto_setting->save(); } $this->put_payment_cache(); $notification = __('Update Successfully'); $notification = ['messege' => $notification, 'alert-type' => 'success']; return redirect()->back()->with($notification); } private function put_payment_cache() { $payment_info = PaymentGateway::get(); $payment_setting = []; foreach ($payment_info as $payment_item) { $payment_setting[$payment_item->key] = $payment_item->value; } $payment_setting = (object) $payment_setting; Cache::put('payment_setting', $payment_setting); } } app/Http/Controllers/FrontPaymentController.php 0000644 00000014060 15012237313 0015752 0 ustar 00 <?php namespace Modules\BasicPayment\app\Http\Controllers; use App\Http\Controllers\Controller; use App\Traits\GetGlobalInformationTrait; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use Srmklive\PayPal\Services\PayPal as PayPalClient; class FrontPaymentController extends Controller { use GetGlobalInformationTrait; // public function __construct() { // $this->middleware('auth'); // } public function pay_with_paypal($paypal_credentials, $after_success_url, $after_failed_url) { config(['paypal.mode' => $paypal_credentials->paypal_account_mode]); if ($paypal_credentials->paypal_account_mode == 'sandbox') { config(['paypal.sandbox.client_id' => $paypal_credentials->paypal_client_id]); config(['paypal.sandbox.client_secret' => $paypal_credentials->paypal_secret_key]); } else { config(['paypal.live.client_id' => $paypal_credentials->paypal_client_id]); config(['paypal.live.client_secret' => $paypal_credentials->paypal_secret_key]); config(['paypal.live.app_id' => $paypal_credentials->paypal_app_id]); } $payable_currency = session()->get('payable_currency'); $paid_amount = session()->get('paid_amount'); try { $provider = new PayPalClient; $provider->setApiCredentials(config('paypal')); $paypalToken = $provider->getAccessToken(); $response = $provider->createOrder([ 'intent' => 'CAPTURE', 'application_context' => [ 'return_url' => route('paypal-success-payment'), 'cancel_url' => $after_failed_url, ], 'purchase_units' => [ 0 => [ 'amount' => [ 'currency_code' => $payable_currency, 'value' => $paid_amount, ], ], ], ]); } catch (\Exception $ex) { info($ex->getMessage()); $notification = __('Payment faild, please try again'); $notification = ['messege' => $notification, 'alert-type' => 'error']; return redirect()->back()->with($notification); } if (isset($response['id']) && $response['id'] != null) { Session::put('after_success_url', $after_success_url); Session::put('after_failed_url', $after_failed_url); Session::put('paypal_credentials', $paypal_credentials); // redirect to approve href foreach ($response['links'] as $links) { if ($links['rel'] == 'approve') { return redirect()->away($links['href']); } } $notification = __('Payment faild, please try again'); $notification = ['messege' => $notification, 'alert-type' => 'error']; return redirect()->back()->with($notification); } else { $notification = __('Payment faild, please try again'); $notification = ['messege' => $notification, 'alert-type' => 'error']; return redirect()->back()->with($notification); } } public function paypal_success(Request $request) { $paypal_credentials = Session::get('paypal_credentials'); config(['paypal.mode' => $paypal_credentials->paypal_account_mode]); if ($paypal_credentials->paypal_account_mode == 'sandbox') { config(['paypal.sandbox.client_id' => $paypal_credentials->paypal_client_id]); config(['paypal.sandbox.client_secret' => $paypal_credentials->paypal_secret_key]); } else { config(['paypal.sandbox.client_id' => $paypal_credentials->paypal_client_id]); config(['paypal.sandbox.client_secret' => $paypal_credentials->paypal_secret_key]); config(['paypal.sandbox.app_id' => $paypal_credentials->paypal_account_mode]); } $provider = new PayPalClient; $provider->setApiCredentials(config('paypal')); $provider->getAccessToken(); $response = $provider->capturePaymentOrder($request['token']); if (isset($response['status']) && $response['status'] == 'COMPLETED') { Session::put('after_success_transaction', $request->PayerID); $after_success_url = Session::get('after_success_url'); $paid_amount = $this->checkArrayIsset($response['purchase_units'][0]['payments']['captures'][0]['amount']['value']); Session::put('paid_amount', $paid_amount); $details = [ 'payments_captures_id' => $this->checkArrayIsset($response['purchase_units'][0]['payments']['captures'][0]['id']), 'amount' => $this->checkArrayIsset($response['purchase_units'][0]['payments']['captures'][0]['amount']['value']), 'currency' => $this->checkArrayIsset($response['purchase_units'][0]['payments']['captures'][0]['amount']['currency_code']), 'paid' => $this->checkArrayIsset($response['purchase_units'][0]['payments']['captures'][0]['seller_receivable_breakdown']['gross_amount']['value']), 'paypal_fee' => $this->checkArrayIsset($response['purchase_units'][0]['payments']['captures'][0]['seller_receivable_breakdown']['paypal_fee']['value']), 'net_amount' => $this->checkArrayIsset($response['purchase_units'][0]['payments']['captures'][0]['seller_receivable_breakdown']['net_amount']['value']), 'status' => $this->checkArrayIsset($response['purchase_units'][0]['payments']['captures'][0]['status']), ]; Session::put('payment_details', $details); return redirect($after_success_url); } else { $after_failed_url = Session::get('after_failed_url'); return redirect($after_failed_url); } } private function checkArrayIsset($value) { return isset($value) ? $value : null; } } app/Http/Requests/.gitkeep 0000644 00000000000 15012237313 0011472 0 ustar 00 app/Http/Middleware/.gitkeep 0000644 00000000000 15012237313 0011734 0 ustar 00 app/Models/.gitkeep 0000644 00000000000 15012237313 0010163 0 ustar 00 app/Models/PaymentGateway.php 0000644 00000001434 15012237313 0012216 0 ustar 00 <?php namespace Modules\BasicPayment\app\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Cache; class PaymentGateway extends Model { use HasFactory; /** * The attributes that are mass assignable. */ protected $fillable = []; public static function boot() { parent::boot(); static::saved(function () { Cache::forget('payment_setting'); }); static::created(function () { Cache::forget('payment_setting'); }); static::updated(function () { Cache::forget('payment_setting'); }); static::deleted(function () { Cache::forget('payment_setting'); }); } } app/Models/error_log 0000644 00000001220 15012237313 0010454 0 ustar 00 [08-May-2025 05:33:31 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Eloquent\Model" not found in /home/lekhnath/silverray.com.au/Modules/BasicPayment/app/Models/PaymentGateway.php:9 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/BasicPayment/app/Models/PaymentGateway.php on line 9 [09-May-2025 00:48:45 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Eloquent\Model" not found in /home/lekhnath/silverray.com.au/Modules/BasicPayment/app/Models/BasicPayment.php:9 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/BasicPayment/app/Models/BasicPayment.php on line 9 app/Models/BasicPayment.php 0000644 00000000746 15012237313 0011643 0 ustar 00 <?php namespace Modules\BasicPayment\app\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Modules\BasicPayment\Database\factories\BasicPaymentFactory; class BasicPayment extends Model { use HasFactory; /** * The attributes that are mass assignable. */ protected $fillable = []; protected static function newFactory(): BasicPaymentFactory { //return BasicPaymentFactory::new(); } } app/Interfaces/PaymentActions.php 0000644 00000000226 15012237313 0013053 0 ustar 00 <?php namespace Modules\BasicPayment\app\Interfaces; interface PaymentActions { public function processPayment($order, $orderType = 'order'); } app/Interfaces/PaymentMethodInterface.php 0000644 00000003313 15012237313 0014514 0 ustar 00 <?php namespace Modules\BasicPayment\app\Interfaces; interface PaymentMethodInterface { /** * Get the name of a specific payment gateway. * * @param string $gatewayName * @return string|null */ public function getPaymentName(string $gatewayName): ?string; /** * Get details for a specific payment gateway. * * @param string $gatewayName * @return object|null */ public function getGatewayDetails(string $gatewayName): ?object; /** * Check if a specific payment gateway is active. * * @param string $gatewayName * @return bool */ public function isActive(string $gatewayName): bool; /** * Get the icon associated with a specific payment gateway. * * @param string $gatewayName * @return string */ public function getIcon(string $gatewayName): string; /** * Get the logo associated with a specific payment gateway. * * @param string $gatewayName * @return string|null */ public function getLogo(string $gatewayName): ?string; /** * Check if a specific currency is supported by a payment gateway. * * @param string $gatewayName * @param string|null $code * @return bool */ public function isCurrencySupported(string $gatewayName, $code = null): bool; /** * Get the list of supported currencies for a specific payment gateway. * * @param string $gatewayName * @return array */ public function getSupportedCurrencies(string $gatewayName): array; /** * @param string $gatewayName */ public function getBladeView(string $gatewayName): ?string; } app/Services/error_log 0000644 00000000315 15012237313 0011020 0 ustar 00 [08-May-2025 05:39:33 UTC] PHP Fatal error: Trait "App\Traits\GetGlobalInformationTrait" not found in /home/lekhnath/silverray.com.au/Modules/BasicPayment/app/Services/PaymentMethodService.php on line 12 app/Services/PaymentMethodService.php 0000644 00000044356 15012237313 0013730 0 ustar 00 <?php namespace Modules\BasicPayment\app\Services; use Illuminate\Support\Facades\Session; use App\Traits\GetGlobalInformationTrait; use Modules\Currency\app\Models\MultiCurrency; use Modules\BasicPayment\app\Interfaces\PaymentMethodInterface; use Modules\BasicPayment\app\Enums\BasicPaymentSupportedCurrencyListEnum; use Modules\BasicPayment\app\Enums\PaymentGatewaySupportedCurrencyListEnum; class PaymentMethodService implements PaymentMethodInterface { use GetGlobalInformationTrait; const STRIPE = 'stripe'; const PAYPAL = 'paypal'; const BANK_PAYMENT = 'bank'; const MOLLIE = 'mollie'; const RAZORPAY = 'razorpay'; const FLUTTERWAVE = 'flutterwave'; const INSTAMOJO = 'instamojo'; const PAYSTACK = 'paystack'; // Holds the supported payment gateways protected static array $supportedPayments = [ self::STRIPE, self::PAYPAL, self::BANK_PAYMENT, self::RAZORPAY, self::FLUTTERWAVE, self::MOLLIE, self::INSTAMOJO, self::PAYSTACK, ]; /** * @param array $additionalPayments */ public static function extendSupportedPayments(array $additionalPayments): void { static::$supportedPayments = array_unique( array_merge(static::$supportedPayments, $additionalPayments) ); } // Holds the gateways that supports multi currency protected static array $multiCurrencySupported = [ self::STRIPE, self::PAYPAL, self::BANK_PAYMENT, self::RAZORPAY, self::FLUTTERWAVE, self::MOLLIE, self::INSTAMOJO, self::PAYSTACK, ]; /** * @param array $additionalGateways */ public static function extendMultiCurrencySupported(array $additionalGateways): void { static::$multiCurrencySupported = array_unique( array_merge(static::$multiCurrencySupported, $additionalGateways) ); } /** * Undocumented function */ public function getSupportedPayments(): array { return self::$supportedPayments; } /** * Get the value of the current gateway's constant. */ public function getValue($currentGateway): ?string { return in_array($currentGateway, self::$supportedPayments, true) ? $currentGateway : null; } /** * Undocumented function */ public function isSupportedGateway(string $gatewayName): bool { return in_array(strtolower($gatewayName), self::$supportedPayments, true); } /** * Undocumented function */ public function isSupportsMultiCurrency(string $gatewayName): bool { return in_array(strtolower($gatewayName), self::$multiCurrencySupported, true); } /** * Undocumented function */ public function getPaymentName(string $gatewayName): ?string { return match ($gatewayName) { self::STRIPE => 'Stripe', self::PAYPAL => 'PayPal', self::BANK_PAYMENT => 'Bank Payment', self::RAZORPAY => 'Razorpay', self::FLUTTERWAVE => 'Flutterwave', self::MOLLIE => 'Mollie', self::INSTAMOJO => 'Instamojo', self::PAYSTACK => 'Paystack', default => null, }; } /** * Undocumented function */ public function getGatewayDetails(string $gatewayName): ?object { $basicPayment = $this->get_basic_payment_info(); $paymentSetting = $this->get_payment_gateway_info(); return match ($gatewayName) { self::STRIPE => (object) [ 'stripe_key' => $basicPayment->stripe_key ?? null, 'stripe_secret' => $basicPayment->stripe_secret ?? null, 'currency_id' => $basicPayment->stripe_currency_id ?? null, 'stripe_status' => $basicPayment->stripe_status ?? null, 'charge' => $basicPayment->stripe_charge ?? null, 'stripe_image' => $basicPayment->stripe_image ?? null, ], self::PAYPAL => (object) [ 'paypal_client_id' => $basicPayment->paypal_client_id ?? null, 'paypal_secret_key' => $basicPayment->paypal_secret_key ?? null, 'paypal_account_mode' => $basicPayment->paypal_account_mode ?? null, 'currency_id' => $basicPayment->paypal_currency_id ?? null, 'charge' => $basicPayment->paypal_charge ?? null, 'paypal_status' => $basicPayment->paypal_status ?? null, 'paypal_image' => $basicPayment->paypal_image ?? null, ], self::BANK_PAYMENT => (object) [ 'bank_information' => $basicPayment->bank_information ?? null, 'bank_status' => $basicPayment->bank_status ?? null, 'bank_image' => $basicPayment->bank_image ?? null, 'charge' => $basicPayment->bank_charge ?? null, 'currency_id' => $basicPayment->bank_currency_id ?? null, ], self::RAZORPAY => (object) [ 'razorpay_key' => $paymentSetting->razorpay_key ?? null, 'razorpay_secret' => $paymentSetting->razorpay_secret ?? null, 'razorpay_name' => $paymentSetting->razorpay_name ?? null, 'razorpay_description' => $paymentSetting->razorpay_description ?? null, 'razorpay_theme_color' => $paymentSetting->razorpay_theme_color ?? null, 'razorpay_status' => $paymentSetting->razorpay_status ?? null, 'razorpay_image' => $paymentSetting->razorpay_image ?? null, 'currency_id' => $paymentSetting->razorpay_currency_id ?? null, 'charge' => $paymentSetting->razorpay_charge ?? null, ], self::FLUTTERWAVE => (object) [ 'flutterwave_public_key' => $paymentSetting->flutterwave_public_key ?? null, 'flutterwave_secret_key' => $paymentSetting->flutterwave_secret_key ?? null, 'flutterwave_app_name' => $paymentSetting->flutterwave_app_name ?? null, 'charge' => $paymentSetting->flutterwave_charge ?? null, 'currency_id' => $paymentSetting->flutterwave_currency_id ?? null, 'flutterwave_status' => $paymentSetting->flutterwave_status ?? null, 'flutterwave_image' => $paymentSetting->flutterwave_image ?? null, ], self::PAYSTACK => (object) [ 'paystack_public_key' => $paymentSetting->paystack_public_key ?? null, 'paystack_secret_key' => $paymentSetting->paystack_secret_key ?? null, 'paystack_status' => $paymentSetting->paystack_status ?? null, 'charge' => $paymentSetting->paystack_charge ?? null, 'paystack_image' => $paymentSetting->paystack_image ?? null, 'currency_id' => $paymentSetting->paystack_currency_id ?? null, ], self::MOLLIE => (object) [ 'mollie_key' => $paymentSetting->mollie_key ?? null, 'charge' => $paymentSetting->mollie_charge ?? null, 'mollie_image' => $paymentSetting->mollie_image ?? null, 'mollie_status' => $paymentSetting->mollie_status ?? null, 'currency_id' => $paymentSetting->mollie_currency_id ?? null, ], self::INSTAMOJO => (object) [ 'instamojo_account_mode' => $paymentSetting->instamojo_account_mode ?? null, 'instamojo_client_id' => $paymentSetting->instamojo_client_id ?? null, 'instamojo_client_secret' => $paymentSetting->instamojo_client_secret ?? null, 'charge' => $paymentSetting->instamojo_charge ?? null, 'instamojo_image' => $paymentSetting->instamojo_image ?? null, 'currency_id' => $paymentSetting->instamojo_currency_id ?? null, 'instamojo_status' => $paymentSetting->instamojo_status ?? null, ], default => (object) false, }; } /** * Undocumented function */ public function isActive(string $gatewayName): bool { $gatewayDetails = $this->getGatewayDetails($gatewayName); $activeStatus = config('basicpayment.default_status.active_text'); return match ($gatewayName) { self::STRIPE => $gatewayDetails->stripe_status == $activeStatus, self::PAYPAL => $gatewayDetails->paypal_status == $activeStatus, self::BANK_PAYMENT => $gatewayDetails->bank_status == $activeStatus, self::MOLLIE => $gatewayDetails->mollie_status == $activeStatus, self::RAZORPAY => $gatewayDetails->razorpay_status == $activeStatus, self::FLUTTERWAVE => $gatewayDetails->flutterwave_status == $activeStatus, self::INSTAMOJO => $gatewayDetails->instamojo_status == $activeStatus, self::PAYSTACK => $gatewayDetails->paystack_status == $activeStatus, default => false, }; } /** * Undocumented function */ public function getIcon(string $gatewayName): string { return match ($gatewayName) { self::STRIPE => 'fa-cc-stripe', self::PAYPAL => 'fa-cc-paypal', self::BANK_PAYMENT => 'fa-credit-card', self::MOLLIE => 'fa-cc-mollie', self::RAZORPAY => 'fa-cc-razorpay', self::FLUTTERWAVE => 'fa-cc-flutterwave', self::INSTAMOJO => 'fa-cc-instamojo', self::PAYSTACK => 'fa-cc-paystack', default => null, }; } /** * Undocumented function * * @param [type] $gatewayName */ public function getLogo($gatewayName): ?string { $basicPayment = $this->get_basic_payment_info(); $paymentSetting = $this->get_payment_gateway_info(); return match ($gatewayName) { self::STRIPE => $basicPayment->stripe_image ? asset($basicPayment->stripe_image) : asset('uploads/website-images/stripe.png'), self::PAYPAL => $basicPayment->paypal_image ? asset($basicPayment->paypal_image) : asset('uploads/website-images/paypal.png'), self::BANK_PAYMENT => $basicPayment->bank_image ? asset($basicPayment->bank_image) : asset('uploads/website-images/bank-pay.png'), self::MOLLIE => $paymentSetting->mollie_image ? asset($paymentSetting->mollie_image) : asset('uploads/website-images/mollie.png'), self::RAZORPAY => $paymentSetting->razorpay_image ? asset($paymentSetting->razorpay_image) : asset('uploads/website-images/razorpay.png'), self::FLUTTERWAVE => $paymentSetting->flutterwave_image ? asset($paymentSetting->flutterwave_image) : asset('uploads/website-images/flutterwave.png'), self::INSTAMOJO => $paymentSetting->instamojo_image ? asset($paymentSetting->instamojo_image) : asset('uploads/website-images/instamojo.png'), self::PAYSTACK => $paymentSetting->paystack_image ? asset($paymentSetting->paystack_image) : asset('uploads/website-images/paystack.png'), default => null, }; } protected static array $additionalActiveGateways = []; /** * Add additional active gateways to the list. * * @param array $additionalActiveGatewaysList */ public static function additionalActiveGatewaysList(array $additionalActiveGatewaysList): void { static::$additionalActiveGateways = array_merge(static::$additionalActiveGateways, $additionalActiveGatewaysList); } public function getActiveGatewaysWithDetails(): array { $basicPayment = $this->get_basic_payment_info(); $paymentSetting = $this->get_payment_gateway_info(); $activeStatus = config('basicpayment.default_status.active_text'); // Base gateways $gateways = [ self::STRIPE => [ 'name' => 'Stripe', 'logo' => asset($basicPayment->stripe_image ?? 'uploads/website-images/stripe.png'), 'status' => $basicPayment->stripe_status == $activeStatus, ], self::PAYPAL => [ 'name' => 'PayPal', 'logo' => asset($basicPayment->paypal_image ?? 'uploads/website-images/paypal.png'), 'status' => $basicPayment->paypal_status == $activeStatus, ], self::BANK_PAYMENT => [ 'name' => 'Bank Payment', 'logo' => asset($basicPayment->bank_image ?? 'uploads/website-images/bank-pay.png'), 'status' => $basicPayment->bank_status == $activeStatus, ], self::RAZORPAY => [ 'name' => 'RazorPay', 'logo' => asset($this->paymentSetting->razorpay_image ?? 'uploads/website-images/razorpay.png'), 'status' => $paymentSetting->razorpay_status == $activeStatus, ], self::FLUTTERWAVE => [ 'name' => 'FlutterWave', 'logo' => asset($this->paymentSetting->flutterwave_image ?? 'uploads/website-images/flutterwave.png'), 'status' => $paymentSetting->flutterwave_status == $activeStatus, ], self::PAYSTACK => [ 'name' => 'PayStack', 'logo' => asset($this->paymentSetting->paystack_image ?? 'uploads/website-images/paystack.png'), 'status' => $paymentSetting->paystack_status == $activeStatus, ], self::MOLLIE => [ 'name' => 'Mollie', 'logo' => asset($this->paymentSetting->mollie_image ?? 'uploads/website-images/mollie.png'), 'status' => $paymentSetting->paystack_status == $activeStatus, ], self::INSTAMOJO => [ 'name' => 'Instamojo', 'logo' => asset($this->paymentSetting->instamojo_image ?? 'uploads/website-images/instamojo.png'), 'status' => $paymentSetting->instamojo_status == $activeStatus, ], ]; // Merge base gateways with additional gateways $allGateways = array_merge($gateways, static::$additionalActiveGateways); // Filter only active gateways return array_filter($allGateways, fn($gateway) => $gateway['status'] === true); } /** * Undocumented function * * @param [type] $gatewayName * @param [type] $code */ public function isCurrencySupported($gatewayName, $code = null): bool { if (is_null($code)) { $code = getSessionCurrency(); } return match ($gatewayName) { self::STRIPE => BasicPaymentSupportedCurrencyListEnum::isStripeSupportedCurrencies($code), self::PAYPAL => BasicPaymentSupportedCurrencyListEnum::isPaypalSupportedCurrencies($code), self::BANK_PAYMENT => str($code)->lower() == str(MultiCurrency::where('is_default', 'yes')->first()->currency_code)->lower(), self::MOLLIE => PaymentGatewaySupportedCurrencyListEnum::isMollieSupportedCurrencies($code), self::RAZORPAY => PaymentGatewaySupportedCurrencyListEnum::isRazorpaySupportedCurrencies($code), self::FLUTTERWAVE => PaymentGatewaySupportedCurrencyListEnum::isFlutterwaveSupportedCurrencies($code), self::INSTAMOJO => PaymentGatewaySupportedCurrencyListEnum::isInstamojoSupportedCurrencies($code), self::PAYSTACK => PaymentGatewaySupportedCurrencyListEnum::isPaystackSupportedCurrencies($code), default => false, }; } /** * Undocumented function * * @param [type] $gatewayName */ public function getSupportedCurrencies($gatewayName): array { return match ($gatewayName) { self::STRIPE => BasicPaymentSupportedCurrencyListEnum::getStripeSupportedCurrencies(), self::PAYPAL => BasicPaymentSupportedCurrencyListEnum::getPaypalSupportedCurrencies(), self::BANK_PAYMENT => MultiCurrency::where('is_default', 'yes')->pluck('currency_code')->toArray(), self::MOLLIE => PaymentGatewaySupportedCurrencyListEnum::getMollieSupportedCurrencies(), self::RAZORPAY => PaymentGatewaySupportedCurrencyListEnum::getRazorpaySupportedCurrencies(), self::FLUTTERWAVE => PaymentGatewaySupportedCurrencyListEnum::getFlutterwaveSupportedCurrencies(), self::INSTAMOJO => PaymentGatewaySupportedCurrencyListEnum::getInstamojoSupportedCurrencies(), self::PAYSTACK => PaymentGatewaySupportedCurrencyListEnum::getPaystackSupportedCurrencies(), default => [], }; } /** * @param string $gatewayName */ public function getBladeView(string $gatewayName): ?string { return match ($gatewayName) { self::STRIPE => 'basicpayment::gateway-actions.stripe', self::PAYPAL => 'basicpayment::gateway-actions.paypal', self::BANK_PAYMENT => 'basicpayment::gateway-actions.bank', self::MOLLIE => 'basicpayment::gateway-actions.mollie', self::RAZORPAY => 'basicpayment::gateway-actions.razorpay', self::FLUTTERWAVE => 'basicpayment::gateway-actions.flutterwave', self::INSTAMOJO => 'basicpayment::gateway-actions.instamojo', self::PAYSTACK => 'basicpayment::gateway-actions.paystack', default => null, }; } /** * Undocumented function * * @param [type] $gatewayName * @param [type] $amount * @param int $discount * @param int $deliveryCharge */ public function getPayableAmount($gatewayName, $amount): object { return $this->calculate_payable_charge($amount, $gatewayName); } /** * Undocumented function */ public static function removeSessions(): void { Session::forget([ 'after_success_url', 'after_failed_url', 'payable_amount', 'gateway_charge', 'currency_rate', 'after_success_transaction', 'payable_with_charge', 'payable_currency', 'paid_amount', 'payment_details', 'delivery_charge', 'shipping_method_id', ]); } } app/Enums/PaymentGatewaySupportedCurrencyListEnum.php 0000644 00000007242 15012237313 0017167 0 ustar 00 <?php namespace Modules\BasicPayment\app\Enums; use Illuminate\Support\Str; use Modules\BasicPayment\app\Enums\BasicPaymentSupportedCurrencyListEnum; enum PaymentGatewaySupportedCurrencyListEnum { public static function getRazorpaySupportedCurrencies(): array { return ['AED', 'ALL', 'AMD', 'ARS', 'AUD', 'AWG', 'BBD', 'BDT', 'BMD', 'BND', 'BOB', 'BSD', 'BWP', 'BZD', 'CAD', 'CHF', 'CNY', 'COP', 'CRC', 'CUP', 'CZK', 'DKK', 'DOP', 'DZD', 'EGP', 'ETB', 'EUR', 'FJD', 'GBP', 'GHS', 'GIP', 'GMD', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'INR', 'JMD', 'KES', 'KGS', 'KHR', 'KYD', 'KZT', 'LAK', 'LKR', 'LRD', 'LSL', 'MAD', 'MDL', 'MKD', 'MMK', 'MNT', 'MOP', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'PEN', 'PGK', 'PHP', 'PKR', 'QAR', 'RUB', 'SAR', 'SCR', 'SEK', 'SGD', 'SLL', 'SOS', 'SSP', 'SVC', 'SZL', 'THB', 'TTD', 'TZS', 'USD', 'UYU', 'UZS', 'YER', 'ZAR', 'TRY']; } public static function isRazorpaySupportedCurrencies($code): bool { return in_array(Str::upper($code), self::getRazorpaySupportedCurrencies()); } public static function getMollieSupportedCurrencies(): array { $mollie = ['AED', 'AUD', 'BGN', 'BRL', 'CAD', 'CHF', 'CZK', 'DKK', 'EUR', 'GBP', 'HKD', 'HUF', 'ILS', 'ISK', 'JPY', 'MXN', 'MYR', 'NOK', 'NZD', 'PHP', 'PLN', 'RON', 'RUB', 'SEK', 'SGD', 'THB', 'TWD', 'USD', 'ZAR']; $paypale = BasicPaymentSupportedCurrencyListEnum::getPaypalSupportedCurrencies(); return array_unique(array_merge($mollie, $paypale)); } public static function isMollieSupportedCurrencies($code): bool { return in_array(Str::upper($code), self::getMollieSupportedCurrencies()); } public static function getInstamojoSupportedCurrencies(): array { return ['INR']; } public static function isInstamojoSupportedCurrencies($code): bool { return in_array(Str::upper($code), self::getInstamojoSupportedCurrencies()); } public static function getPaystackSupportedCurrencies() { return ['GHS', 'NGN', 'ZAR', 'KES']; } public static function isPaystackSupportedCurrencies($code): bool { return in_array(Str::upper($code), self::getPaystackSupportedCurrencies()); } public static function getFlutterwaveSupportedCurrencies() { // return ['NGN' => 'NG']; // currency code => country code return [ 'AED' => 'AE', 'ANG' => 'AN', 'ARS' => 'AR', 'AUD' => 'AU', 'BHD' => 'BH', 'BRL' => 'BR', 'CAD' => 'CA', 'CHF' => 'CH', 'CNY' => 'CN', 'CZK' => 'CZ', 'DKK' => 'DK', 'EGP' => 'EG', 'EUR' => 'EU', 'GBP' => 'GB', 'HKD' => 'HK', 'INR' => 'IN', 'IQD' => 'IQ', 'IRR' => 'IR', 'ISK' => 'IS', 'JMD' => 'JM', 'JPY' => 'JP', 'KES' => 'KE', 'KRW' => 'KR', 'KWD' => 'KW', 'LKR' => 'LK', 'LYD' => 'LY', 'MAD' => 'MA', 'MUR' => 'MU', 'MXN' => 'MX', 'MYR' => 'MY', 'NGN' => 'NG', 'NOK' => 'NO', 'NZD' => 'NZ', 'OMR' => 'OM', 'PKR' => 'PK', 'PLN' => 'PL', 'QAR' => 'QA', 'RON' => 'RO', 'RSD' => 'RS', 'RUB' => 'RU', 'SAR' => 'SA', 'SEK' => 'SE', 'SGD' => 'SG', 'THB' => 'TH', 'TRY' => 'TR', 'USD' => 'US', 'XAF' => 'CF', 'XOF' => 'CI', 'XPF' => 'PF', 'ZAR' => 'ZA', ]; } public static function isFlutterwaveSupportedCurrencies($code): bool { return array_key_exists(Str::upper($code), self::getFlutterwaveSupportedCurrencies()); } public static function getFlutterwaveCountryCodeByCurrency($currencyCode): ?string { return self::isFlutterwaveSupportedCurrencies($currencyCode) ? self::getFlutterwaveSupportedCurrencies()[$currencyCode] : null; } } app/Enums/BasicPaymentSupportedCurrencyListEnum.php 0000644 00000005312 15012237313 0016603 0 ustar 00 <?php namespace Modules\BasicPayment\app\Enums; use Illuminate\Support\Str; enum BasicPaymentSupportedCurrencyListEnum { public static function getStripeSupportedCurrencies(): array { $allCurrencyCodes = [ 'USD', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BIF', 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BWP', 'BYN', 'BZD', 'CAD', 'CDF', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HTG', 'HUF', 'IDR', 'ILS', 'INR', 'ISK', 'JMD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KRW', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SEK', 'SGD', 'SHP', 'SLE', 'SOS', 'SRD', 'STD', 'SZL', 'THB', 'TJS', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'UYU', 'UZS', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW', 'BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF', 'BHD', 'JOD', 'KWD', 'OMR', 'TND', ]; $nonZeroCurrencyCodes = ['BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF']; $threeDigitCurrencyCodes = ['BHD', 'JOD', 'KWD', 'OMR', 'TND']; $smallestUnitCurrencyCodes = array_diff($allCurrencyCodes, $nonZeroCurrencyCodes, $threeDigitCurrencyCodes); return [ 'all_currency_codes' => $allCurrencyCodes, 'smallest_unit_currency_codes' => $smallestUnitCurrencyCodes, 'non_zero_currency_codes' => $nonZeroCurrencyCodes, 'three_digit_currency_codes' => $threeDigitCurrencyCodes, ]; } public static function isStripeSupportedCurrencies($code): bool { return in_array(Str::upper($code), self::getStripeSupportedCurrencies()['all_currency_codes']); } public static function getPaypalSupportedCurrencies(): array { return ['AUD', 'BRL', 'CAD', 'CNY', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'ILS', 'JPY', 'MYR', 'MXN', 'TWD', 'NZD', 'NOK', 'PHP', 'PLN', 'GBP', 'SGD', 'SEK', 'CHF', 'THB', 'USD']; } public static function isPaypalSupportedCurrencies($code): bool { return in_array(Str::upper($code), self::getPaypalSupportedCurrencies()); } } app/Providers/RouteServiceProvider.php 0000644 00000002707 15012237313 0014147 0 ustar 00 <?php namespace Modules\BasicPayment\app\Providers; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Support\Facades\Route; class RouteServiceProvider extends ServiceProvider { /** * The module namespace to assume when generating URLs to actions. */ protected string $moduleNamespace = 'Modules\BasicPayment\app\Http\Controllers'; /** * Called before routes are registered. * * Register any model bindings or pattern based filters. */ public function boot(): void { parent::boot(); } /** * Define the routes for the application. */ public function map(): void { $this->mapApiRoutes(); $this->mapWebRoutes(); } /** * Define the "web" routes for the application. * * These routes all receive session state, CSRF protection, etc. */ protected function mapWebRoutes(): void { Route::middleware('web') ->namespace($this->moduleNamespace) ->group(module_path('BasicPayment', '/routes/web.php')); } /** * Define the "api" routes for the application. * * These routes are typically stateless. */ protected function mapApiRoutes(): void { Route::prefix('api') ->middleware('api') ->namespace($this->moduleNamespace) ->group(module_path('BasicPayment', '/routes/api.php')); } } app/Providers/.gitkeep 0000644 00000000000 15012237313 0010715 0 ustar 00 app/Providers/error_log 0000644 00000001340 15012237313 0011211 0 ustar 00 [08-May-2025 05:52:14 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Support\Providers\RouteServiceProvider" not found in /home/lekhnath/silverray.com.au/Modules/BasicPayment/app/Providers/RouteServiceProvider.php:8 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/BasicPayment/app/Providers/RouteServiceProvider.php on line 8 [08-May-2025 07:55:18 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\ServiceProvider" not found in /home/lekhnath/silverray.com.au/Modules/BasicPayment/app/Providers/BasicPaymentServiceProvider.php:8 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/BasicPayment/app/Providers/BasicPaymentServiceProvider.php on line 8 app/Providers/BasicPaymentServiceProvider.php 0000644 00000006466 15012237313 0015436 0 ustar 00 <?php namespace Modules\BasicPayment\app\Providers; use Illuminate\Support\Facades\Blade; use Illuminate\Support\ServiceProvider; class BasicPaymentServiceProvider extends ServiceProvider { protected string $moduleName = 'BasicPayment'; protected string $moduleNameLower = 'basicpayment'; /** * Boot the application events. */ public function boot(): void { $this->registerCommands(); $this->registerCommandSchedules(); $this->registerTranslations(); $this->registerConfig(); $this->registerViews(); $this->loadMigrationsFrom(module_path($this->moduleName, 'database/migrations')); } /** * Register the service provider. */ public function register(): void { $this->app->register(RouteServiceProvider::class); } /** * Register commands in the format of Command::class */ protected function registerCommands(): void { // $this->commands([]); } /** * Register command Schedules. */ protected function registerCommandSchedules(): void { // $this->app->booted(function () { // $schedule = $this->app->make(Schedule::class); // $schedule->command('inspire')->hourly(); // }); } /** * Register translations. */ public function registerTranslations(): void { $langPath = resource_path('lang/modules/'.$this->moduleNameLower); if (is_dir($langPath)) { $this->loadTranslationsFrom($langPath, $this->moduleNameLower); $this->loadJsonTranslationsFrom($langPath); } else { $this->loadTranslationsFrom(module_path($this->moduleName, 'lang'), $this->moduleNameLower); $this->loadJsonTranslationsFrom(module_path($this->moduleName, 'lang')); } } /** * Register config. */ protected function registerConfig(): void { $this->publishes([module_path($this->moduleName, 'config/config.php') => config_path($this->moduleNameLower.'.php')], 'config'); $this->mergeConfigFrom(module_path($this->moduleName, 'config/config.php'), $this->moduleNameLower); } /** * Register views. */ public function registerViews(): void { $viewPath = resource_path('views/modules/'.$this->moduleNameLower); $sourcePath = module_path($this->moduleName, 'resources/views'); $this->publishes([$sourcePath => $viewPath], ['views', $this->moduleNameLower.'-module-views']); $this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower); $componentNamespace = str_replace('/', '\\', config('modules.namespace').'\\'.$this->moduleName.'\\'.config('modules.paths.generator.component-class.path')); Blade::componentNamespace($componentNamespace, $this->moduleNameLower); } /** * Get the services provided by the provider. */ public function provides(): array { return []; } private function getPublishableViewPaths(): array { $paths = []; foreach (config('view.paths') as $path) { if (is_dir($path.'/modules/'.$this->moduleNameLower)) { $paths[] = $path.'/modules/'.$this->moduleNameLower; } } return $paths; } } database/factories/.gitkeep 0000644 00000000000 15012237313 0011703 0 ustar 00 database/migrations/2023_11_07_103108_create_basic_payments_table.php 0000644 00000001147 15012237313 0020761 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::create('basic_payments', function (Blueprint $table) { $table->id(); $table->string('key'); $table->text('value'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('basic_payments'); } }; database/migrations/.gitkeep 0000644 00000000000 15012237313 0012100 0 ustar 00 database/migrations/2023_11_09_035236_create_payment_gateways_table.php 0000644 00000001153 15012237313 0021346 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::create('payment_gateways', function (Blueprint $table) { $table->id(); $table->string('key'); $table->text('value'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('payment_gateways'); } }; database/migrations/error_log 0000644 00000001514 15012237313 0012377 0 ustar 00 [16-May-2025 06:26:03 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Migrations\Migration" not found in /home/c7lekhnath/silverray.com.au/Modules/BasicPayment/database/migrations/2023_11_07_103108_create_basic_payments_table.php:7 Stack trace: #0 {main} thrown in /home/c7lekhnath/silverray.com.au/Modules/BasicPayment/database/migrations/2023_11_07_103108_create_basic_payments_table.php on line 7 [16-May-2025 07:21:55 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Migrations\Migration" not found in /home/c7lekhnath/silverray.com.au/Modules/BasicPayment/database/migrations/2023_11_09_035236_create_payment_gateways_table.php:7 Stack trace: #0 {main} thrown in /home/c7lekhnath/silverray.com.au/Modules/BasicPayment/database/migrations/2023_11_09_035236_create_payment_gateways_table.php on line 7 database/seeders/PaymentGatewaySeeder.php 0000644 00000006206 15012237313 0014543 0 ustar 00 <?php namespace Modules\BasicPayment\database\seeders; use Illuminate\Database\Seeder; use Modules\Currency\app\Models\MultiCurrency; use Modules\BasicPayment\app\Models\PaymentGateway; class PaymentGatewaySeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { $payment_info = [ 'razorpay_key' => 'razorpay_key', 'razorpay_secret' => 'razorpay_secret', 'razorpay_name' => 'WebSolutionUs', 'razorpay_description' => 'This is test payment window', 'razorpay_charge' => 0.00, 'razorpay_theme_color' => '#6d0ce4', 'razorpay_status' => 'inactive', 'razorpay_currency_id' => MultiCurrency::where('currency_code', 'INR')->first()?->id, 'razorpay_image' => 'uploads/website-images/razorpay.png', 'flutterwave_public_key' => 'flutterwave_public_key', 'flutterwave_secret_key' => 'flutterwave_secret_key', 'flutterwave_app_name' => 'WebSolutionUs', 'flutterwave_charge' => 0.00, 'flutterwave_currency_id' => MultiCurrency::where('currency_code', 'NGN')->first()?->id, 'flutterwave_status' => 'inactive', 'flutterwave_image' => 'uploads/website-images/flutterwave.png', 'paystack_public_key' => 'paystack_public_key', 'paystack_secret_key' => 'paystack_secret_key', 'paystack_status' => 'inactive', 'paystack_charge' => 0.00, 'paystack_image' => 'uploads/website-images/paystack.png', 'paystack_currency_id' => MultiCurrency::where('currency_code', 'NGN')->first()?->id, 'mollie_key' => 'mollie_key', 'mollie_charge' => 0.00, 'mollie_image' => 'uploads/website-images/mollie.png', 'mollie_status' => 'inactive', 'mollie_currency_id' => MultiCurrency::where('currency_code', 'CAD')->first()?->id, 'instamojo_account_mode' => 'Sandbox', 'instamojo_api_key' => 'instamojo_api_key', 'instamojo_auth_token' => 'instamojo_auth_token', 'instamojo_charge' => 0.00, 'instamojo_image' => 'uploads/website-images/instamojo.png', 'instamojo_currency_id' => MultiCurrency::where('currency_code', 'INR')->first()?->id, 'instamojo_status' => 'inactive', 'sslcommerz_store_id' => 'test669499013b632', 'sslcommerz_store_password' => 'test669499013b632@ssl', 'sslcommerz_image' => 'uploads/website-images/sslcommerz.png', 'sslcommerz_test_mode' => 1, 'sslcommerz_localhost' => 1, 'sslcommerz_status' => 'inactive', 'crypto_sandbox' => true, 'crypto_api_key' => 'WzrKM5s3vzWKj4wDGrz6uJzG81Hdf35pe7ov7Wyv', 'crypto_image' => 'uploads/website-images/crypto.png', 'crypto_status' => 'inactive', ]; foreach ($payment_info as $index => $payment_item) { $new_item = new PaymentGateway(); $new_item->key = $index; $new_item->value = $payment_item; $new_item->save(); } } } database/seeders/.gitkeep 0000644 00000000000 15012237313 0011356 0 ustar 00 database/seeders/BasicPaymentDatabaseSeeder.php 0000644 00000000405 15012237313 0015603 0 ustar 00 <?php namespace Modules\BasicPayment\database\seeders; use Illuminate\Database\Seeder; class BasicPaymentDatabaseSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { // $this->call([]); } } database/seeders/error_log 0000644 00000002036 15012237313 0011655 0 ustar 00 [12-May-2025 13:09:59 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Seeder" not found in /home/lekhnath/silverray.com.au/Modules/BasicPayment/database/seeders/BasicPaymentDatabaseSeeder.php:7 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/BasicPayment/database/seeders/BasicPaymentDatabaseSeeder.php on line 7 [12-May-2025 13:24:13 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Seeder" not found in /home/lekhnath/silverray.com.au/Modules/BasicPayment/database/seeders/PaymentGatewaySeeder.php:9 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/BasicPayment/database/seeders/PaymentGatewaySeeder.php on line 9 [12-May-2025 17:23:34 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Seeder" not found in /home/lekhnath/silverray.com.au/Modules/BasicPayment/database/seeders/BasicPaymentInfoSeeder.php:9 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/BasicPayment/database/seeders/BasicPaymentInfoSeeder.php on line 9 database/seeders/BasicPaymentInfoSeeder.php 0000644 00000003512 15012237313 0014774 0 ustar 00 <?php namespace Modules\BasicPayment\database\seeders; use Illuminate\Database\Seeder; use Modules\BasicPayment\app\Models\BasicPayment; use Modules\Currency\app\Models\MultiCurrency; class BasicPaymentInfoSeeder extends Seeder { public function run(): void { $basic_payment_info = [ 'stripe_key' => 'stripe_key', 'stripe_secret' => 'sk_test_51JU61aF56Pb8BOOXlz7jGkzJsCkozuAoRlFJskYGsgunfaHLmcvKLubYRQLCQOuyYHq0mvjoBFLzV7d8F6q8f6Hv00CGwULEEV', 'stripe_currency_id' => MultiCurrency::where('currency_code', 'USD')->first()?->id, 'stripe_status' => 'active', 'stripe_charge' => 0.00, 'stripe_image' => 'uploads/website-images/stripe.png', 'paypal_app_id' => 'APP-80W284485P519543T', 'paypal_client_id' => 'paypal_client_id', 'paypal_secret_key' => 'paypal_secret_key', 'paypal_account_mode' => 'sandbox', 'paypal_currency_id' => MultiCurrency::where('currency_code', 'USD')->first()?->id, 'paypal_charge' => 0.00, 'paypal_status' => 'active', 'paypal_image' => 'uploads/website-images/paypal.png', 'bank_information' => "Bank Name => Your bank name\r\nAccount Number => Your bank account number\r\nRouting Number => Your bank routing number\r\nBranch => Your bank branch name", 'bank_status' => 'active', 'bank_image' => 'uploads/website-images/bank-pay.png', 'bank_charge' => 0.00, 'bank_currency_id' => MultiCurrency::where('currency_code', 'USD')->first()?->id, ]; foreach ($basic_payment_info as $index => $payment_item) { $new_item = new BasicPayment(); $new_item->key = $index; $new_item->value = $payment_item; $new_item->save(); } } } resources/assets/.gitkeep 0000644 00000000000 15012237313 0011474 0 ustar 00 resources/assets/js/app.js 0000644 00000000000 15012237313 0011575 0 ustar 00 resources/assets/sass/app.scss 0000644 00000000000 15012237313 0012471 0 ustar 00 resources/views/sidebar.blade.php 0000644 00000000325 15012237313 0013100 0 ustar 00 <li class="{{ Route::is('admin.basicpayment') ? 'active' : '' }}"><a class="nav-link" href="{{ route('admin.basicpayment') }}"><i class="fas fa-credit-card"></i><span>{{ __('Basic Payment') }}</span></a></li> resources/views/gateway-actions/bank.blade.php 0000644 00000006546 15012237313 0015514 0 ustar 00 @php $method = $paymentService::BANK_PAYMENT; $bank_information = $paymentService->getGatewayDetails($method)->bank_information ?? ''; @endphp @extends('layout1') @section('title') <title>{{ __('Payment') }}</title> @endsection @section('meta') <meta name="description" content="Payment"> @endsection @section('frontend-content') <section class="wsus__checkout mt_45 mb_45 d-flex align-items-center justify-content-center"> <div class="container d-flex justify-content-center"> <div class="col-md-7"> <div class="card p-3"> <div class="wsus__pay_details card-header bg-transparent"> {!! nl2br($bank_information) !!} </div> <div class="card-body"> <form action="{{ route('subscription.pay-via-bank') }}" method="post"> @csrf <!-- Bank Name --> <div class="my-1 form-group"> <label for="bank_name">{{ __('Bank Name') }} <span class="text-danger">*</span></label> <input type="text" class="form-control" id="bank_name" name="bank_name" placeholder="{{ __('Your bank name') }}" required> </div> <!-- Account Number --> <div class="my-1 form-group"> <label for="account_number">{{ __('Account Number') }} <span class="text-danger">*</span></label> <input type="text" class="form-control" id="account_number" name="account_number" placeholder="{{ __('Your bank account number') }}" required> </div> <!-- Routing Number --> <div class="my-1 form-group"> <label for="routing_number">{{ __('Routing Number') }}</label> <input type="text" class="form-control" id="routing_number" name="routing_number" placeholder="{{ __('Your bank routing number') }}"> </div> <!-- Branch --> <div class="my-1 form-group"> <label for="branch">{{ __('Branch') }} <span class="text-danger">*</span></label> <input type="text" class="form-control" id="branch" name="branch" placeholder="{{ __('Your bank branch name') }}" required> </div> <div class="my-1 form-group"> <label for="branch">{{ __('Transaction') }} <span class="text-danger">*</span></label> <input type="text" class="form-control" id="transaction" name="transaction" placeholder="{{ __('Your bank transaction') }}" required> </div> <button class="common_btn mt-2">{{ __('Submit') }}</button> </form> </div> </div> </div> </div> </section> @endsection resources/views/gateway-actions/razorpay.blade.php 0000644 00000003633 15012237313 0016442 0 ustar 00 @php $method = $paymentService::RAZORPAY; $razorpay_key = $paymentService->getGatewayDetails($method)->razorpay_key ?? ''; $razorpay_name = $paymentService->getGatewayDetails($method)->razorpay_name ?? ''; $razorpay_description = $paymentService->getGatewayDetails($method)->razorpay_description ?? ''; $razorpay_image = $paymentService->getGatewayDetails($method)->razorpay_image ?? ''; $razorpay_theme_color = $paymentService->getGatewayDetails($method)->razorpay_theme_color ?? ''; @endphp <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Razorpay Checkout</title> <style> .razorpay-payment-button{ display: none; } </style> </head> <body> <form action="{{ route('subscription.pay-via-razorpay') }}" method="POST" class="d-none"> @csrf <input type="hidden" name="payable_amount" value="{{ session('paid_amount') }}"> <script src="https://checkout.razorpay.com/v1/checkout.js" data-key="{{ $razorpay_key }}" data-currency="{{ session('payable_currency') }}" data-amount="{{ session('paid_amount') * 100 }}" data-buttontext="" data-name="{{ $razorpay_name }}" data-description="{{ $razorpay_description }}" data-image="{{ asset($razorpay_image) }}" data-prefill.name="{{ auth()->user()?->name }}" data-prefill.email="{{ auth()->user()?->email }}" data-theme.color="{{ $razorpay_theme_color }}"></script> </form> <script> "use strict"; document.addEventListener('DOMContentLoaded', function() { var razorpayButton = document.querySelector('.razorpay-payment-button'); if (razorpayButton) { razorpayButton.click(); } }); </script> </body> </html> resources/views/gateway-actions/mollie.blade.php 0000644 00000000762 15012237313 0016054 0 ustar 00 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Mollie Checkout</title> </head> <body> <a href="{{ route('subscription.pay-via-mollie') }}" id="btn"></a> <script> document.addEventListener('DOMContentLoaded', function() { document.getElementById('btn').click(); }); </script> </body> </html> resources/views/gateway-actions/paypal.blade.php 0000644 00000000761 15012237313 0016060 0 ustar 00 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>PayPal Checkout</title> </head> <body> <a href="{{ route('subscription.pay-via-paypal') }}" id="btn"></a> <script> document.addEventListener('DOMContentLoaded', function() { document.getElementById('btn').click(); }); </script> </body> </html>