473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Credit Card Transaction Strategy

I've built an online reservation website in ASP .NET with a SQL Server
backend. It allows customers to search for available resources, than
charges their credit card a fee to hold the reservation. Here's how I
have it arranged now:

1. Find available resource
2. Store reservation info in database
3. Charge credit card

The problem is, if the credit card fails, I have to go back and delete
the reservation which isn't optimal. If I charge the card first, I run
the risk of charging the card, then the resource not being available if
two people are trying to reserve at the same time.

What I'm looking to do is something like make the reservation
transaction dependant on the credit card result, or any other advice on
a better way to do this. Any help would be appreciated!

Dec 1 '05 #1
3 1670
On the simplest level, you can have a "flag" set to indicate whether the
card was authenticated. The resource is already checked. You then only
report on reservations where the flag is flipped from "no" to "yes". This is
not an optimal solution, but it improves on what you have now.

You can also opt for the "temporary" table to hold pending requests.

If you are completing the full trip, meaning checking resource and then
running card, within a short amount of time, you can hold the information on
the business layer until commit, putting a temporary hold on the resource
until the transaction rolls forward or back. This can work long term, but it
is harder to hold the transaction in the business objects for long, as you
are eating up expensive resources.

Service Broker Queueing (SQL Server 2005) may help, as you can work the
asynch processing into transactions, but you will be a pioneer in this
arena.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***********************************************
Think Outside the Box!
***********************************************
<mi*********@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I've built an online reservation website in ASP .NET with a SQL Server
backend. It allows customers to search for available resources, than
charges their credit card a fee to hold the reservation. Here's how I
have it arranged now:

1. Find available resource
2. Store reservation info in database
3. Charge credit card

The problem is, if the credit card fails, I have to go back and delete
the reservation which isn't optimal. If I charge the card first, I run
the risk of charging the card, then the resource not being available if
two people are trying to reserve at the same time.

What I'm looking to do is something like make the reservation
transaction dependant on the credit card result, or any other advice on
a better way to do this. Any help would be appreciated!

Dec 1 '05 #2
Take a look at Delayed Capture on your credit card processor.

Basically, it allows you to "hold" a certain amount of money for a
given time. Doesn't charge the customer anything unless you later
"capture" the transaction.

So now you:

1. Find available resource
2. Do an "Authorize" transaction on the card to make sure they have the
money
3. Make the reservation
4. Capture the funds

If you fail to make the reservation in step 3, you simply don't capture
the funds. The customer isn't out any money, you don't have to credit
them, etc.

Dec 1 '05 #3
I'm using SQL Server 2000, so Service Broker Queueing is out. It does
look interesting though, thanks for the tip! I think I am just going
to move the credit card verfication inside the transaction and roll it
back if the CC fails. I can still see a possibility of two
reservations for a given resource being made at the same time, but the
window is small.

Thanks for the help!

Dec 1 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: revjjjames | last post by:
Hello, can someone please recommended a online credit card processor that is PHP friendly? I am seeking one that could be built into a hidden-frame, and process a transaction seamlessly this way. ...
10
by: dries | last post by:
A friend of mine has a problem with his credit card validation routine and it is probably a simple thing to solve but I cannot find it. It has to do with the expiry dates. What happens is that as...
5
by: Jake | last post by:
I in the process of building a web-site using .net (C#). I just finished building the shopping cart. What I need is to find examples, details, or code packages that I can include in my web-site...
9
by: nm | last post by:
Hi, I am a developer quite familiar with the C# language and .NET framework. I develop mainly data driven websites. All of our past clients have shopping cart systems developed by me in ASP.NET...
4
by: Jerry Camel | last post by:
I'm writing and ASP.net app using vb .net. I need to interact with a credit card reader. I have one that sits inline with the keyboard. Works great, except for the fact that no matter what field...
12
by: Jerry Camel | last post by:
Not sure if this is a good place to post this... I'm writing and ASP.net app using vb .net. I need to interact with a credit card reader. I have one that sits inline with the keyboard. Works...
11
by: Paul Furman | last post by:
I'm setting up credit card payment through authorize.net and they have the option to send a POST string back to my site once complete. I'm not sure how to proceed. They don't have much to read...
1
by: securedcardss | last post by:
http://card.2youtop.info secured credit card card credit instant secured card cash credit secured card
6
by: samatair | last post by:
I need to create a form which accepts credit card numbers and mail the details with the credit card number to my client. I came to know that using SSL would make the form HTTPS and make it secure....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.