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 04-12-2018 05:21:02

Graham
Member
Registered: 09-30-2004
Posts: 892
Website

WorldPay Return Page

I've had a problem with customers paying using the WorldPay gateway, but it does not then return properly to my payment page and gets stuck on WorldPay's page.

This means that the order is left as "Pending Payment" on my records and I don't get the e-mail with the order details.

They have sent me some code (below) to add to my settings on WorldPay's site, however I'm not sure what to put in where it says "http://www.mywebsite.co.uk/thank-you.php"

Can you let me know what I should put instead. Thanks.

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<meta http-equiv="refresh" content="5;url=http://www.mywebsite.co.uk/thank-you.php" />
</HEAD>
<WPDISPLAY FILE=header.html>
<BODY>
<br/>
<p>Thank you for your Payment</p>
<a href="http://www.mywebsite.co.uk/thank-you.php">Click here to be re-directed back to mywebsite</a>
</BODY>
</HTML>

Offline

 

#2 04-12-2018 08:14:16

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19516
Website

Re: WorldPay Return Page

You don't really want to do that, let's solve your issue instead.  Access Store / Commerce / Processing Gateways and choose to Update the WorldPay WorldDirect - Payment Form gateway.  In the Form Display Code section, do you have:

Code:

$url_relay  = $this->globals('core.url') . '/utilities/ecomrelaymeta.php';

Or:

Code:

$url_relay  = $this->globals('core.url') . '/utilities/ecomrelay.php';

If you've got the second one in there, change it to the first one, that's your issue.  If you've got ecomrelaymeta.php targeted, try loading that URL in your browser.  Does it respond?  If not, change permissions on the /utilities directory and all the php files in it to 755.  Does it work then?


Nick Hendler

Offline

 

#3 04-12-2018 15:39:07

Graham
Member
Registered: 09-30-2004
Posts: 892
Website

Re: WorldPay Return Page

I have the first one:

Code:

<?php 

// +--
// | This processor integration references an external
// | URL for processing.  All external processing gateways
// | work in the same manner.  An order information array
// | is made available globally under the the global name
// | 'ecom.order_summary'.
// |
// | This must set a global variable named 'ecom.olpform'
// | which contains the form information to be posted to
// | the external gateway URL.
// |
// | Anything printed within this code will be printed
// | above the form instructions on the payment information
// | page.
// +--

// +--
// | THERE IS NO NEED TO EDIT THE CODE BELOW THIS POINT TO 
// | ACTIVATE THIS INTEGRATION.  ONLY EDIT THIS CODE TO MODIFY
// | HOW THIS INTEGRATION WORKS.  BE SURE YOU KNOW WHAT YOU'RE 
// | DOING!
// +--

// +--
// | Get a few global variables.
// +--

$eol      = $this->globals('core.eol');
$order    = $this->globals('ecom.order_summary');

// +--
// | Printable form instructions.
// +--

$instructions = "After verifying your order information and clicking the 'Continue' button, you will be directed to our online processing partner's secure site to enter your payment information. Once your payment information is entered and verified, you will be directed back to this web site for your order confirmation.";

// +--
// | Create our relay URL.
// +--

$url_relay  = $this->globals('core.url_ssl') . '/utilities/ecomrelaymeta.php';

// +--
// | Set up the olpform array.
// +--

$olpform = array('url'    => 'https://select.worldpay.com/wcc/purchase',
                 'button' => 'Continue',
                 'fields' => array());

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

// Added the following for test mode - Worked, so now commented out

// $olpform['fields']['HIDDEN'][] = array('name'  => 'testMode',
//                                      'value' => '100');

// End of added code

$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'  => 'address',
                                       'value' => $order['order']['addone'] . ' ' . $order['order']['addtwo']);

$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');

$olpform['fields']['HIDDEN'][] = array('name'  => 'currency',
                                       'value' => $this->globals('core_settings.core.basecurrency'));

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

$olpform['fields']['DISPLAY'][] = array('type'   => 'PAYFORMCONTINUE',
                                        'params' => array('name'     => 'ecom_continue',
                                                          'required' => 1,
                                                          'display'  => 'Payment Information',
                                                          'desc'     => $instructions,
                                                          'option'   => 'Enter Payment Information'));

// +--
// | Globalize the $olpform array and return.
// +--

$this->globals('ecom.olpform',$olpform);

?>

I used the URL https://www.affordable-leather.co.uk/cc … aymeta.php which forwarded to https://www.affordable-leather.co.uk/cc … mrelay.php and got:

Checkout

The following error occurred while attempting to process your transaction:

A complete common gateway interface request was not received by the online processor. The request was missing all required parameters

Prior to this, I hadn't made any changes to the WorldPay gateway and it had been working fine up until a few days ago.

The solution above was suggested by WorldPay Technical Support.

Offline

 

#4 04-13-2018 08:31:31

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19516
Website

Re: WorldPay Return Page

OK.  What do you have for the order number and response code field names?  This is what they should be:

Response Field Name: Order Number = cartId
Response Field Name: Response Code = transStatus

And for good measure, Response Codes should list only 'Y'.


Nick Hendler

Offline

 

#5 04-13-2018 17:14:34

Graham
Member
Registered: 09-30-2004
Posts: 892
Website

Re: WorldPay Return Page

Yes, they are all correct.

Last edited by Graham (04-13-2018 17:15:32)

Offline

 

#6 04-16-2018 08:24:29

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19516
Website

Re: WorldPay Return Page

Is Worldpay configured to send the transaction status and cart id back to the ecomrelaymeta.php URL?


Nick Hendler

Offline

 

#7 04-16-2018 09:48:57

Graham
Member
Registered: 09-30-2004
Posts: 892
Website

Re: WorldPay Return Page

Here are the relevant fields and a few others in case you need them too:

The Payment Response URL is: https://www.affordable-leather.co.uk/cc … aymeta.php

The Shopper Redirect URL is: https://www.affordable-leather.co.uk/cc … mrelay.php

Payment Response enabled? Yes

Shopper Redirect button enabled? Yes

Enable the Shopper Response: Yes

Store-builder used: Click Cart Pro

Use 3D Secure Authentication? True   

Use Mastercard SPA? True

Offline

 

#8 04-17-2018 08:00:33

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19516
Website

Re: WorldPay Return Page

So it's working now, with those settings?


Nick Hendler

Offline

 

#9 04-18-2018 06:23:07

Graham
Member
Registered: 09-30-2004
Posts: 892
Website

Re: WorldPay Return Page

No, those are the settings which have always been there since I started using WorldPay.

I haven't changed anything,yet it suddenly stopped working.

Offline

 

#10 04-18-2018 07:52:35

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19516
Website

Re: WorldPay Return Page

Please open a support ticket on this.  Everything looks like it should be working fine.  Your setup looks good.  Nothing out of the ordinary.  In your ticket, please copy the final URL you are directed to where you receive the payment failed message.  It should be a URL for ecomrelay.php (that was meta-refreshed to) and contain CGI parameters.  Also, please provide the exact error message presented.  We'll get to the bottom of this.

https://kryptronic.com/Form/TECHTICKET


Nick Hendler

Offline

 

#11 04-19-2018 04:09:51

Graham
Member
Registered: 09-30-2004
Posts: 892
Website

Re: WorldPay Return Page

Ok, done that.

Offline

 

Board footer