- Help Center
- Integrations
- Marketing Integrations
Creating a homemade integration with your database
Pass donation data to your server
Every time new donation happens, the donationComplete event fires. Assuming you have jQuery installed on the frontend and donations.php on your backend, your code can be something like this:
<script>
FundraiseUp.on('donationComplete', function(details) {
$.ajax({
type: "POST",
url: "https://helping-hand.org/donations.php",
data: details
});
});
</script>
Process submission on your server
Now you have donation data passed to your script (assuming you are using PHP), just continue to write it to your database using your ORM
// Takes raw data from the request
$json = file_get_contents('php://input');
// Converts it into a PHP object
$data = json_decode($json);
// Write data to your database
// .........