MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] 15 orders missing



On Wed, 06 Oct 1999, you wrote:
> ******    message to minivend-users from "Tech Mail" <tech@khouse.org>     ******
> The tracking.asc and the backend.asc are missing those orders also, and no
> email was sent for them.  I did find a trace of the records in the
> transactions.txt file, and an affiliates file which I manually write to when
> an order is put through.  I don't have all the order information in either
> of those files, so I still can't complete the orders.  From the limited data
> I could find, it looks like there were only about 8 orders made, and some of
> them had duplicate orders. (I think they KNEW it wasn't working, and were
> trying again).
> 
> None of the 'standard' minivend tracking methods worked though, not the
> backend.asc, not the tracking.asc, and not the email.
> 
> This is a Bad Thing(TM).  I'm going to open a new store soon, and on that
> one I'm planning on manually saving the data to backup files, because
> something like this needs to be recoverable!

Hmm, when I looked at the "simple" demo, I had a gut feeling that it would
be possible to have the system die in such a way that orders were not
recorded.  That was partially what motivated me to move nearly all my data
handling to SQL.  I also changed the way that orders were handled in the
checkout profile of the checkout page. 

I first write out the contents of the order.  This is everything I know
about the order.  Then I check the credit card.  I write the result into
the order DB as well.  I wanted to simulate various crashing problems by
putting a little user tag (see below) in various places to kill the page:

UserTag crash-n-burn Routine <<EOR
sub {
	my $x = 1;
	my $y = 0;
	my $z = $x / $y;
}
EOR

But, I never did.  So, I am not sure if that tag works.  The idea was to
see what happened to the state of the order at various points.  I am not
even sure if that tag will actually kill the page.

I did finally prove to myself that the checkout profile code seems to be
executed more or less completely regardless of whether the checks
succeeded or not.  I have [sql] tags all over and they _all_ are always
executed regardless of where they are in the profile.  It took a little
while to figure that one out...

Losing orders is bad.  Losing them after you have charged the customer's
credit card is Really Bad(tm).

Thus, I save all the data about the order first.  Then I do the credit
card.  In the worst case, something will crash somewhere, but if the credit
card clears, then I have a saved order.

Best,
Kyle (KH)


Search for: Match: Format: Sort by: