vendredi 8 mai 2020

Can I use an URL parameter as input for Paypal button text?

I am trying to build my very first website. I do not have a lot of experience and need some help with PayPal buttons.

My website is created on Wordpress using Elementor. I have a PayPal button on a page where there is a parameter available in the URL, something like:

https://ift.tt/3beuXZR

The parameter "your-email" is sent from an input form. I want this email filled in the Paypal button text.

I created a PayPal button on the PayPal website and received following code:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXXXXXXXX">
<table>
<tr><td><input type="hidden" name="on0" value="Text">Text</td></tr><tr><td>
<input type="text" name="os0" maxlength="200"></td></tr>
</table>
<input type="image" src="https://www.paypalobjects.com/en_US/BE/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/nl_NL/i/scr/pixel.gif" width="1" height="1">
</form>

I want to automatically fill the e-mail parameter from the URL in the text field. Is there a way I can alter the PayPal button to take the value "name.surname@mail.com" from the URL and fill it in Text field?

Thanks for any help!




Aucun commentaire:

Enregistrer un commentaire