Merhabalar,
Araştırıp bir şeyler yapmaya çalıştım benim işime yarıyor sizin de ihtiyacınız var ise buyurun alıp kullanabilirsiniz. Ürün adını veri olarak alamıyorum sadece ürün adını almayı biliyorsanız yazarsanız sevinirim.
Gerekli yerleri doldurup kullanmaya başlayabilirsiniz.

<?php
$username='osb kullanıcı adı';
$key='osb şifre';
$webhookurl = "discord webhook url";
//Gelmesi gereken veriler kontrol edilir.
if (!( (isset($_POST['res'])) && (isset($_POST['hash'])))) {
echo "missing parameter";
die();
}
//Özet kontrolü yapılır.
$hash=hash_hmac('sha256',$_POST['res'].$username,$key,false);
if (strcmp($hash,$_POST['hash'])!=0) {
die();
}
//Veriler alınır.
$json_result=base64_decode($_POST['res']);
$array_result=json_decode($json_result,true);
//Verilerle ilgili yapmanız gereken işlemleri yapınız.
//Bildirim çeşitli ağ sorunları nedeni ile birden fazla kez gelebilir.
//İlk olarak orderid parametresini kullanıp siparişin işlenme durumunu kontrol ediniz.
$email=$array_result['email']; // e posta
$orderid=$array_result['orderid']; // Sipariş ID
$currency=$array_result['currency']; // 0..TL, 1..USD, 2...EUR
$price=$array_result['price']; // fiyat
$buyername=$array_result['buyername']; // Müşteri adı
$buyersurname=$array_result['buyersurname']; // Müşteri soy adı
$productcount=$array_result['productcount']; // Ürün miktarı
$productid=$array_result['productid']; // Ürün ID
$customernote=$array_result['customernote']; //Müşterinizin siparişte doldurduğu not alanı
$istest=$array_result['istest']; //0..canlı, 1..test
if($currency == "0") $birim = '₺';
if($currency == "1") $birim = '$';
if($currency == "2") $birim = '';
if($customernote === true) $musterinotu = $customernote;
else $musterinotu = "Bulunmuyor.";
//İşlem başarılı olduğunda success yazılarak OSBnin başarılı geldiği doğrulanmış olunur.
$basarili = "success";
if ($basarili == "success") {
echo "success";
$timestamp = date("c", strtotime("now"));
$json_data = json_encode([
"content" => "Bir ödeme alındı <@&bildirim almak istediğiniz rol id>",
"username" => "$buyername $buyersurname",
"avatar_url" => "https://cdn.discordapp.com/avatars/553548136728231976/d674ebe45820805934cba909452082ac.png?size=4096",
"tts" => false,
"embeds" => [
[
"type" => "rich",
"description" => "1 Aylık $productcount adet sipariş alındı!",
"timestamp" => $timestamp,
"color" => hexdec( "f5f5f5" ),
"fields" => [
[
"name" => "Müşteri Adı Soyadı",
"value" => "$buyername $buyersurname",
"inline" => true
],
[
"name" => "Müşteri E-posta",
"value" => "$email",
"inline" => true
],
[
"name" => "Sipariş ID",
"value" => "#$orderid",
"inline" => true
],
[
"name" => "Ürün adı",
"value" => "1 Aylık",
"inline" => true
],
[
"name" => "Ürün adeti",
"value" => "$productcount adet",
"inline" => true
],
[
"name" => "Ürün fiyatı",
"value" => "$price $birim",
"inline" => true
],
[
"name" => "Müşteri açıklaması",
"value" => "$musterinotu",
"inline" => true
]
]
]
]
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE );
$ch = curl_init( $webhookurl );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $json_data);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec( $ch );
curl_close( $ch );
}
?>