donations.php
This commit is contained in:
parent
a085556519
commit
1a44a68894
|
@ -3,12 +3,13 @@
|
||||||
function createDonation($amount) {
|
function createDonation($amount) {
|
||||||
$dolibarrURL = "https://dolibarr.romanschenk.ch/api/index.php/donations";
|
$dolibarrURL = "https://dolibarr.romanschenk.ch/api/index.php/donations";
|
||||||
$BusinesspartnerID = "220";
|
$BusinesspartnerID = "220";
|
||||||
|
$pulicNote = "Automatisch generiert von genderwatchprotocol.com"
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
|
|
||||||
curl_setopt($ch, CURLOPT_URL, $dolibarrURL);
|
curl_setopt($ch, CURLOPT_URL, $dolibarrURL);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
curl_setopt($ch, CURLOPT_POST, 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 = array();
|
||||||
$headers[] = 'Content-Type: application/json';
|
$headers[] = 'Content-Type: application/json';
|
||||||
|
|
Loading…
Reference in New Issue