I am using contact form 7 plugin in my blog.I am having donate option in the form with price option in radio button. user can select and submit.After submitting the form it should redirect to the paypal. with selected price .
i tried
on_sent_ok: “location =
‘https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_xclick&business=xxxx@india.com¤cy_code=USD&amount=100&return=http://http://cratecreative.com/norpac&item_name=contribution’;”
in additional option in form management. But here value of price is static . I need to change that value what user selects.
Thanks in advance
First change the `on_sent_ok’ to:
then create that
my_redirect()
function in the page that displays the form:and done!
Just make sure that you correct the email in that url and replace
PRICE_FIELD
with the actual id of the price field.This whole code goes in the additional settings box, changing the “xxxx@example.com” to your Paypal email and the
"amount=100"
to your own amount ex-"amount=25"
or"amount="50"
. Also be sure to change the “return” page to your own URL once they complete the payment: