10

I'm developing a web application, using ASP.net and C#

  • need to provide a functionality through which users can pay through their cards (Credit card, Master card, Visa card, Debit card etc.)

  • how do i process a transaction, means that when user enter payment details and click on pay button,

  • how do i verify that these payment details are valid and money is transferred to merchant account.

I never handle payments before, so where do i start with?

Amarnath Balasubramanian
  • 9,300
  • 8
  • 34
  • 62
Jame
  • 21,150
  • 37
  • 80
  • 107

6 Answers6

7

You need a third party company to process the payments. PayPal is popular, FDMS, or talk to your bank to see what solutions they offer. Usually these come with an API document or some code libraries to help you start.

And be sure to be aware of PCI-DSS security requirements for merchants. They can make your project more complex than you can solve with code. =)

  • I have only 2 confusions with PAY PAL 1) Customer is redirected to paypal for payment, which we don't want? 2) Customer usually don't have PAY PAL account, thats why we are facilitating them by allowing them to pay through card rather than PAY PAL – Jame Jun 14 '11 at 17:14
  • 1
    @Jame: The redirect is only one of their offerings. They have Payflow Pro which is a web service based API that you use entirely on the back end. The customer is never redirected in that case. Cybercash, Chase Paymentech, and so on all have similar APIs. –  Jun 14 '11 at 17:21
  • 1
    @Jame: Also, these APIs are just card based and don't require a PayPal account. Even the PayPal redirect doesn't require a PayPal account in all cases. (The API describes how to set it up to accept PayPal or direct CC payments.) –  Jun 14 '11 at 17:23
  • Thx for your help, i also read about Pay-flow Pro and now i am happy with that customer is not redirected. One last thing to ask do i(seller)need to have paypal account or the payment is directly transferred to my account? – Jame Jun 15 '11 at 17:17
  • @Jame: The money should go direct to your bank with Payflow Pro. –  Jun 15 '11 at 22:57
3

braintree is a popular payment service that handles a lot of this work for you.

Check out their docs, specifically, New to payments and the .NET api.

tuxedo25
  • 4,798
  • 1
  • 16
  • 12
1

The most important thing you need to remember is to never store any of their information unless you absolutely need it (pre-orders or something like that). In my work's case, we use a third-party system, Touchnet, to handle all of the credit card processing.

Our custom applications record the amount and a special transaction number in a database before forwarding the user on to the credit card portal. After the user completes the transaction (by cancelling or paying) the third-party contacts our web service with the custom transaction number and the reference number of the payment. At this point our web service finds the transaction in the database and marks it appropriately and sets the reference number if one was provided.

Our finance department takes care of reconciling the transactions and makes sure we get paid. (I've never seen that part so I can't say how it works...)

By using a third-party to process transactions, some of the PCI-DSS compliance is taken care of, and we can truthfully tell our users that we never store their credit card information.

Joshua
  • 8,112
  • 3
  • 35
  • 40
0

Full disclosure: I work for PayJunction, the company hosting the link I am providing:

http://support.payjunction.com/trinity/support/view.action?knowledgeBase.knbKnowledgeBaseId=431

At the above link, you will find some C# sample code for doing credit card transactions through PayJunction. We act as a PCI compliance shield (our merchant agreement stipulates that you never store card information and some additional things that place you outside the scope of PCI).

You might also want to take a look at going through PayPal. Even though they charge a heftier fee, people recognize the PayPal brand. PayPal also shields you from PCI compliance.

If you were doing Rails, I would suggest ActiveMerchant (I always suggest ActiveMerchant). They do a good job of abstracting a bunch of gateways. Don't know of an equivalent for C#.

ccoakley
  • 3,235
  • 15
  • 12
0

ah, handling credit cards are a pain! Watch out for the PCI requirements when dealing with payments. I used to work for Mercury payment systems. they have a wide range of API's you can integrate to. here is there developer integration page:

http://www.mercurypay.com/developer-securitysolutions.htm

good luck!

Nathan Tregillus
  • 6,006
  • 3
  • 52
  • 91
-1

First thing I recall doing 10 years ago with E-Commerce was building my own shopping cart (Not necessary) Then I researched both GATEWAYS and MERCHANTS. Many times they are separate. For example: Verisign is a GATEWAY , this is important as they are providing YOU with the API that you need to learn and build with. I started out with with my own, and moved onto oscommerce which is free but IMO the PHP code is just awful to work with for manipulation. I use to contribute free things. I used a few gateways and a few merchants with them. Merchants are the banks. Bank of America I'm not a fan of , but they have both a gateway and they are a merchant as they are the end bank. Sometimes a one stop shop is nice. For a ASP.NET/C# solution I'm not recalling any free or open-source ones that I liked. So for .NET, I would purchase one or perhaps your hosting provider has one.

Tom Stickel
  • 19,633
  • 6
  • 111
  • 113