PDA

View Full Version : paypal with asp


ghell
03-11-2005, 09:25 AM
i saw a component once that let you use paypal in asp, im not so much looking for that component now as trying to work out how paypal works, i set up a premium account yesterday and i have looked at the html forms for shopping carts etc but noticed a few things (which are probably fixed on the paypal site but i havnt got an answer from them yet) such as you could edit the html on someones page to change the price of an item without changing the name, and there is no http_referer check or anything, and it doesnt just send an item code and let their site calculate the price for you
also you are limited to add to basket buttons so you couldnt use a checklist or anything

anyway, these are probably fixed but is there any way to do anything with paypal in asp appart from storefront components (i have seen a few "components" around that are just a set of asp pages that are linked to a database you set up and it does it for you, which is probably pretty much for people who want that system without knowing how to code it)
in particular i want to just stop people from changing the price, but as i said this is probably already fixed on paypal somehow

ps: if this is against the rules because i would be making money out of it or anything, im sorry, its not like i want to sell someone elses work but i havnt read the rules in a couple of years :p

Bullschmidt
03-15-2005, 07:21 AM
Yes I've usually just done a link to PayPal based on the total and other things in the querystring. But it does seem like a user could copy that Web address and change the total or something but of course the people running the site would hopefully notice malicious things like that before placing the order or whatever.

So here're the PayPal resources I've used.

You can set what page on your site that PayPal is to go to if there was success and you can set another page for if there was a cancel. And these URLs CAN contain a query string such as http://www.mysite.com/mypage.asp?paypalstatus=success and of course could include a user ID or transaction ID or something too.

PayPal
http://www.paypal.com
Then click on Merchant Tools.

Buy Now Buttons
http://www.paypal.com/cgi-bin/webscr?cmd=p/xcl/rec/singleitem-intro-outside

Buy Now Buttons Manual (PDF)
https://www.paypal.com/html/single_item.pdf
Especially see p. 20 "Sample HTML Code for a Buy Now Button"
And p. 21 "Sample Buy Now Hyperlink" and HTML and Hyperlink Variables

PayPal Developer Central
https://developer.paypal.com
Need to log in to use.