Custom PayPal Button

I have this button:
 
<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="UR75CF23R9MC8">
<input type="hidden" name="amount" value="45.34">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
 
When I click it, I would like the value of the 'amount' field to auto-populate the Item Price field when redirected to PayPal.
 
1). Is this even possible?
2). Am I using the wrong variable name?
3) Is something else wrong or missing in the form code?
mosemadlAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew AngellCo-Owner / DeveloperCommented:
You can't do it with a hosted button.  You need to create a button and disable the "Save at PayPal" option at Step 2 of the button creation wizard in PayPal.

Alternatively, you can build your form directly using the PayPal HTML/Standard Variables.  You can read about the "cart upload method" for more details on that.
0
mosemadlAuthor Commented:
I've got this now:

<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="amount" value="45.35">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHTwYJKoZIhvcNAQcEoIIHQDCCBzwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQ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BAHvPCX0tMmsjHrmuDnepIPQvCp/2G2r0qUJbWPAs6HPttZASqa6xEDi/cD92qLFb7qc4EE3ek872BPx-----END PKCS7-----
">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
</form>

The amount is still not auto populating.

I know you gave me another method, but my form is created with a plugin in Wordpress which is pretty complicated and I'd really like to just redirect to a URL with an amount variable on the end.
0
Andrew AngellCo-Owner / DeveloperCommented:
Which plugin are you using?  That one looks like it has a bunch of garbage in it.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

mosemadlAuthor Commented:
Don't know what you mean by a bunch of garbage. What I pasted came from PayPal not the plugin.
0
Andrew AngellCo-Owner / DeveloperCommented:
OK, so now you must have chosen an encrypted button then..??  You can't use encrypted/hosted buttons.  It's going to have to be completely static if you're wanting to dynamically set pricing.
0
mosemadlAuthor Commented:
Is it possible for you to create this type of button and post screenshots of the settings in each step?
0
Andrew AngellCo-Owner / DeveloperCommented:
The documentation I linked you to has samples.  This is pulled directly from that.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="seller@dezignerfotos.com">
<input type="hidden" name="item_name_1" value="Item Name 1">
<input type="hidden" name="amount_1" value="1.00">
<input type="hidden" name="shipping_1" value="1.75">
<input type="hidden" name="item_name_2" value="Item Name 2">
<input type="hidden" name="amount_2" value="2.00">
<input type="hidden" name="shipping_2" value="2.50">
<input type="submit" value="PayPal">
</form>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mosemadlAuthor Commented:
Oh - that is awesome!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
E-Commerce

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.