e8e1b8ea2f
ref PLG-160 - Refactored donation handling logic to be processed within the `checkout.session.completed` webhook event. - Added support for capturing and storing donation messages from Stripe sessions. - Integrated donation messages into the email notifications sent to staff. - Added database integration. - Removed redundant donation logic from the invoice.payment_succeeded webhook, since custom fields isn't supported. - Updated and added new tests --------- Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
16 lines
515 B
JavaScript
16 lines
515 B
JavaScript
module.exports = function (data) {
|
|
// Be careful when you indent the email, because whitespaces are visible in emails!
|
|
return `
|
|
Cha-ching!
|
|
|
|
You received a one-time payment from of ${data.donation.amount} from "${data.donation.name}".
|
|
|
|
Message: ${data.donation.donationMessage ? data.donation.donationMessage : 'No message provided'}
|
|
|
|
---
|
|
|
|
Sent to ${data.toEmail} from ${data.siteDomain}.
|
|
If you would no longer like to receive these notifications you can adjust your settings at ${data.staffUrl}.
|
|
`;
|
|
};
|