johnfoster Posted July 4, 2011 Share Posted July 4, 2011 Hey there guys. I have a site where a donate option is available and I want to go about it in a certain way. I'm using Amazons Payment system for accepting donations. Here's what I want to accomplish here. I have an input id box that lets the user type in the amount they wish to donate, then they submit the amount to the site. I need the form to pass the dollar amount entered to amazon so that once you log in through AmazonPayments the amount is already set and ready to go. A clear example of this is on www.kickstarter.com when you decide to "back a project" eg:(http://www.kickstarter.com/projects/adamwparker/fall-a-heart-warming-animated-short-film/pledge/new?clicked_reward=false&logged_in=false&p=0&ref=spotlight&v=u ) and enter a pledge amount. I notice that their amount box has a name of "backing[amount]" and when you click the submit button I know this name is passed to the server with the amount entered.. for example, if I typed in $153 as my pledge and click submit it will appear as backing[amount]=153.0 as one of the parameters in the address bar. Once you continue to Amazon the value of 153.00 is already entered. Does anyone have any info on how they did this with their PHP script? i understand that it's basically an easy form call.. I'm just not sure how they made it talk to AmazonPayments and have there dollar value all entered and ready to go. Again, www.kickstarter.com is the prime example here as that is where I was inspired for this idea. Thanks for all the help. Quote Link to comment https://forums.phpfreaks.com/topic/241042-some-form-help-regarding-submitting-info/ Share on other sites More sharing options...
monkeytooth Posted July 4, 2011 Share Posted July 4, 2011 "backing[amount]" means nothing to the payment gateway specifically per say.. Its just a variable being passed from one script to the next via _GET variables. That's just how they handle their data on their side. I'm not sure kickstarter even goes through the Amazon Payment system either. I can't say that I am super familiar with payment gateways. But I can say if its anything like PayPal, or Authorize.net, or the like. Chances are somewhere in the Amazon API there is a variable to pass in one method or another that their system will recognize and use for plugging in to there forms data that is passed in that manner. But it has to be something their API recognizes not something you can just pass any way you want and expect it to work on their end. Quote Link to comment https://forums.phpfreaks.com/topic/241042-some-form-help-regarding-submitting-info/#findComment-1238138 Share on other sites More sharing options...
johnfoster Posted July 4, 2011 Author Share Posted July 4, 2011 I'm not sure kickstarter even goes through the Amazon Payment system either. In fact they do. If you try testing out and doing a pledge (not actually going through the full process if you don't want to) and you'll see that they go through Amazon. Even when you're making a pledge they have the Amazon Payment's logo at the bottom of the right menu. I'll look in to working and tweaking with the Amazon API.. hopefully it's not too painful. Quote Link to comment https://forums.phpfreaks.com/topic/241042-some-form-help-regarding-submitting-info/#findComment-1238266 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.