parent
9cc8fb405c
commit
ec71770847
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
echo "test";
|
||||
//echo date();
|
||||
echo "test2";
|
||||
echo mktime();
|
||||
$dolibarrURL = "https://dolibarr.romanschenk.ch/";
|
||||
function createDonation($amount, $dolibarrURL) {
|
||||
$BusinesspartnerID = "220";
|
||||
|
@ -12,7 +8,7 @@ function createDonation($amount, $dolibarrURL) {
|
|||
curl_setopt($ch, CURLOPT_URL, $dolibarrURL."api/index.php/donations");
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"amount\": ".$amount.", \"date\": 1676545200, \"socid\": ".$BusinesspartnerID.", \"note_public\": \"Automatisch generiert von genderwatchprotocol.com\"}");
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"amount\": ".$amount.", \"date\": ".time().", \"socid\": ".$BusinesspartnerID.", \"note_public\": \"Automatisch generiert von genderwatchprotocol.com\"}");
|
||||
|
||||
$headers = array();
|
||||
$headers[] = 'Content-Type: application/json';
|
||||
|
|
Loading…
Reference in New Issue