?

áEÓê€ÎïLwebshll2019

Current Path : /home/webyoo/www/backup/allback/docteur-site/cv/sym/a/hanessiim/site/admin/
Upload File :
Current File : /home/webyoo/www/backup/allback/docteur-site/cv/sym/a/hanessiim/site/admin/payment_pelecard_new.php

<?php
include_once "start.php";
// $apiUrl = "https://gateway21.pelecard.biz/services/DebitRegularType"; // Remplacez par l'URL de l'API de Pelecard
// $apiKey = "your_api_key"; // Remplacez par votre clé API
// $userId = "your_user_id"; // Remplacez par votre ID utilisateur

// // Détails de la transaction
// $transactionData = [
//     "terminalNumber" => '2813398013',
//     "user" => 'happy',
//     "password" => 'q6BhhmXV',
//     "shopNumber" => '001',
//     "creditCard" => '458045804580',
//     "creditCardDateMmYy" => '1219',
//     "total" => 1000,
//     "currency" => 1
// ];

// // Convertir les données en JSON
// $dataString = json_encode($transactionData);

// // Initialiser cURL
// $ch = curl_init($apiUrl);

// // Configurer les options cURL
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// curl_setopt($ch, CURLOPT_HTTPHEADER, [
//     'Content-Type: application/json',
//     'Content-Length: ' . strlen($dataString),
// ]);
// curl_setopt($ch, CURLOPT_POST, true);
// curl_setopt($ch, CURLOPT_POSTFIELDS, $dataString);

// // ExĂ©cuter la requĂȘte et obtenir la rĂ©ponse
// $response = curl_exec($ch);

// // Fermer la session cURL
// curl_close($ch);

// // Vérifier et traiter la réponse
// $responseData = json_decode($response, true);
// print_r($responseData);
// if ($responseData && isset($responseData['Success']) && $responseData['Success']) {
//     echo "Transaction successful: " . $responseData['TransactionId'];
// } else {
//     echo "Transaction failed: " . $responseData['ErrorMessage'];
// }

?>

<?php
// "terminalNumber" => '2813398013',
// "user" => 'happy',
// "password" => 'q6BhhmXV',
// "shopNumber" => '001',
// "creditCard" => '458045804580',
// "creditCardDateMmYy" => '1219',
// "total" => 1000,
// "currency" => 1
// echo $_POST['amount'];
// echo $_POST['id_user'];
if (isset($_POST['amount']) && $_POST['amount'] > 0 && $_POST['id_user'] > 0) {
    
    $data = array(
    "terminal" => "2813398013",
    "user" => "happy",
    "password" => "q6BhhmXV",
    "ActionType" => "J4",
    "Currency" => "1",
    "FirstPayment" => "auto",
    "FreeTotal" => "False",
    "MaxPayments" => "12",
    "MinPayments" => "1",
    "MinPaymentsForCredit" => "7",
    "ParamX" => $_POST['id_user'].'~~'.$_POST['amount'],
    "ShopNo" => "001",
    "Total" => $_POST['amount']*100,
    "ErrorURL" => "https://hanesiim.com/admin/return_page_new.php",
    "GoodURL" => "https://hanesiim.com/admin/return_page_new.php",
    "FeedbackOnTop" => "False",
    "UseBuildInFeedbackPage" => "False",
    "CssURL" => "https://gateway20.pelecard.biz/Content/Css/variant-he-3.css",
    "HiddenPciLogo" => "False",
    "HiddenPelecardLogo" => "False",
    "HiddenSslSeal" => "False",
    "Language" => "HE",
    "LogoURL" => "https://gateway20.pelecard.biz/Content/images/Pelecard.png",
    "PlaceholderCaptions" => "False",
    "ShowBrandLogo" => "False",
    "ShowConfirmationCheckbox" => "False",
    "ShowXParam" => "False",
    "SplitCCNumber" => "False",
    "AddHolderNameToXParam" => "False",
    "TakeIshurPopUp" => "False",
    "SupportedCards" => array(
    "Amex" => "False",
    "Diners" => "False",
    "Isra" => "False",
    "Master" => "False",
    "Visa" => "False"
    ),
    "EmvPinpad" => "False",
    "CardHolderName" => "hide",
    "CustomerIdField" => "optional",
    "Cvv2Field" => "optional",
    "EmailField" => "hide",
    "TelField" => "hide",
    "CreateToken" => "False"
    );

    $jsonData = json_encode($data);
    $ch = curl_init('https://gateway20.pelecard.biz//PaymentGW/init');
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded; charset=UTF-8','Content-Length: ' . strlen($jsonData))
    );
    $result = curl_exec($ch);
    $serverData = json_decode($result,true);
    // echo "test3";
    // print_r($serverData);
    if($serverData['URL'] != "") {
        // Découper l'URL sur le signe égal (=)
        $parts = explode('=', $serverData['URL']);
        // Vérifier qu'il y a bien une partie droite
        $transactionID = isset($parts[1]) ? $parts[1] : '';
        //echo "Transaction ID : " . $transactionID;
        if($transactionID != "") {
            // Enregistrer le numéro de transaction dans la base de données
            $query = mysqli_query($link,"INSERT INTO syna_payments SET id_user = '".$_POST['id_user']."',fullname = '".$_POST['fullname']."',email = '".$_POST['email']."', tel = '".$_POST['tel']."', amount = '".$_POST['amount']."', type_payment = 1, num_transaction = '".$transactionID."', date_payment = NOW()");
        }
        // echo "Transaction Success : ".$serverData['URL'];
        header("Location: ".$serverData['URL']);
    }else{
        echo "Transaction Failed : The URL is incorrect.";
    }
}else{
    echo "Transaction Failed : The amount is incorrect.";
}


?>




web shell, Coded By 2019