View previous topic :: View next topic |
Author |
Message |
marco
Joined: 27 Nov 2006 Posts: 11 Location: Los Angeles
|
Posted: Fri Dec 08, 2006 11:24 pm Post subject: Synchronize the CheckRepeatTransactions |
|
|
I received two activation keys when a user checked out. I think you have to synchronize the check on the log file with the actual writing to the log file.
The two activation keys were generated wit the same time stamp (but there must be some miliseconds difference):
// have we already processed this transaction
//
lock (synchObject) {
if (settings.CheckRepeatTransactions)
{
if (File.Exists(logPath))
{
Trace.Write("Log File Exists => finish");
return false;
}
}
logFile = logPath;
log = new XmlTextWriter(logFile, Encoding.Unicode);
log.Formatting = Formatting.Indented;
log.WriteStartDocument();
log.WriteStartElement("Payment");
}
return true; |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun Dec 10, 2006 9:50 pm Post subject: |
|
|
Are you saying that this situation (receiving two real PayPal posts within milliseconds) actually occurred in reality? The main intention of the repeat transaction checking is to avoid the possibility of a customer resubmitting the PayPal data to (potentially) obtain a second license key. _________________ Infralution Support |
|
Back to top |
|
|
|