Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 12-10-2010 02:57:37

dtrehane
Member
Registered: 02-13-2009
Posts: 96

worldpay post order processing

Hi,
I've just integrated worldpay for our Europacart system. All the integration went fine and its now live. We have noticed that the worldpay payments are put into the pending folder, despite the 'post order processing' function on payment gateways being set to true.
Can anyone advise why this would be?
Thanks

Offline

 

#2 12-13-2010 07:09:56

dtrehane
Member
Registered: 02-13-2009
Posts: 96

Re: worldpay post order processing

can anyone help with this please??

Offline

 

#3 12-13-2010 07:24:42

dtrehane
Member
Registered: 02-13-2009
Posts: 96

Re: worldpay post order processing

Looking on the worldpay site and talking to their technical, the response code that they send back looks like:

instId=38290&email=demo%40uk.rbsworldpay.com&transTime=999178402000&country=GB&rawAuthCode=A&amount=14.99

&installation=38290&tel=0123+456789012&address=Test+Road%0D%0ATest+Town%0D%0ATest+City&MC_log=2379

&rawAuthMessage=authorised+(testMode+always+Yes&authAmount=23.11&amountString=%26%23163%3B14.99&cardType=Visa

&AVS=0001&cost=14.99&currency=GBP&testMode=100&authAmountString=EUR23.11&fax=01234+5678901&lang=en

&transStatus=Y&compName=Company+Name&authCurrency=EUR&postcode=AB1+2CD&authCost=23.11&desc=Test+Item

&countryMatch=S&cartId=Test+Item&transId=12227758&M_var1=fred&authMode=E&countryString=United+Kingdom &name=john+smith



I can see that the response codes on my worldpay gateway in Kryptronic are correct, but cant understand why the post order processing isnt working.

Any help much appreciated

Offline

 

#4 12-14-2010 11:30:25

dtrehane
Member
Registered: 02-13-2009
Posts: 96

Re: worldpay post order processing

OK, this is where I've got to so far:
I've discovered that the payment url for worldpay quoted in the wiki is now out of date.
The correct line should read
$olpform = array('url'    => 'https://secure.wp3.rbsworldpay.com/wcc/purchase',
instead of
$olpform = array('url'    => 'https://select.worldpay.com/wcc/purchase',

Worlpay tell me that the response code of
<WPDISPLAY ITEM=MC_callback>
which the wiki quotes as needing to be used in the configuration options page, would not work on its own.This is not currently being sent to the worldpay server in the 1st place and there is no url to send it back to.

There needs to be a line added into the hidden fields on the form which reads something like:
<input type=hidden name="MC_<WPDISPLAY ITEM=MC_callback>" value="location of callback script on our site">

I havent managed to get any further than this because its already WAYYYY over my head!
Can anyone finish the puzzle for me? Pleeeease?

Offline

 

#5 08-29-2012 06:16:43

bbac
Member
From: Bristol, UK
Registered: 08-25-2008
Posts: 141

Re: worldpay post order processing

I needed to add the following lines to System Dashboard > Store > Commerce > Processing Gateways > Worldpay > Form Display Code in order to get it working. This really ought be in the original code or in the WiKi


Code:

********Add just after **********
// +--
// | Create the HIDDEN fields for the form.
// +--

***ADD THIS TEXT (but not this line!)****
$olpform['fields']['HIDDEN'][] = array('name'  => 'MC_callback',
                                     'value' => $url_relay);

Last edited by bbac (08-29-2012 06:17:04)

Offline

 

#6 08-29-2012 13:05:15

bbac
Member
From: Bristol, UK
Registered: 08-25-2008
Posts: 141

Re: worldpay post order processing

In fact, Worldpay have updated their forms, the address field is now broken into constituent parts, so my code now looks like this:

Code:

// +--
// | Create the HIDDEN fields for the form.
// +--

$olpform['fields']['HIDDEN'][] = array('name'  => 'MC_callback',
                                     'value' => $url_relay);

$olpform['fields']['HIDDEN'][] = array('name'  => 'hideCurrency',
                                     'value' => 'true');

$olpform['fields']['HIDDEN'][] = array('name'  => 'instId',
                                       'value' => $order['gateway']['userid']);

$olpform['fields']['HIDDEN'][] = array('name'  => 'cartId',
                                       'value' => $order['order']['id']);

$olpform['fields']['HIDDEN'][] = array('name'  => 'M_trusr',
                                       'value' => $this->globals('core_session.sid'));

$olpform['fields']['HIDDEN'][] = array('name'  => 'amount',
                                       'value' => $order['order']['ordertotal']);

$olpform['fields']['HIDDEN'][] = array('name'  => 'name',
                                       'value' => $order['order']['fname'] . ' ' . $order['order']['lname']);

$olpform['fields']['HIDDEN'][] = array('name'  => 'address1',
                                       'value' => $order['order']['addone']) ;

$olpform['fields']['HIDDEN'][] = array('name'  => 'address2',
                                       'value' => $order['order']['addtwo']);

$olpform['fields']['HIDDEN'][] = array('name'  => 'town',
                                       'value' => $order['order']['city']) ;

$olpform['fields']['HIDDEN'][] = array('name'  => 'region',
                                       'value' => $order['order']['stateprov']) ;

$olpform['fields']['HIDDEN'][] = array('name'  => 'country',
                                       'value' => $order['order']['countryabb']);

$olpform['fields']['HIDDEN'][] = array('name'  => 'postcode',
                                       'value' => $order['order']['postalcode']);

$olpform['fields']['HIDDEN'][] = array('name'  => 'tel',
                                       'value' => $order['order']['phone']);

$olpform['fields']['HIDDEN'][] = array('name'  => 'email',
                                       'value' => $order['order']['email']);

$olpform['fields']['HIDDEN'][] = array('name'  => 'desc',
                                       'value' => 'Online Order');

Offline

 

Board footer