11-28-2011 01:07 PM
I have a ASP.NET 4.0 web form using C#.
I'm selling 1 item with varying quantity. The customer goes to the Purchase page, selects the quantity, and then I have a web form where they can put in their Name, Address, and Credit Card info and click a submit button.
Is it possible for DPM, upon a successful purchase, to send information back to my website that allows me to save the Quantity purchased, UserID, and Timestamp into my database? If this isn't possible, what integration methods would allow this? I don't want to save any credit card information.
Also, how is billing/shipping address handled using DPM? Does it save to my database or do I have to log into the gateway in order to view the shipping address?
11-28-2011 01:45 PM
I use PHP and not ASP.NET, but if the two API's are at all similar, the relay response page should have the transaction information. You could also set up a silent post page (see your control panel) and that page will receive a post whenever a transaction goes through. However, neither page will update your database for you automatically - you have to figure out what information you want stored and then update the database yourself. Usually this means storing at least the transaction ID so you can use the Transaction Details API to look up information like billing / shipping address.
11-28-2011 04:32 PM
Thanks TJPride. I was hoping it would have been as easy as opening a new sql connection (on success if statement) and inserting values passed back to my website into a table.
I haven't looked into the Transaction Details yet but hoping it can automatically insert data into a SQL database table!
11-28-2011 11:35 PM
Well, the success page should be passed the transaction ID, which in turn should allow you to access the transaction details via the transaction details API. But it's better to not rely on the person making it to the success page or on nobody figuring out how to spoof it. The two methods I outlined above are both safe.
What do you mean by automatically insert, btw? I would think it would be easy to open a database handle and run an SQL query against it.