[ic] Manually writing a transaction into database

Lyn St George lyn at zolotek.net
Fri Mar 18 11:40:24 EST 2005


On Fri, 18 Mar 2005 02:26:30 -0700, interchange at tvcables.co.uk wrote:

>
>Hi Folks,
>
>I have started a new thread as my question has now changed, although I am still
>trying to get Worldpay to work. I am now trying to manually write the order
>into the database transaction table, however all I am managing to write is the
>order number and order date, almost all other fields are blank. I am using the
>code below and I have also tried the log_transaction code but neither will
>write my transaction table, can anyone suggest why it won't work please?
>
>Thanks,
>Andy.
>
>[seti add_wp]
>[tag flag write]transactions[/tag]
>[try]
>[import table=transactions type=LINE continue=NOTES]
>code: [scratch mv_order_number]
>store_id: __STORE_ID__
>order_number: [scratch mv_order_number]
>session: [data session id]
>username: [data session username]
>shipmode: [value mv_shipmode] ([shipping-desc])

[snip]

Is this code in the callback page displayed by Worldpay?

Run some simple tests to see where your values exist and
where they don't. Put some of these tags, including the
session tag, into both the last page from where you leave
your site and the callback page. Compare the session values.
If they are different then this will explain it all. As far as I remember
I did this with Minivend, and recent IC code may or may not alter
things with respect to retaining the session. If the session ids are 
the same then you should have all of these values available. (Note
that following links from the callback page will *definitely* generate
a new session id, but the first instantiation of that page may retain
the original session). WP allow you to pass values of your choice
through their system and back into yours, so you could use that to
send all the values you need to complete the order.  

Or you could do things the way that Jonathan Clark suggested, ie
create a temporary record, check things and then complete the
order. If I were starting from scratch again then that is what I would do,
and if the session id is changing then this is a good way forward 
(assuming you still want to use WP).   


-
Cheers
Lyn St George
+-----------------------------------------------------------------------------------
+ http://www.zolotek.net  eCommerce: develop, host, support
+ Interchange plus ZedPanel
+-----------------------------------------------------------------------------------



More information about the interchange-users mailing list