Jump to content
Sign in to follow this  
scottymcloo

Worldpay 4.0 - Version 1.0

Recommended Posts

THe non frameset window prevent the user from clicking a link other than continue. If the user did this, the database was not updating, despite payment being received.

 

The newest version (1.4) removes these boxes to prevent this happening and also updates the database automatically if the user does not click continue within 10 seconds. The funtionality of both version 1.3 and 1.4 is the same (except if you use Yen!), and if you are aware of the issues, you can continue to use 1.3, but I would not reccomend it.

 

Graeme

Share this post


Link to post
Share on other sites

Nice one Graema. :bigups:

 

I will give feedback after I install it.

 

Especially considering I am about to try this new version on my older than Jan 14th snapshot.

 

I have made some updates thus:

I updated a couple of functions and the database to allow the update of order status.

I did not do anything else.

 

I'll report back more when I have tested in 2 minutes.

 

CC.

Share this post


Link to post
Share on other sites

Right then....

 

This is the result.

 

I have a December 17th (ish) snapshot which had problems running the first versions of Graeme's excellent code.

So, I did these tweaks in order to make the module run, which it appears to now do sucessfully!

(BTW - These can be found on page 3 of this thread also)

 

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());

[/code]

 

This does not produce any errors when I run a test purchase, and I then get all the follow up emails saying someone has purchased via Worldpay.

Also the site is updated in both the customer side and in Admin.

 

So in conclusion for me, this NEW version Graeme has just released seems to work perfectly for me on my older than Jan 14th snapshot using the tweaks I hae mentioned above.

 

If I do find any problems I will be sure to let you all know ASAP.

But it appears this is a winning solution for us.

 

Thanks Graeme!

 

CC.

Share this post


Link to post
Share on other sites

Just updated to version 1.4 and it works like a dream. I did a number of test purchases to try and reproduce the potential actions of my customers and all went according to plan.

 

I suppose there is no way of stopping a customer from closing the browser window before the 10 sec are up but at least it will be their fault for not following the instructions on the screen.

 

I think the latest version (1.4) will solve 99.99% of my worldpay integration issues.

 

Thanks Graeme

 

Hyzepher

Share this post


Link to post
Share on other sites

Is this compatible with 2.2 Milestone 1?


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 am not sure tbh

 

It is only a small install, so just try it and let us know.

 

CC.

Share this post


Link to post
Share on other sites

I'm using it with MS1 without any problems.

 

Well only one - I still get a warning poping up when I leave the worldpay page telling me that there's a mixture of secure & unsecure content on the callback page. I'm concerned that a punter will spook at his and cancel the transaction.

 

Any Idea how to address this?

 

Kenny


If you learn more than you forget then that's a good thing.

Share this post


Link to post
Share on other sites

Hi

Have so far been using the fantastic WorldPay module with great success. Nevertheless, one little snag occurred today. WorldPay issued a Warning about a user's credit card (though authorized the payment).

 

Unfortunately, OSCommerce did not register the product as ordered (Callback error?).

 

Has anyone experienced this and found a solution?

 

Thanks

Share this post


Link to post
Share on other sites

I get warnings from Worldpay (by email) all the time without this happening. I have had one customer though who didn't return to my page after having paid by Worldpay and now seems unable to order at all from me. It sounds to me like a cookie problem but he has tried on two different machines with the same problem. He tells me he gets as far as selecting the method of payment (he chose cheque) and then gets sent back to an earlier screen - sorry I can't remember which one. Effectively he is stuck in a loop at checkout.

Share this post


Link to post
Share on other sites

Installed Worldpay today and it worked beautifully first time.

 

Thanks ... Dinkydoo!

 

Ali

www.freelollies.co.uk


www.vengavenga.com

World Wide Web Weavers

Share this post


Link to post
Share on other sites

When the customer goes to Worldpay only 2 things can happen - either the payment is approved, or the user cancels the transaction (if their card is rejected, or if they feel like cancelling, or for any other reason). Therefore, if a warning is subsequently issued by e-mail about the transaction, the module, or osCommerce does not know about it.

 

A callback error will occur if Worldpay cannot access the wpcallback.php file. This may happen occasionally (although I've never seen it). The solution to this is to upload the resultC and the resultY files which will be used if the callback fails. These files are simply html files that can redirect the user back to the relevant page in osCommerce.

 

Have you asked the user who cannot order anymore to clear his cache and delete cookies from his local machine?

Share this post


Link to post
Share on other sites
When the customer goes to Worldpay only 2 things can happen - either the payment is approved, or the user cancels the transaction (if their card is rejected, or if they feel like cancelling, or for any other reason).  Therefore, if a warning is subsequently issued by e-mail about the transaction, the module, or osCommerce does not know about it.
Yes this looks like a red herring
 

The solution to this is to upload the resultC and the resultY files which will be used if the callback fails.

This may be the problem as I had a resultC and resultY file on my server. perhaps these are the wrong ones. Do you have a working example of these files?

Have you asked the user who cannot order anymore to clear his cache and delete cookies from his local machine?
Yes this is what I have suggested.

Share this post


Link to post
Share on other sites

This is the first time I work with online payment/worldpay so please bear with me...

 

I am still some time away from going live. I would like to test out Worldpay, but I don't want to sign up now and start paying subscriptions even before my site is ready.

 

So, my question is, does Worldpay provide some sort of universal test account for anyone to try out? Or do I really need to get a working account with them before I can do that.

 

Any help is appreciated.

 

Linus Kerk

Share this post


Link to post
Share on other sites

Thanks Graeme,

 

So.. there's no way i can use a test account on my site? Meaning incorporate into my store.

 

 

Linus

Share this post


Link to post
Share on other sites
I'm using it with MS1 without any problems.

 

Well only one - I still get a warning poping up when I leave the worldpay page telling me that there's a mixture of secure & unsecure content on the callback page. I'm concerned that a punter will spook at his and cancel the transaction.

 

Any Idea how to address this?

 

Kenny

 

I'm having this problem too!! Any help would be greatly appreciated!!

 

Ta,

Phil

Share this post


Link to post
Share on other sites

Actually, the SSL error was due to an external Javascript file I was calling. Took it out and that fixed it!

 

I have a few more queries though...

 

The mod doesn't seem to pass the Country through to WorldPay. A look at the hidden input file it generates before going to World Pay shows the "country" value to be "U" rather than "GB" or "USA" or whatever. Not a big thing, but it means the customer has to select their country again on the payment page. Any ideas how to fix this?

 

Also, I get a "page not found" error if I wait the 10 seconds for the redirect once the payment has been processed. Yet I don't get this if I click the button. Again, any ideas?

 

Ta,

Phil

Share this post


Link to post
Share on other sites

Again... never mind!! Passed the sessionID into World Pay and all is well. Time for bed. Building the site for my girlfriend. The things you do for love, eh?? :roll:

 

Phil

Share this post


Link to post
Share on other sites

I just had a single payment from Worldpay and two matching orders in admin with different order numbers both confirmed to the customer and with the same time and date.

I checked and there were no rejected payments either. Can someone just hit refresh and generate a second order?

Share this post


Link to post
Share on other sites

Just tested, pretty nice, I sent them a request for pricing earlier this afternoon. How do they compare to Echo?

 

Also, are there ways to set up merchant accounts without having to actually go to their site for the payment?

 

A way in which the customer never leaves your site?

Share this post


Link to post
Share on other sites

Hi Mooligan

 

I have no experience of Echo - maybe someone else can tell you.

 

No, there is no way to have online (real time) payments without going to the Worldpay site - you can customise it to a certain extent, ie colours, logo at the top, etc.

 

The whole point of Worldpay is that you dont need a merchant account and you can provide secure transactions to your customers.

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  

×