Connecting Tech Pros Worldwide Help | Site Map

Can I make Asp program sleep?

  #1  
Old November 20th, 2008, 07:25 PM
=?Utf-8?B?YzY3NjIyOA==?=
Guest
 
Posts: n/a
Hi all,

We use Payflow Pro from Verisign(Now it calls paypal Payflow Pro) as a
gateway software to process credit card payment.

Most of time, Paypal server is OK and we don't have problems for credit card
payment. But we do experience some issues sometimes.
i.e. Occasionally, after credit card information was submitted to payPal
server, we didn't get any response from their server, no error code, it is
just an empty string.

I am not sure how it happened. I am thinking it's probably caused by our
server program not waiting long enough for their server's response if their
server has some performance issue(slow in response) at that time. When the
server response is not back yet, our program goes forward already, then cause
the return string from their server is empty. Am I on the right track?

That's why I am thinking to make our asp program sleep for a while at this
statement:

Executor.Application = sDosCmd 'this command basically has credit card
info for processing
sResult=Executor.ExecuteDosApp 'sResult is the string back from paypal server

I want to add sleep 3000 right after this statement.
then check is sResult is empty, if not, program goes on. If yes, continue to
sleep...
until a non-empty string returns or quit the transaction after a long enough
waiting.

Would you like to share some your experiences of credit card transactions? I
am dealing with a production server, so it is a very critical issue for us.

I googled a bit. It says on ServerObejcts.com it has waitfor 1.0 we can
download.
I don't see this product.

Thank you,
--
Betty
  #2  
Old November 20th, 2008, 07:45 PM
Bob Barrows
Guest
 
Posts: n/a

re: Can I make Asp program sleep?


No.

c676228 wrote:
Quote:
Hi all,
>
We use Payflow Pro from Verisign(Now it calls paypal Payflow Pro) as a
gateway software to process credit card payment.
>
Most of time, Paypal server is OK and we don't have problems for
credit card payment. But we do experience some issues sometimes.
i.e. Occasionally, after credit card information was submitted to
payPal server, we didn't get any response from their server, no error
code, it is just an empty string.
>
I am not sure how it happened. I am thinking it's probably caused by
our server program not waiting long enough for their server's
response if their server has some performance issue(slow in response)
at that time. When the server response is not back yet, our program
goes forward already, then cause the return string from their server
is empty. Am I on the right track?
>
That's why I am thinking to make our asp program sleep for a while at
this statement:
>
Executor.Application = sDosCmd 'this command basically has credit
card
info for processing
sResult=Executor.ExecuteDosApp 'sResult is the string back from
paypal server
>
I want to add sleep 3000 right after this statement.
then check is sResult is empty, if not, program goes on. If yes,
continue to sleep...
until a non-empty string returns or quit the transaction after a long
enough waiting.
>
Would you like to share some your experiences of credit card
transactions? I am dealing with a production server, so it is a very
critical issue for us.
>
I googled a bit. It says on ServerObejcts.com it has waitfor 1.0 we
can download.
I don't see this product.
>
Thank you,
--
Betty
--
HTH,
Bob Barrows


  #3  
Old November 20th, 2008, 08:15 PM
Evertjan.
Guest
 
Posts: n/a

re: Can I make Asp program sleep?


Bob Barrows wrote on 20 nov 2008 in
microsoft.public.inetserver.asp.general:
Quote:
Quote:
>Can I make Asp program sleep?
Quote:
No.
Perhaps yes, Bob,

Does this wait for 100 millisecs, or till the theString is not empty?

[jscript]
var endTime = new Date() + 100
do {
now get fresh value for theString;
} while (theString=="" && endTime new Date());

[not!!! tested]

It would be much better to have the client do new AJAX requests for some
time, until the answer is in, freeing the server from any waiting.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
  #4  
Old November 20th, 2008, 09:05 PM
Bob Barrows
Guest
 
Posts: n/a

re: Can I make Asp program sleep?


Evertjan. wrote:
Quote:
Bob Barrows wrote on 20 nov 2008 in
microsoft.public.inetserver.asp.general:
>
Quote:
Quote:
>>Can I make Asp program sleep?
>
Quote:
>No.
>
Perhaps yes, Bob,
>
Does this wait for 100 millisecs, or till the theString is not empty?
>
[jscript]
var endTime = new Date() + 100
do {
now get fresh value for theString;
} while (theString=="" && endTime new Date());
>
[not!!! tested]
>
That is not sleeping, but you know that.
--
HTH,
Bob Barrows


  #5  
Old November 20th, 2008, 09:35 PM
Evertjan.
Guest
 
Posts: n/a

re: Can I make Asp program sleep?


Bob Barrows wrote on 20 nov 2008 in
microsoft.public.inetserver.asp.general:
Quote:
Evertjan. wrote:
Quote:
>Bob Barrows wrote on 20 nov 2008 in
>microsoft.public.inetserver.asp.general:
>>
Quote:
>>>Can I make Asp program sleep?
>>
Quote:
>>No.
>>
>Perhaps yes, Bob,
>>
>Does this wait for 100 millisecs, or till the theString is not empty?
>>
>[jscript]
>var endTime = new Date() + 100
>do {
>now get fresh value for theString;
>} while (theString=="" && endTime new Date());
>>
>[not!!! tested]
>>
That is not sleeping, but you know that.
That is just a question of semantics, Bob, of definition.

The many parallel tasks of the OS are distributed anyway, so if a single
task is not given the right priority, there is no or not much difference
with a central task distributing loop that incorporates sleep timeouts.

Only in a badly designed OS, such loops take too much of the processing
time pool.

Perhaps they are badly designed anyway.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Random numbers (part II) BOOGIEMAN answers 7 November 16th, 2005 11:28 PM
Protecting ASP code John answers 5 July 22nd, 2005 01:42 AM
MySQL tips that I have come across Mike Chirico answers 0 July 20th, 2005 01:09 AM
Running a python program during idle time only los answers 17 July 19th, 2005 02:46 AM