From 1a44a6889413bf3043301750cac08f1c0c15a799 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Thu, 16 Feb 2023 14:51:56 +0100 Subject: [PATCH] donations.php --- donations/donations.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/donations/donations.php b/donations/donations.php index 4a32bdf..01b2cfa 100644 --- a/donations/donations.php +++ b/donations/donations.php @@ -3,12 +3,13 @@ function createDonation($amount) { $dolibarrURL = "https://dolibarr.romanschenk.ch/api/index.php/donations"; $BusinesspartnerID = "220"; + $pulicNote = "Automatisch generiert von genderwatchprotocol.com" $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $dolibarrURL); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"amount\": ".$amount.", \"date\": 1676545200, \"societe\": ".$BusinesspartnerID."}"); + curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"amount\": ".$amount.", \"date\": 1676545200, \"socid\": ".$BusinesspartnerID.", \"note_public\": ".$pulicNote."}"); $headers = array(); $headers[] = 'Content-Type: application/json';