Jun 04 2007

Creating a simple paypal shop

Posted by admin under Commerce and payment

ALL ARTICLES IN THIS SERIE

There are hundreds (???) of examples on how to create a Paypal shop with ASP.NET so why should I write an article myself? Because ny solution fills a void. This solution will let you

- create a shopping cart solution where users can add/delete items from your shop

- when done checkout will take the user to the paypal payment page

- implement a solution which does NOT use IDN (i.e just created with a simple redirect ) - but still it will use our own (yours) shopping cart (not the paypal one) and the user will be abile to view all items purchased at Paypal (not only a total sum)

So, all in all, it works in medium trust, it uses our own hosted shopping cart (which could give you the options to implement extra features such as discounts etc, not to talk about the most obvious part - products and prices are only stored in your own database and not also at Paypal).

This is pretty much the same solution I have implemented in the  AdMentor shop . I have though simplified it a bit and just statically created the products (from code).

Lets first look at how it looks:

 Here's the buy page, which includes a product listing and the shopping cart:

 

 When clicking on Add to cart:

When changing the quantity of an item the shopping cart recalculates (done serverside) - so by setting quantity to 0 (zero) removes an item from the shopping cart.

Continue in part 2

ASPCode.net recommends