donations.php

This commit is contained in:
schrom01 2023-02-16 14:51:56 +01:00
parent a085556519
commit 1a44a68894
1 changed files with 2 additions and 1 deletions

View File

@ -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';