php - PayPal donation URL with cover fee checkbox on

A PayPal account can have different email addresses: each of them reserved for receiving specific donations. This allows the account owner to sort them easily, because he can export a CSV report and filter donations by the recepient email address chosen by each benefactor.
To receive donations for a specific email address, I used to manually build a direct URL in this way:
...paypal.com/cgi-bin/webscr?cmd=_donations&business=[email protected]&lc=US&item_name=Donation+custom+purpose&no_note=0&cn=¤cy_code=EUR&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted
However, the new PayPal donation button builder also gives the opportunity to add a surcharge to the donation "to help offset the cost of processing": screenshot of PayPal cover fee checkbox.
Unlike the previous one, this page can be reached from a link created by PayPal:
...paypal.com/donate/?hosted_button_id=*************
But donation URLs based on button ids cannot direct money to those specific email addresses.
So the question is:
- Is there a way to manually create a donation URL link the first one, that also activates the cover-fee option?
- Alternatively: is there a way to create a custom donation button linked to a specific email address?
Here is the HTML code block of the "cover-fee" checkbox:
<div class="ppvx_checkbox___3-6-2 cover-fee-checkbox">
<input class="ppvx_checkbox__input___3-6-2" type="checkbox" id="cover-fee-checkbox" name="coverFee" data-testid="cover-fee-checkbox" value="false">
<label class="ppvx_checkbox__label___3-6-2 ppvx_checkbox__label--with-svg-icon___3-6-2" for="cover-fee-checkbox">
<span class="ppvx_checkbox__check-icon-container___3-6-2">
<span class="ppvx_icon--svg___6-7-8 ppvx_icon--size_xs___6-7-8 ppvx_checkbox__check-icon___3-6-2">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="1em" height="1em" fill="currentColor">
<path d="M5.566 14.417l-3.272-3.266a.996.996 0 0 1-.001-1.414 1.002 1.002 0 0 1 1.414-.002l2.566 2.561 8.02-8.004a.998.998 0 0 1 1.416.001 1.001 1.001 0 0 1-.002 1.415L6.98 14.417a1 1 0 0 1-1.414 0z"></path>
</svg>
</span>
</span>
<span>I’d like to add <strong id="fee-amount"></strong> to my donation to help offset the cost of processing
</span>
</label>
</div>
Answer
Solution:
Unfortunately, the answers are no.
You cannot create a "hosted" button that accepts a URL parameter to pay a different account/email address.
You cannot create a custom/unhosted button or url that will show the checkbox for fees ("I’d like to add to my donation to help offset the cost of processing")
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: string literal contains an unescaped line break
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.