donations.php
This commit is contained in:
parent
de0d09f9c8
commit
3995f8af9f
|
@ -23,4 +23,14 @@ function createDonation($amount) {
|
||||||
return $result;
|
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!";
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue