Jump to content


Corporate Sponsors


Latest News: (loading..)

Integration - MD5 signature problem - WorldPay Select Junior v1.0


  • You cannot reply to this topic
8 replies to this topic

#1 cujimmy

  • Community Member
  • 59 posts
  • Real Name:Jimmy Powdrell Campbell
  • Gender:Male
  • Location:Glasgow, Scotland

Posted 18 April 2008, 13:03

Jings! this is a quiet corner of the osC forum.

I'm getting "the MD5 signature could not be verified" on running a test transaction - been over everything a dozen times and suspect the problem lies with WorldPay (can't even submit a support request at the moment - getting an internal server error on submitting) but I still have a horrible feeling I've missed something obvious.

(In the admin, we do have the same password under "MD5 Password" as under "MD5 secret for transactions" on Worldpay's Test Integration Setup page).

In worldpay_junior.php, everything is unchanged (I've only removed some fields for this post) :

$process_button_string = tep_draw_hidden_field('instId', MODULE_PAYMENT_WORLDPAY_JUNIOR_INSTALLATION_ID) .
tep_draw_hidden_field('amount', $this->format_raw($order->info['total'])) .
tep_draw_hidden_field('currency', $currency) .
tep_draw_hidden_field('hideCurrency', 'true') .
tep_draw_hidden_field('cartId', $order_id) .
tep_draw_hidden_field('signatureFields', 'amount:currency:cartId') .
tep_draw_hidden_field('signature', md5(MODULE_PAYMENT_WORLDPAY_JUNIOR_MD5_PASSWORD . ':' . $this->format_raw($order->info['total']) . ':' . $currency . ':' . $order_id)) .
tep_draw_hidden_field('MC_callback', substr(tep_href_link('ext/modules/payment/worldpay/junior_callback.php', '', 'NONSSL', false, false), strpos(tep_href_link('ext/modules/payment/worldpay/junior_callback.php', '', 'NONSSL', false, false), '://')+3));

At this point, I think the sensible thing is to take the dog for a walk.

#2 lomaxa

  • Community Member
  • 5 posts
  • Real Name:Alan Lomax

Posted 01 May 2008, 18:19

View Postcujimmy, on Apr 18 2008, 02:03 PM, said:

Jings! this is a quiet corner of the osC forum.

I'm getting "the MD5 signature could not be verified" on running a test transaction - been over everything a dozen times and suspect the problem lies with WorldPay (can't even submit a support request at the moment - getting an internal server error on submitting) but I still have a horrible feeling I've missed something obvious.

(In the admin, we do have the same password under "MD5 Password" as under "MD5 secret for transactions" on Worldpay's Test Integration Setup page).

In worldpay_junior.php, everything is unchanged (I've only removed some fields for this post) :

$process_button_string = tep_draw_hidden_field('instId', MODULE_PAYMENT_WORLDPAY_JUNIOR_INSTALLATION_ID) .
tep_draw_hidden_field('amount', $this->format_raw($order->info['total'])) .
tep_draw_hidden_field('currency', $currency) .
tep_draw_hidden_field('hideCurrency', 'true') .
tep_draw_hidden_field('cartId', $order_id) .
tep_draw_hidden_field('signatureFields', 'amount:currency:cartId') .
tep_draw_hidden_field('signature', md5(MODULE_PAYMENT_WORLDPAY_JUNIOR_MD5_PASSWORD . ':' . $this->format_raw($order->info['total']) . ':' . $currency . ':' . $order_id)) .
tep_draw_hidden_field('MC_callback', substr(tep_href_link('ext/modules/payment/worldpay/junior_callback.php', '', 'NONSSL', false, false), strpos(tep_href_link('ext/modules/payment/worldpay/junior_callback.php', '', 'NONSSL', false, false), '://')+3));

At this point, I think the sensible thing is to take the dog for a walk.

I've just integrated with WP Junior, and I didn't touch the worldpay_junior.php file.

In Worldpay admin, login to the production area and click on SYSTEM Settings, select the Integration Setup 'Test' and add the Payment Response URL eg http://www.your-url.co.uk/catalog/ext/modu...or_callback.php (don't forget the include the http://), check the Payment Response enabled? and check the Enable the Shopper Response. Enter a Payment Response password (This is the Callback Password you entered in the OSC Admin WP Junior setup) and enter the MD5 secret for transactions (This is the MD5 Password you entered in the OSC Admin WP Junior setup).

I also copied it to the Production setup.

PS You can only enter these changes when you login to the PRODUCTION live environment if you try it in the TEST environment you will get a database error. A good contact at WP is Gary Cook 08703661290.

Enjoy...

Edited by lomaxa, 01 May 2008, 18:26.


#3 ivyfleur

  • Community Member
  • 88 posts
  • Real Name:Ivyfleur
  • Location:"Middle Earth"

Posted 15 March 2009, 05:16

Hi anyone,

Tried the above method and still can't get WorldPay to work. On checkout, I keep getting the following error message:

Quote

Secure Payment Page
Sorry, there was an error in processing this transaction:
The information sent from the merchant's site is invalid or incomplete. Please send the following information to the merchant:
The transaction cannot be processed due to one or more of the following:

the merchant account is suspended
the currency you selected is not supported
the authorisation mode is incorrect
test mode is unavailable
the installation is not live

2 callback urls are mentioned and I've tried both. One callback url is mentioned here and the other as you mentioned above. It seems that one works for worldpay.php and yours suppose to work for the junior_callback.php

Both do not work for me. Anyone out there has managed to solved this?

#4 ivyfleur

  • Community Member
  • 88 posts
  • Real Name:Ivyfleur
  • Location:"Middle Earth"

Posted 17 March 2009, 03:34

Okay I found the problem and I hope this will help somebody else out.

As long as Worldpay has not approved your application you cannot go live. If you do, the error message above is what your are going to get.

The correct callback url or Payment Response Url for Worldpay Junior is to point the url to the junior_callback.php, that is in the Payment Response url row (in Admin>World Pay>installation) type or copy the path to your junior_callback.php. So it should look something like:

http://www.yourcompany.com/catalog/ext/modules/payment/worldpay/junior_callback.php

Please change the red colored lettering to reflect your company's url. For World Pay (not Worldpay Junior) use the Payment Response Url as specified here. If you use the above Payment Response url for Worldpay Junior, it does not work.

Only set to "live" mode (through oscommerce admin>modules>payment>worldpay junior) once your application is approved. Otherwise keep it on test.

When you go and do a test run at Worldpay installation, click Edit Payment Pages>select your installation id>preview>change authorisation to "E" (default is "A") prior to hitting "Submit" otherwise you are going to get the same error message as I've specified above.

Regards. :)

#5 crazypig77

  • Community Member
  • 2 posts
  • Real Name:Kevin

Posted 17 April 2009, 09:54

View Postivyfleur, on Mar 17 2009, 04:34 AM, said:

Okay I found the problem and I hope this will help somebody else out.

As long as Worldpay has not approved your application you cannot go live. If you do, the error message above is what your are going to get.

The correct callback url or Payment Response Url for Worldpay Junior is to point the url to the junior_callback.php, that is in the Payment Response url row (in Admin>World Pay>installation) type or copy the path to your junior_callback.php. So it should look something like:

http://www.yourcompany.com/catalog/ext/modules/payment/worldpay/junior_callback.php

Please change the red colored lettering to reflect your company's url. For World Pay (not Worldpay Junior) use the Payment Response Url as specified here. If you use the above Payment Response url for Worldpay Junior, it does not work.

Only set to "live" mode (through oscommerce admin>modules>payment>worldpay junior) once your application is approved. Otherwise keep it on test.

When you go and do a test run at Worldpay installation, click Edit Payment Pages>select your installation id>preview>change authorisation to "E" (default is "A") prior to hitting "Submit" otherwise you are going to get the same error message as I've specified above.

Regards. :)

HI ivyfleur,

Are you using http://addons.oscommerce.com/info/5665 ? Did you did need to modify any of the 3 files?

I am using OSc RC2a.

I have enter the world pay production admin, enter the test setup. using the Payment Response URL eg http://www.your-url.co.uk/catalog/ext/modu...or_callback.php, checked the Payment Response enabled? Left all other unchange

In osc admin, entered my Installation ID, set Enable WorldPay Select Junior to true & set Test Mode to true.

When I run a test, entered the test card details. The payment page said payment sucessful. But do not have any button for the to press to go back to the site or automatically go back to the site. There for no email sent to customer & no comment log to the order history. Also tried just press the cancel button at the first payment page, it does not go back to the site & just struck there.

Do I need set in osc admin to live to test? Need help!!! Any one have the solution?

Regards,

Kevin

#6 Rozza

  • Community Member
  • 18 posts
  • Real Name:Carl Rosamond

Posted 03 September 2009, 23:34

View Postcrazypig77, on Apr 17 2009, 10:54 AM, said:

HI ivyfleur,

Are you using http://addons.oscommerce.com/info/5665 ? Did you did need to modify any of the 3 files?

I am using OSc RC2a.

I have enter the world pay production admin, enter the test setup. using the Payment Response URL eg http://www.your-url.co.uk/catalog/ext/modu...or_callback.php, checked the Payment Response enabled? Left all other unchange

In osc admin, entered my Installation ID, set Enable WorldPay Select Junior to true & set Test Mode to true.

When I run a test, entered the test card details. The payment page said payment sucessful. But do not have any button for the to press to go back to the site or automatically go back to the site. There for no email sent to customer & no comment log to the order history. Also tried just press the cancel button at the first payment page, it does not go back to the site & just struck there.

Do I need set in osc admin to live to test? Need help!!! Any one have the solution?

Regards,

Kevin


Hi Kevin,

Didi you ever get to the bottom of this - I have the same problem and it's driving me insane!


Regards
Carl

#7 ~Kira

  • Community Member
  • 181 posts
  • Real Name:Starlight Design
  • Gender:Female
  • Location:USA

Posted 17 September 2009, 14:56

I can possibly help. Send me a pm. Thanks!
☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆

#8 flykt

  • Community Member
  • 7 posts
  • Real Name:Steve

Posted 06 November 2009, 12:56

View PostRozza, on 03 September 2009, 23:34, said:

Hi Kevin,

Didi you ever get to the bottom of this - I have the same problem and it's driving me insane!


Regards
Carl


Hi all,

I am having the same issue and am wondering if you have a resolution.

When I use the world pay callback - http://<WPDISPLAY ITEM=MC_callback> - I get the return button to our website but nothing happens when you click it.


and when I use the world pay junior callback - http://www.yourcompany.com/catalog/ext/modules/payment/worldpay/junior_callback.php - I get no return button and still nothing happens. no callback no result can anyone help this is driving me crazy now.

cheers, flykt

#9 goring_gap

  • Community Member
  • 112 posts
  • Real Name:Simon
  • Location:UK

Posted 09 November 2011, 15:26

If you want to use multiple currencies try:

replacing:



$process_button_string .= tep_draw_hidden_field('M_sid', tep_session_id()) .
								tep_draw_hidden_field('M_cid', $customer_id) .
								tep_draw_hidden_field('M_lang', $language) .
								tep_draw_hidden_field('M_hash', md5(tep_session_id() . $customer_id . $order_id . $language . number_format($order->info['total'], 2) . MODULE_PAYMENT_WORLDPAY_JUNIOR_MD5_PASSWORD));



with:


  $process_button_string .= tep_draw_hidden_field('M_sid', tep_session_id()) .
								tep_draw_hidden_field('M_cid', $customer_id) .
								tep_draw_hidden_field('M_lang', $language) .
								tep_draw_hidden_field('M_hash', md5(tep_session_id() . $customer_id . $order_id . $language . number_format($this->format_raw($order->info['total']), 2) . MODULE_PAYMENT_WORLDPAY_JUNIOR_MD5_PASSWORD));

otherwise the callback will fail