PC Review


Reply
Thread Tools Rate Thread

Can I call this in a function or does it have to be multi HTTP pos

 
 
=?Utf-8?B?d3d3LnJlZ29ubGluZS5jb20=?=
Guest
Posts: n/a
 
      1st Feb 2005
I'm coding credit card functionality for a custom system used by a major
university. The only means they have of doing this charge is thus:

You post a HTTP request to their site, including in a form field the "return
page."

They process the information and POST back to your return page with
success/failure.

Is there any way to call this in a inline-function style using the
HTTPWebRequest object or something similar? Due to the fact that they POST
back to you I don't believe it is. Please, prove me wrong, or else we will
only be able to supply them with very limited functionality due to this
process.
 
Reply With Quote
 
 
 
 
David Browne
Guest
Posts: n/a
 
      1st Feb 2005

"www.regonline.com" <(E-Mail Removed)> wrote in
message news:6DA4C9E4-27E6-4A56-BAEE-(E-Mail Removed)...
> I'm coding credit card functionality for a custom system used by a major
> university. The only means they have of doing this charge is thus:
>
> You post a HTTP request to their site, including in a form field the
> "return
> page."
>
> They process the information and POST back to your return page with
> success/failure.
>
> Is there any way to call this in a inline-function style using the
> HTTPWebRequest object or something similar? Due to the fact that they
> POST
> back to you I don't believe it is. Please, prove me wrong, or else we
> will
> only be able to supply them with very limited functionality due to this
> process.


Yes, but it's a bit of a trick. You must code your postback page to put the
response somewhere where your code can get to it. Then you just post the
request to the other server and wait for your response to appear.

Here's what you do. You have a page, say, PostBack.aspx, and you ask for a
postback to PostBack.aspx?ticket=198173827378.

PostBack.aspx is coded to take the information and stuff it into a
application-level (or static) hashtable keyed by the ticket.

So in your code you send the request, and wait for some information to
appear in the hashtable. You can easilly just Thread.Sleep for a short
period of time before checking if the response is in.

You can make it even slicker by using an event or something so that your
code can wait, and PostBack.aspx can wake it up.

David


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-threaded HTTP Module GWiz Microsoft ASP .NET 2 16th Oct 2005 11:35 PM
Call javascript function without using any event call cschang Microsoft ADO .NET 3 1st Feb 2005 03:04 AM
Multi-file selection and download using HTTP? Phred Freeware 17 17th Oct 2004 09:12 AM
Why does a call to a function in a dll take less time if you call it repeatedly? Justin Galzic Microsoft Dot NET Framework 5 23rd Feb 2004 06:09 PM
Capture HTTP Call tanbing Windows XP Internet Explorer 0 31st Jan 2004 02:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:25 PM.