donations.php

This commit is contained in:
schrom01 2023-02-16 14:36:53 +01:00
parent de0d09f9c8
commit 3995f8af9f
1 changed files with 11 additions and 1 deletions

View File

@ -23,4 +23,14 @@ function createDonation($amount) {
return $result;
}
var_dump(createDonation(50));
function forwardToDonationPage($amount){
$payment_link = "https://dolibarr.romanschenk.ch/public/payment/newpayment.php?source=donation&ref=".(createDonation($amount))."&securekey=NSmKzZ73HW1zWO8nAlpdq95mDt77Q32o";
header('Location: '.$payment_link);
}
$amount = (float)($_GET["amount"]);
if(is_numeric($amount)) {
forwardToDonationPage($amount);
} else {
echo "invalid amount!";
}