Jump to content
Sign in to follow this  
scottymcloo

Worldpay 4.0 - Version 1.0

Recommended Posts

Hi

 

Ive just added a contribution for Worldpay version 4.0. This will work with all snapshots after 1/11/2002. Please test thoroughly before using in a live environement.

 

Thanks to Graeme Simms and others on this forum for their help in getting this module together.

 

You can see a demo of this working at http://www.irishsportscorp.com. This is my test site, so it may not always be working.

 

Use a credit card number of 4444333322221111 and any expiry date.

 

I've started a new thread for this as there are many posts dotted about and any questions should be posted here.

 

http://www.oscommerce.com/community/contributions,882

 

Graeme

Share this post


Link to post
Share on other sites

Seems to work very well mate.

 

Didnt spot any problems whatsoever when I did a test purchase.

 

I guess you will be able to check the admin end also, and confirm if this is successful.

 

I dont use WorldPay and honestly dont know much about it, but this runs very nicely.

 

CC.

Share this post


Link to post
Share on other sites

oooops.

 

I take that back.

 

Dunno why, but when I had confirmation of the order, it was fine, cart empty, confirmation fine all done no problem.

But when I go to my account, it says no orders made, and then I look to cart and it has my product still in it.

 

Is this part of your WP mod, or something different on your site, seeing as you are testing and building at the mo.

 

CC.

Share this post


Link to post
Share on other sites

Hi CC

 

Thanks for checking this out. I just ran a test myself and it appears in my Order history. Did you by any chance not click on continue after the worldpay receipt and after the final confirmation. I know this is a problem with OSc and not just the module here. There is a separate contribution that sorts this out I believe.

 

Graeme

Share this post


Link to post
Share on other sites

Hmmm...

 

TBH - I cant remember, but you might be right.

 

I think I may have gone to a category instead.

 

Just goes to show how hard we make it for our customers dont it. :wink:

 

I think I'm gonna do a search for the fix.

 

CC.

Share this post


Link to post
Share on other sites

Hi

 

Ive just discovered a problem with my installation instructions for Worldpay V4.0, when helping another users get up and running.

 

When you enter the URL into the Worldpay callback URL, ensure you enter everything in lower case. On Unix boxes the case matters - this did not affect me and as I run on W2k.

 

eg. Callback URL should be - http://www.yourdomainname.com/wpcallback.php

 

Regards

Graeme

Share this post


Link to post
Share on other sites

I have added an updated contribution for Worldpay. This version adds Pre-Authorisation options.

 

I have tested this on only 1 implementation of Pre-Auth, therefore I need some more testing.

 

Can someone please test and post back if it all works as expected.

 

Please uninstall any previous Worldpay modules before installing this one. Instructions are in the zip file

 

Graeme

Share this post


Link to post
Share on other sites

I've uploaded version 1.3 of this module which fixes a problem with carts using more than 1 currency.

 

This also adds addiitonal features of sorting payment types and adding the current status (pending, delivered and processing) to all orders when complete - applies to snapshots after 14/01/2003.

 

Graeme

Share this post


Link to post
Share on other sites

M8

 

I installed this contribution and when I clicked on the green button to activate it i got -

 

Warning: call_user_func() expects first argument, 'tep_get_order_status_name', to be a valid callback in /admin/includes/functions/general.php on line 1232

 

if I try and edit the payment option i get -

 

Fatal error: Call to undefined function: tep_cfg_pull_down_order_statuses() in /admin/modules.php(204) : eval()'d code on line 1

 

Any ideas - using snapshot from 19/11/2002

 

Hyzepher

Share this post


Link to post
Share on other sites
M8

 

I installed this contribution and when I clicked on the green button to activate it i got -  

 

Warning: call_user_func() expects first argument, 'tep_get_order_status_name', to be a valid callback in /admin/includes/functions/general.php on line 1232

 

if I try and edit the payment option i get -

 

Fatal error: Call to undefined function: tep_cfg_pull_down_order_statuses() in /admin/modules.php(204) : eval()'d code on line 1

 

Any ideas - using snapshot from 19/11/2002

 

Even other languages e.g. German

 

Hyzepher

Share this post


Link to post
Share on other sites

dsl

 

I dont have other languages enabled on the site or the admin.

 

Did you get this worldpay contribution installed ok?

 

Hyzepher

Share this post


Link to post
Share on other sites
dsl

 

I dont have other languages enabled on the site or the admin.

 

Did you get this worldpay contribution installed ok?

 

Hyzepher

 

I had 4 languages installed, English, German, Spanish and Chinese.

Graeme's V.1.1 was ok for these languages but got the stated error message if upgraded to v1.2 /1.3

 

I don't know how to solve this problem.

Share this post


Link to post
Share on other sites

dsl

 

I narrowed the problem down to the fact that my 2.2 snapshot (11/19) is lacking some functions that are included in a further snapshot.

 

I have a feeling that I need to upgrade to a further snapshot - however, this may cause me some problem with customisation etc.

 

Any ideas

 

Hyzepher

Share this post


Link to post
Share on other sites

Version 1.2 and 1.3 will only work on snapshots after 14/01/2003.

 

I am on holiday just now and only checking mails. I can help if you are still having problems when I get back after 30th Jan.

 

Graeme

Share this post


Link to post
Share on other sites

Hi I've installed the WP module and its brilliant (well done)!

 

I do have one suggestion though. I would stongly suggest that the update to the shops admin system are fired from the callback page as it appears that you are reliant on the user clicking on the continue button to complete the transaction.

 

The problem with this is that a customer (as I did) could leave the shop as soon as they hit the callback page at which point although they have been successfully charged for the product by worldpay the shops admin system appears to be completely unaware of the transaction.

 

I'd volunteer to do it myself but at the moment I'm a complete newbee to both os commerce and php :oops: .

 

I'm a very recent (but enthusiastic) convert from MS asp :D


I wish....

I had the Money of Bill [Gates]

The Wit of Oscar [Wilde]

and could play the guitar like Carlos [santana]!!!

 

 

I guess I'll just have to settle with being me! :D

Share this post


Link to post
Share on other sites

I notice this error when trying to use the admin

to configure WorldPay settings, as well.

-----------------------------------------------------------------------

Fatal error: Call to undefined function:

tep_cfg_pull_down_order_statuses()

in myserverpath/catalog/admin/modules.php(204) : eval()'d code on line 1

-----------------------------------------------------------------------

RE:

Version 1.2 and 1.3 will only work on snapshots after 14/01/2003.

 

My snapshot is after 14/01/2003

but i still get the error...

 

I swapped the admin/modules.php file for the current one (27.1.2003)

and i still get the error...

 

From errors ive seen like this, before.. i suspect some

missing 'define' from application_top.php, or maybe modules.php,

or.. a typo in the DB or maybe in one of the worldpay.php files ?

etc.. etc..

 

Im not sure..., but wondered if you knew where the problem might be ?

 

In theory, i can bypass admin, and go direct through phpmyadmin

and edit the DB direct, but obviously it's something fairly minor,

it's just a bit of a pain to track down.. :?

 

any ideas ?

Share this post


Link to post
Share on other sites

just a quick update...

I did a fresh install and the admin works fine now..

must have been some conflict somewhere.. :?:

 

Handy to know which files from an old snapshot would need edits to get this to work pre 14.1.2002 -- as it's a pain to redo a 'live store' with a full snapshot update :wink:

Share this post


Link to post
Share on other sites
just a quick update...

I did a fresh install and the admin works fine now..

must have been some conflict somewhere.. :?:  

 

Handy to know which files from an old snapshot would need edits to get this to work pre 14.1.2002 -- as it's a pain to redo a 'live store' with a full snapshot update :wink:

 

Sorry can't catch your point.

Do you mean to update os will solve this problem?

Or a complete fresh os will do as well?

Share this post


Link to post
Share on other sites

If all it does is update the status of the order, can you not just remove that?

 

Or add this to the database in order for it to then allow the update?

 

I havent tried this as we dont use Worldpay, but it is worth a try...

 

CC.

Share this post


Link to post
Share on other sites

Forget that, I thought it better to check it for you and solve the problem.

 

Try this.

 

Add this to admin/includes/functions/general.php right before //Return a random value:

  function tep_cfg_pull_down_order_statuses($order_status_id, $key = '') {

   global $languages_id;



   $name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');



   $statuses_array = array(array('id' => '0', 'text' => TEXT_DEFAULT));

   $statuses_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . $languages_id . "' order by orders_status_name");

   while ($statuses = tep_db_fetch_array($statuses_query)) {

     $statuses_array[] = array('id' => $statuses['orders_status_id'],

                               'text' => $statuses['orders_status_name']);

   }



   return tep_draw_pull_down_menu($name, $statuses_array, $order_status_id);

 }



 function tep_get_order_status_name($order_status_id, $language_id = '') {

   global $languages_id;



   if ($order_status_id < 1) return TEXT_DEFAULT;



   if (!is_numeric($language_id)) $language_id = $languages_id;



   $status_query = tep_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . $order_status_id . "' and language_id = '" . $language_id . "'");

   $status = tep_db_fetch_array($status_query);



   return $status['orders_status_name'];

 }

 

The add this to the database (If you have phpmyadmin etc, just use this code):

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) VALUES ('Set Order Status', 'MODULE_PAYMENT_WORLDPAY_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now());

 

This works to clear the error, but I can not actually test it as we have no Worldpay Account.

 

Can someone test it and feedback if it fixes the problem or not.

This way everyone can update their site to fix this if poss.

 

ta.

Hope it helps.

 

CC.

Share this post


Link to post
Share on other sites

Did anyone test this in the end to see if it worked on a live purchase?

 

If you did could you post back so other users will know please.

 

We dont use Worldpay, so I cant test it myself.

But I am sure there are many users out there that would like to know if this fix worked.

 

CC.

Share this post


Link to post
Share on other sites

In order to avoid problems with errors with snapshots before 14/01/2003, I have created a Worldpay module which works before this.

 

To avoid confusion with the current contribution (version 1.3), please e-mail me and I will send it to you.

 

In other words, install the Worldpay version 1.3 as per the instructions, and if you get errors about order_status, send me an e-mail and I will send a version that works with snapshots prior to 14/01/2003 (but after 01/11/2002 :D !!!)

 

Graeme

Share this post


Link to post
Share on other sites

Tried to create account, go error message

Warning: Failed to Connect in d:irishsportscorpcatalogincludesclassesemail.php on line 502



Warning: Cannot add header information - headers already sent by (output started at d:irishsportscorpcatalogincludesclassesemail.php:502) in d:irishsportscorpcatalogincludesfunctionsgeneral.php on line 23

 

 

Sean

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×