Jump to content

Hard to explain question


Rifts

Recommended Posts

Sorry this may sound insane.

 

Is there anyway to accomplish this,

 

using paypal you can creat buy it now buttons and whatnot. The problem with these is you set the price of the time when making the button.

Is there a way to set the price with php thus creating a dynamic price instead of a static one?

 

I know you can send paypal vars. but is there a way to edit the price?

 

Thanks I hope that makes sense at all

Link to comment
Share on other sites

Sorry this may sound insane.

 

Is there anyway to accomplish this,

 

using paypal you can creat buy it now buttons and whatnot. The problem with these is you set the price of the time when making the button.

Is there a way to set the price with php thus creating a dynamic price instead of a static one?

 

I know you can send paypal vars. but is there a way to edit the price?

 

Thanks I hope that makes sense at all

 

Wouldn't you just take the form value and change it with your php?

 

Like in https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_techview_outside it shows the value on the top example as 12.99, couldn't you just change the value like:

 

name="amount" value="<?=$thisnewamount;?>"

Link to comment
Share on other sites

I know more that just a transaction ID and paypal variables come back to you on the thank you page, based on variables you supply through the form fields being posted. I just tried looking for the specific doc file on it but can't find it, I think its mentioned in a hard copy I have somewhere. Anyway the point I am tempting to make is seeing as the price is merely put out there via form element, and theres various ways to bypass said coded in price through external means or browser based means with things like grease monkey, and the ability to run script locally prior to page load through some browsers. That said I think you should generate a sha1 hash with various variables going into it, such as the item number, item price, some hard coded values (or 3).. something that can be created as the form is shown on the user side, then recreated in a similar fashion on the thank you page. That way if it matches up from start to finish you can do what ever the thank you page would be intended for, recipte, download, redirect, whatever. where if it doesnt let the user know the transaction failed somewhere and they need to contact you for further support.

 

Otherwise leaving your button open like that just leaves the ability to exploit the hell out of your reason for wanting the button in the first place and then before you know it youve sold 500 copies of whatever but havent made a dime... food for thought is all. I know this doesnt help things I know this complicates things from easy copy and paste to now figuring something out along the lines of my mentions here.. but ask yourself, would you rather deal with it now, or after having lost money?

Link to comment
Share on other sites

I would have to ask are you trying to change the $ amount via a form where someone puts in the amount they want to pay or via a php variable? If your doing a shopping cart type thing then in the coding for the paypal button just change the value for the amount to either a $_POST[value] or a $var that will be pulled in from the page before.

 

If your doing it on the same page with a form filed like a donation script then you would need to use java so once they change the value the java runs and changes the amount value.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.