homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / Ecommerce
Forum Library, Charter, Moderators: buckworks

Ecommerce Forum

pass amount by hidden input

WebmasterWorld Senior Member 10+ Year Member

Msg#: 4550073 posted 10:31 am on Mar 1, 2013 (gmt 0)

I have the user to fill in the amount, however that gives problems as they cant fill in the right side before filling in the amount, and some does not see paypals error.

So I want to prefill the amount in with the value in a var.
It does not work, and I read that it does not work on hosted buttons, so this

<input type="hidden" name="cmd" value="_s-xclick">

needs to be changed to

<input type="hidden" name="cmd" value="_xclick">

The first encrypts the data sent by the form.

I sort of prefer the hosted button as that is safer and the button is encrypted.

Is there anyway to pass the value of amount dynamically using there hosted buttons?

I had a look at encrypting the button myself, but looks to complicated to me.
Any ideas.



WebmasterWorld Senior Member 10+ Year Member

Msg#: 4550073 posted 1:02 pm on Mar 3, 2013 (gmt 0)

Well I found out, that I need to encrypt the form myself, wich is not as easy, being 2 days, got the certificates with openSSL and everything, however the rest....
I found this in another forum, but I just cant understand how to implent it, and how it can work:
You don't have to encrypt. Simply take the 'custom' variable, and, among other things you might need to put in there, add a hash of the price and product number, like so:

$sCustom .= '|' . md5($sSalt . $sProduct . $sPrice);

Then, when the IPN is processed, ensure that this hash was not disturbed with what is received back. If it was, then block the transaction."


WebmasterWorld Administrator lorax us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 4550073 posted 2:37 pm on Mar 3, 2013 (gmt 0)

Have you looked at the MD5 examples here: [php.net...]

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Ecommerce
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved