[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Processing order with no items
Hi List,
I use an external Payment Gateway and this Payment Gateway send the
results back to my special IC pages. In this special IC page, I've
....
[if scratch successcall]
[tmp url][area href=process secure=1 form="
mv_todo=submit
mv_order_route=log main copy_user
mv_order_report=../etc/report.html
mv_order_receipt=../etc/receipt.html
"][/tmp]
[bounce href="[scratch url]"]
[/if]
to finish the order and to get the receipt page. If I reload the receipt
page in my browser, I get a new order number with the whole stuff of
mail_receipt, report, receipt.html with no items once more, because IC
is processing such url like
https://www.bpa.leidinger.local/cgi-bin/stuff/process?mv_session_id=NRRNfJjf&mv_pc=5&mv_todo=submit&mv_order_route=log%20main%20copy_user&mv_order_report=%2e%2e%2fetc%2freport%2ehtml&mv_order_receipt=%2e%2e%2fetc%2freceipt%2ehtml
If I patch bin/interchange like
--- interchange.orig Mon Feb 4 13:59:02 2002
+++ interchange Fri Mar 1 14:44:50 2002
@@ -1163,8 +1163,19 @@
# Vend::Items is tied, remember!
$Vend::Items =
$CGI::values{mv_cartname}
if
$CGI::values{mv_cartname};
-
#::logDebug("Default order route=$::Values->{mv_order_route}");
+
+ #jojojojo
+ my $testitems = @$Vend::Items;
+ if (! $testitems) {
+ ::logDebug("Venditems =
$testitems");
+ $CGI::values{mv_nextpage} =
$result_hash->{receipt}
+
|| $::Values->{mv_order_receipt}
+
|| find_special_page('receipt');
+ undef $final;
+ return 1;
+ }
+
## Determine the master order
route, if routes
## are not set in CGI values
(4.7.x default)
if(
IC will not process the whole order routes and send any emails once more
and will not create a new order number. With the above patch, I get the
normal behavior of IC, if I reload the receipt page several times.
If there is an item in the cart, I get the debug messages like
--------- snip -------
main:debug: Default order route=default
main:debug: Default order route=default
main:debug: Profile status status=1 final=1 errors=
main:debug: Routing order, pre-check
main:debug: Routing status status=1 final=1 errors=
main:debug: Routing order default
main:debug: Order number=TEST0127
main:debug: Order number=TEST0127, result_hash={
'supplant' => '1',
'master' => '1',
'cascade' => 'log main copy_user',
'email' => 'spam@nospammer.spam',
'empty' => '1'
}
main:debug: selected receipt=../etc/receipt.html
main:debug: not_displayed=0
main:debug: returning order_number=TEST0127, not_displayed=0
--------- snip -------
If I reload the receipt pages several times with the patched
bin/interchange, I get
--------- snip -------
main:debug: Default order route=default
main:debug: Venditems = 0
main:debug: Default order route=default
main:debug: Venditems = 0
main:debug: Default order route=default
main:debug: Venditems = 0
....
--------- snip -------
What do you think about the different behavior and patch?
Any comments?
Thanks!
Joachim Leidinger
--
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[leidinger@bpanet.de]
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de