简体   繁体   中英

c# ASP.Net WebForm E-Commerce Payment Integration

For the purpose of learning ASP.Net i have created an ASP.Net website which its theme is a small local hotel company has setup a website where people can become members on the website view the available hotels to make a reservation.

I've come to the point where i need to integrate some sort of payment system onto my website, i've done some research and if i want the user to pay via credit card i would need to setup SSL etc. Something which at this stage (Beginner) i'm not looking to learn.

However i think i can setup a paypal system, i'm just not sure how and if its possible to do the things i want.

1.Make Payment For Specific hotel, price is based on the users chosen checkin and checkout date. My database has a price per night column in the room table. 2. Store Payment History would i need to setup an SQL table for this or is this done by paypal. 3.^ Relating to previous, if user pays i need the option to allow them to cancel there reservation which then there paypal payment also needs to be cancelled. 4. If they reserve a room or cancel a reservation email needs to be sent.

If you know of a tutorial which covers this basic e-commerce for c# asp.net web form and utilities a paypal system let me know aswell!.

Make sure that "becoming a member" is not a pre-requisite to renting a room.

The biggest problem with PayPal/ASPNET is the fact that ASPNET only allows a single form tag per page. Here's a solution to that (disclaimer: my own blog posts):

http://www.codersbarn.com/?tag=/paypal (three posts)

You should also utilize IPN for payment verification - see the PayPal documentation . Users do not need to be PayPal members to use their credit cards securely. You will need to set up a secure certificate on your server however.

As for cancellations, they can notify the hotel owner who can then use the PayPal admin to apply the refund - very straightforward. This is a manual process; keep it simple.

Regarding payment history, PayPal does this but it not a satisfactory way of doing it. Set up your own orders table (with a 'confirmed' field) and update the confirmed field when the payment is authorized (via IPN). You'll also update this in the event of a cancellation.

Check out Rick Strahl's article .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM