[ic] Getting Worldpay Callback to trigger IC?

Jonathan Clark jonc at webmaint.com
Thu Mar 17 11:57:40 EST 2005

> I decided it was time to sort out Worldpay with callback, I have been all
> through the archives (many times) yet still cannot complete it. I have the
> notes from Lyn St George but there is too much missing for me to
> make it work.
> I have a basic callback working, where worldpay will call the
> callback page and
> display whether a transaction was good or cancelled with basic
> password check
> eg:-
> callback.html
> [if cgi transStatus eq Y]
> [if cgi callbackPW eq password]
> Payment sucessful
> [/if]
> [/if]
> That works fine, now I want to trigger IC to complete the order,
> in otherwords
> replace the above "Payment Sucessful" with the trigger code.
> I tried this code from the archives:-
> [seti url][area href=process form="
> mv_todo=submit
> mv_order_route=log main copy_user
> mv_order_report=ord/report
> mv_order_receipt=ord/receipt "]
> [/seti]
> [bounce href="[scratch url]"]
> When placed within the IF statement this code triggers the order
> just fine if I
> call the page myself from my server with the approprite cgi
> variables in the
> url, however when running it with a test transaction via the
> Worldpay server it
> fails with a 302 re-direction error, the order is not trigerred
> and I am left
> stranded on Worldpay, Worldpay flag it as a callback failure.
> So how can I get the callback page to trigger the order based on
> testing the
> transStatus and callbackPW cgi variables???

I don't understand how the above code can work.

You are having a remote client (WorldPay) request a page from your server
which will inevitably create a new session. This new session will not
contain any cart items, and is completely unconnected with your customer's
session as far as I can see. Added to this, you are assuming WorldPay's
systems would deal with a browser redirect. I don't know if they would, but
I would assume not.

Where I have dealt with this previously, I have altered the checkout process
to save a pending order to orderline and transactions prior to visiting the
PSP, and then used the callback to verify details stored in the database and
then update the order as appropriate and send out emails.

Your choice is to code something like this, or wait for Mike Heins to build
the PayPal payment module for IC and then base yours on that. Personally, I
would wait for Mike.

Coupled to this, with WorldPay, you need to hand inspect each payment on
WorldPay anyway as their fraud prevention is so poor, so you are not gaining
a huge amount anyway.


Jonathan Clark
Managing Director,
Webmaint.com   - Building Clever Websites        http://www.webmaint.com
Webmaint.net   - Business Web Hosting            http://www.webmaint.net
Cartridge SAVE - Printer Consumables Online
WireTel        - Internet Connectivity Solutions http://www.wiretel.net

More information about the interchange-users mailing list