donations.php
This commit is contained in:
parent
d788e22471
commit
80ea8c84f9
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
function createDonation($amount) {
|
||||
// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
|
||||
$ch = curl_init();
|
||||
|
||||
curl_setopt($ch, CURLOPT_URL, 'https://dolibarr.romanschenk.ch/api/index.php/donations');
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"amount\": 50, \"date\": 1676545200}");
|
||||
|
||||
$headers = array();
|
||||
$headers[] = 'Content-Type: application/json';
|
||||
$headers[] = 'Accept: application/json';
|
||||
$headers[] = 'Dolapikey: 4mQX4x4x65MlkGZ9HUD5A4oElqTn92kl';
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||
|
||||
$result = curl_exec($ch);
|
||||
if (curl_errno($ch)) {
|
||||
echo 'Error:' . curl_error($ch);
|
||||
}
|
||||
curl_close($ch);
|
||||
}
|
||||
|
||||
echo createDonation(50);
|
|
@ -155,12 +155,13 @@
|
|||
</td>
|
||||
<td class="footer">
|
||||
<div class="col-12">
|
||||
<p><span><b>Erstellt durch</b></span><br>
|
||||
<ap><span><b>Erstellt durch</b></span><br>
|
||||
Silias KLG<br>
|
||||
Toggenburgstrasse 31<br>
|
||||
8245 Feuerthalen<br>
|
||||
<a href="https://www.silias.ch" target="_blank">www.silias.ch</a><br>
|
||||
<a href="mailto:info@silias.ch">info@silias.ch</a></p>
|
||||
<a href="mailto:info@silias.ch">info@silias.ch</a><br><
|
||||
<a href="https://gitea.silias.ch/Silias-Public/genderwatchprotocol">Projekt Repository</a><p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue