I have implemented PayPal Gift Aid / Donate as a separate SDK by following this documentation PayPal Donate SDK. But how can I add this Donate functionality to regular PayPal payment as a checkbox just like the attached screenshot Donor opt into Gift Aid. Plus how can I test it on sandbox?
2 Answers
I believe the Paypal buttons are rendered out by their API, I don't think there is a way to change the button that is generated.
Personally, I would consider doing a custom checkout and adding a separate checkbox that will trigger the "Donate" function to add an extra amount to the checkout.

- 13
- 5
Gift Aid is a UK-specific tax adjustment. It is part of the Donation flow already when UK payers donate. This does not seem to be what your question is actually trying to ask about, so you may wish to clarify.
Adding donations onto a regular (non-donation) checkout of some sort is something you would do on your own site, prior to reaching PayPal, which would process the total as a regular checkout, perhaps with some line item indicating what portion is a donation. If this doesn't work for you, then use separate buttons and transactions.

- 27,642
- 4
- 24
- 44