feat: wire discord and paypal configs to panel settings
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/6163aa0e-000d-4376-ad24-9f63a04f4d95 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
c1d7c27b35
commit
428bccb6ac
14 changed files with 336 additions and 134 deletions
|
|
@ -94,24 +94,10 @@ function exec_ogp_module()
|
|||
|
||||
|
||||
|
||||
//WEBHOOK Discord=======================================================================================
|
||||
|
||||
$webhook = "https://discord.com/api/webhooks/1087807080657854484/yYtW8q63xKj3rTFYrNfW2LJk_GeC_WtuI8eJOyELxWbqTQ-uMzOO2I9qofoJCoHXFhC1";
|
||||
//$webhook = "https://discord.com/api/webhooks/710275918274363412/g5Tr-EUdEnLfFryOlscxJ6FuPiSJuE6EMKRYmh9UGMiqTUxU5-y9CQrBlDJW7znr0Tol";
|
||||
|
||||
//WEBHOOK Discord=======================================================================================
|
||||
$discord_settings = $db->getSettings();
|
||||
$msg = "Server support ticket created:\n"."ServerID: " .$_POST['ticket_service'] ."\n". "Subject: " .$_POST['ticket_subject'];
|
||||
$json_data = array ('content'=>"$msg");
|
||||
$make_json = json_encode($json_data);
|
||||
$ch = curl_init( $webhook );
|
||||
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
|
||||
curl_setopt( $ch, CURLOPT_POST, 1);
|
||||
curl_setopt( $ch, CURLOPT_POSTFIELDS, $make_json);
|
||||
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_setopt( $ch, CURLOPT_HEADER, 0);
|
||||
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
$response = curl_exec( $ch );
|
||||
//If you need to debug, or find out why you can't send message uncomment line below, and execute script.
|
||||
//echo $response;
|
||||
ogp_send_discord_notification($discord_settings, $msg, 'notify_server_events');
|
||||
//end WEBHOOK Discord
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue