Worldpay Business Gateway Plugin

  • Posts: 69
  • Thank you received: 0
12 years 2 months ago #38694

Continuation from previous posting in How To...

Have today been on to worldpay and they have stepped through and tested its interaction with hikashop...

Basically the call back facility in the plugin is functional and does work, where the problem comes in is:

The screen which diverts to worldpay has the following callback value:

www.example.com/index.php?option=com_hik...omponent&lang=en

When worldpay server returns to the above callback url its server protocol throws it out... to solve the problem a 1 second meta refresh needs adding to the callback url page...

Where in the hikashop component would be the best place to add it... ?

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 2 months ago #38831

Hi,

I'm sorry but I'm not following you.

I don't understand your sentence "its server protocol throws it out."
What do you mean by server protocol ? HTTP ?
What do you mean by throws it out ? You get a blank page ? an error message ?

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 0
12 years 2 months ago #38836

Hi Nicolas

The way it was explained to me by worldpay after they tested it was:

The worldpay server checks the hikashop return page url before it sends out a message.

It interprets the page as a possible dummy page and aborts.

He says the way round it is to add a meta refresh tag for one second, and the server can confirm the page is genuine.

If you can point me to where I should add the refresh tag I can test it, if it works problem solved and I will report back to you, if it doesnt I can go back to worldpay and ask them to test again.

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 2 months ago #38837

Mmm. I'm not sure why.

You can do that by replacing the lines:
echo '[OK]';

by:
echo '<html><meta http-equiv="refresh" content="1;url='.hikashop_currentURL().'"><body>[OK]</body></html>';

in the file plugins/hikashoppayment/bf_rbsbusinessgateway.php

But I'm not sure if that's what they want and why ?

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 0
12 years 2 months ago #38840

I will let you know what happens...

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 0
12 years 2 months ago #38850

Hi Nicolas

Have added code to script:

$mailer->Send();
$orderClass->save($order);
echo '<html><meta http-equiv="refresh" content="1;url='.hikashop_currentURL().'"><body>[OK]</body></html>';

if($element->payment_params->debug) {
$dbg = ob_get_clean();

echo '<html><meta http-equiv="refresh" content="1;url='.hikashop_currentURL().'"><body>[OK]</body></html>';

ob_start();


Have tried all sorts of syntax checks on code you have posted but keep getting the same error...

Parse error: syntax error, unexpected T_STRING in /home/thelazys/public_html/tswservices/plugins/hikashoppayment/bf_rbsbusinessgateway/bf_rbsbusinessgateway.php on line 1

When I change back to original script no errors showing.

Appreciate if you could have a look.

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 2 months ago #38968

If you get that error, it means that you added/removed { or } characters in the file.

you should have that:

$mailer->Send();

			 $orderClass->save($order);
			echo '<html><meta http-equiv="refresh" content="1;url='.hikashop_currentURL().'"><body>[OK]</body></html>';
			if($element->payment_params->debug) {
				$dbg = ob_get_clean();
				echo '<html><meta http-equiv="refresh" content="1;url='.hikashop_currentURL().'"><body>[OK]</body></html>';
				ob_start();
				echo $dbg;
			}
			return true;

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 0
12 years 2 months ago #39035

Hi Nicolas

Have tried the code still getting no joy...

Have contacted worldpay again, this time I got a lady who wouldn't test it but sent me the following information, said if your team wanted to speak direct about the hikashop plug in, no problem, just use the number and reference at the bottom...


Dear Mr xxxxxxxxxxx,

Thank you for speaking with me earlier.

As promised, here is the information needed in order to redirect shoppers back to the originating site:

In order to redirect the shopper back to the originating website you will need to create a customised results page, which either uses a meta-refresh
i.e. <meta http-equiv=“refresh” content=“5;url=http://www.yoursite.com/” />
or has a static redirection URL, using one of methods shown below:

1.) Customised results (resultY.html and resultC.html) page.
- to create a customised results page please which will include a link to allow the shopper to return to the originating website please see: www.worldpay.com/support/kb/bg/customisi...anced/custa7105.html .

Once you have created these pages you will need to upload them via the File Management tool, which can be found within the "Payment Page Editor" which can be located within the "Installations" section of the Merchant Administration Interface (MAI) at www.worldpay.com/admin . For further details on this tool please refer to: www.worldpay.com/support/kb/bg/customisi...anced/custa7003.html

Please note that following:
- when uploading the results pages please ensure that they are named correctly, i.e. resultY.html and resultC.html otherwise the system will ignore the files.
- once you are happy with how these pages appear in the test environment, you will need to select the "copy to production" option within the payment page editor to copy these pages to the production environment.
- it can take up to 6 hours for files to be replicated from test to production, once the the "copy to production" option is selected.

2.) Shopper response:
- the shopper response mechanism your callback script can reply with a page of HTML (which will include a static redirection URL) that will be displayed to the shopper, on WorldPay's servers. For further details on the shopper response mechanism please refer to the link at: www.worldpay.com/support/kb/bg/paymentresponse/pr5402.html

Should you have any queries at all you can call Technical Support at any time on 0870 366 1233 and select option 4 or email This email address is being protected from spambots. You need JavaScript enabled to view it. Please use the incident number 120210-000789 when speaking with us so that we can assist you with this query.

Kind regards,

xxxxxxxxxxxxxxxxx
Technical Support

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 2 months ago #39148

Please install that plugin and try again.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 0
12 years 2 months ago #39244

I have tested the attached plug in and still can not get a callback response.

The plug in works ok when submitting data...

Is there a work around I can use with a static callback url...

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 2 months ago #39246

I don't know. We didn't develop that plugin ourselves but it was shared by another developer and don't have any testing account for worldpay so hard to do anything in that respect.

I would recommend to try to use the other worldpay plugin if possible. This one seems to work better.

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 0
12 years 2 months ago #39253

Will the other plugin work with the worldpay business gateway, and is there any configuration notes anywhere...

The only reason I signed up with worldpay was because a plugin was listed...

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 0
12 years 2 months ago #39254

Now you have me worried... up to now I have been very impressed... as I see it...

The plugin submits the data correctly so it can be used...

The plugin callback does not, so an overruling url callback in worldpay to a static page is required...

If the worldpay data is sent to a static page what hikashop code do I need to update the status of an order...

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 0
12 years 2 months ago #39317

Have managed to update order status to confirmation using new plug in, still having a problem with cancelled but have to check back with worldpay as there servers are having problems at the moment...

The value <wpdisplay item=MC_callback> has to be added to the worldpay interface Payment Response URL and the Payment Response enabled? needs to be ticked.

Will update on cancelled...

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 2 months ago #39415

Hi,

That's great to hear that the modification we made allowed the callback to work.

Indeed, we didn't wrote any documentation for that plugin as we didn't develop it.

Let us know how it goes with the cancellation.

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 0
12 years 2 months ago #39589

Hi

Have done further testing with cancelled and spoke to worldpay...

Below is path to guidance on payment message (example of authorised)

www.worldpay.com/support/kb/bg/paymentre...ayment_response.html

Select option : Reference
Select option : Payment Message


The returned transStatus variable is assigned: capital Y or C

Y : successful transaction
C : cancelled transaction


Y is working fine C is not picking up the value.
On selecting cancel in the worldapay interface the page hangs and does not divert.

Thanks

Last edit: 12 years 2 months ago by Pit Pony. Reason: extra detail

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 2 months ago #39764

Hi,

Please try with that plugin package.

File Attachment:

File Name: bf_rbsbusi...eway.zip
File Size:9 KB

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 0
12 years 2 months ago #39793

Hi

For both Confirmation or Cancelled to work the Debug mode has to be set to Yes.

Have tested Cancelled and works fine.

Thanks to all involved in sorting it out :-)

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 0
12 years 1 month ago #43632

Hi Pitpony

I'm going through a similar problem now with Hikashop and Worldpay and I hope your experience can save me a headache.

So is the Worldpay plug in that ships with Hikashop faulty?

Do we just need to install the zip file in this thread (as a regular Joomla plug in?) and add the value <wpdisplay item=MC_callback> into the Payment Response URL in the merchant interface to fix the problem?

Thanks,

Paul.

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 1 month ago #43634

We included these fixes in the latest version of HikaShop (1.5.7). Make sure that you're using the latest, otherwise udpate.

Please Log in or Create an account to join the conversation.

Time to create page: 0.108 seconds
Powered by Kunena Forum