Jump to content
Sign in to follow this  
scottymcloo

Worldpay 4.0 - Version 1.0

Recommended Posts

Graeme

 

Solving the session ID is easy see my first posting.

 

1) Instead of passing WorldPay the store and customer name as the cartId you should pass the session id to WorldPay. This is done in the payment module by changing:  

 

tep_draw_hidden_field('cartId', STORE_NAME.' : '.$order->customer['firstname'].' '.$order->customer['lastname']  

 

to  

 

tep_draw_hidden_field('cartId', $worldpay_url  

 

note $worldpay_url was already set in the module and is the session name and session id ie $worldpay_url = tep_session_name() . '=' . tep_session_id() ;  

 

2) On callback WorldPay passes cartId back to the site and hence you can use this in the tep_href call.

 

Basically this passes the Session ID to WorldPay who then pass it back once they have taken the payment. I have updated my callback page further to store the transId which they also pass back. The information is set out in WP's integration manual. This gives all the variables available on a callback.

 

The above is 5 min job and allows you to also store all the address info through SSL.

 

Hope this helps.

 

Nick

Share this post


Link to post
Share on other sites

Hi

 

I have the Session ID sending and returning successfully from Worldpay (thanks Nick), but when I call the payment_process.php file (or any other file), with osCsid attached, Worldpay reports a redirect error.

 

Worldpay will not permit a redirect URL. I do not know what osCommerce is redirecting.

 

I would like to persevere with this approach as it is the cleanest way to return to osCommerce, so any help is much appreciated. If you think this way forward is futile, please let me know.

 

Thanks

raeme

Share this post


Link to post
Share on other sites

I am not certain but I think the issue is WP require you to display a page on their site. Hence the callback page is actually loaded through their server and they don't allow you to redirect.

 

This was mentioned as part of the original contribution by the other Graeme.

 

Nick

Share this post


Link to post
Share on other sites

Just a thought.

 

Graeme Simms has also released a WP contribution (although untested) between your contribution and his you might just be able to produce the definitive version. 8)


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 have set up the latest Worldpay release incorporating two new features as detailed in this forum above.

 

1. Currency uses decimal places from the Worldpay configuration file allowing no decimal currencies to be used (eg Yen)

 

2. The callback file shows the Worldpay receipt and then redirects to checkout_success after 10 seconds to update the database with the order details.

 

I wanted to incorporate the Worldpay callback direct from the Worldpay screen, but this proved impossible as they do not allow redirects.

 

Thanks to Ian and Nick for their help.

 

Please test this demo installations with both cancellations and payments using a test credit card number (e 4444333322221111) and let me know your comments. (I have disabled the receipt e-mails as this will just fill up my mailbox and confuse with my live site.)

 

Url: www.irishsportscorp.com

 

I will release in the next day or so if everything goes well.

 

Graeme

Share this post


Link to post
Share on other sites

Well I do believe you may have got a nice working version.

 

It appears to do the job nicely!!

 

I just tested it, it ran thru perfectly.

I see you have removed the left and right columns too, so as to avoid ppl being tempted.

 

Great stuff!

 

Look forward to the release.

 

CC.

Share this post


Link to post
Share on other sites

Graeme

 

I would recommend adding a big 'Close this window' button to the 'Your payment was successfully received - Thank you! ' window.

 

When you get this window, you then get the standard pop-up 'your are about to leave a secure internet connection..' box. If the customer says 'no' to this, and then closes down the window using the X in the corner, you do not get the confirmation of the order. If you add a big button, there is a 99% change that they will use it to close the window and so reduce this risk.


Ian-san

Flawlessnet

Share this post


Link to post
Share on other sites

Ian,

 

I have added a continue button, and also left the redirect on after 10 seconds. My system does not display the warnings you describe, so would be grateful if you could test for me.

 

I have left the cancel order as is.

 

Graeme

Share this post


Link to post
Share on other sites

I didnt get the leaving secure zone popup.

 

Surely most ppl using WP wont have SSL anyway due to the fact that WP take care of the secure server bit...

 

It is a suggestion to bear in mind tho if many do use SSL.

 

CC.

Share this post


Link to post
Share on other sites

I would have been more tempted to have the last line read:

 

Please wait

 

And then have some message like "if the page does not continue in 10 seconds please click the continue button." yada yada yada...

 

It would be nice to let them know the page is gonna refresh on its own.

Otherwise they might be caught by surprise if it moves on when they were not expecting it.

 

Or maybe even "You MUST click continue to finalise your order." and then get rid of the refresh...

 

CC.

Share this post


Link to post
Share on other sites

I agree that it is best if the user clicks continue, however, they could (as I know to my cost) still click the breadcrumb at the top, or close the window. (this has now been greatly minimised)

 

I could of course set this up as a configuration item in the WP admin screen whether to redirect or wait for click or both, then the store owner can decide what they want.

 

Changing the text is no problem....and is done!!! :wink:

 

Another option is to remove the header, but I dont think this will look too good.

 

Any comments?

Share this post


Link to post
Share on other sites

Graeme

 

Much better! Now if I cancel the pop-up security warning (which is due to my high security setting on my PC) I still get left with the thank you window as before.

 

However, now I would normally try to close it using the button. Even though I get the security warning again, I now know that I have to click 'yes' to close the window and I return to the store with no problem.

 

I would also add cc 's suggestion plus maybe reduce the time out a bit on the redirect to the minimum allowed.


Ian-san

Flawlessnet

Share this post


Link to post
Share on other sites

I agree, you cant remove the header.

It has to resemble the original site somewhat.

 

My only fear would be when you get one of those types of customers that feels they have to write down everything they see on the screen, and before they can do this it clicks and moves on.

Then you will get the inevitable call from the customer wanting to know why etc etc etc.

 

But then I fully agree that that is a small price to pay compared to having to chase a customer to find out what the actually did buy from you :lol:

 

I would say, as long as it clearly states they should wait just that bit longer until the order has finished processing, and then it moves on or they get the option, I dont see why this is not a good solution.

 

I'm game!

Either way it works, and although you cant fully stop the odd problem here and there, this has gone a long way to avoid it.

If it clearly states they need to wait for the process to finish, then at least if they dont wait the ball is in the store owners court and they can remind the customer they should have waited...

 

Right I think I have babbled enuff.

 

I think its great.

 

CC.

Share this post


Link to post
Share on other sites

I agree CC.

 

There is also the issue of Worldpay requiring that this receipt is displayed to the user - 10 seconds should be enough to satisfy them - could also add a print this page button??

 

I have tried shortening the delay to the minimum (ie 0), but even I got confused with the screens popping up and disappearing before they could be read and will generate more problems than it solves.

 

So, I think I will leave it as it stands just now - it seems to do most of what is wanted so far.

 

I will wait until tomorrow night to see if there are any other comments, issues, etc before putting into the contributions.

 

Graeme

Share this post


Link to post
Share on other sites

:D

just tried your WP integration .. fantastic .. worked first time for me ... ill try and install it tomorrow...

 

im a Worldpay partner and I know how frustrating they can be!! We mainly do windows based integration (ASP.NET) etc but I thought id make use of one of the RAQs.

 

If you get to frustrated I know a lot of the guys in Cambridge, i might be able to mediate!

 

Also if you every need another worldpay account we give a CASHBACK when you sign up.

 

 

Andy Caisey

Teckna Ltd

E: andy.caisey @teckna.com

 

Need to take credit cards online or offline ?

As a Worldpay partner you can and get money back on their normal charges. Call today or visit our website: www.tecknapay.co.uk


Andy Caisey

Teckna Ltd

E: andy.caisey@teckna.com

T: 0870 922 0904

 

Need to take credit cards online or offline ?

As a Worldpay partner you can and get money back on their normal charges. Call today or visit our website: www.tecknapay.co.uk

Share this post


Link to post
Share on other sites

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

 

 

just tried your WP integration .. fantastic .. worked first time for me ... ill try and install it tomorrow...

 

im a Worldpay partner and I know how frustrating they can be!! We mainly do windows based integration (ASP.NET) etc but I thought id make use of one of the RAQs.

 

If you get to frustrated I know a lot of the guys in Cambridge, i might be able to mediate!

 

Also if you every need another worldpay account we give a CASHBACK when you sign up.

 

 

Andy Caisey

Teckna Ltd

E: andy.caisey @teckna.com

 

Need to take credit cards online or offline ?

As a Worldpay partner you can and get money back on their normal charges. Call today or visit our website: www.tecknapay.co.uk


Andy Caisey

Teckna Ltd

E: andy.caisey@teckna.com

T: 0870 922 0904

 

Need to take credit cards online or offline ?

As a Worldpay partner you can and get money back on their normal charges. Call today or visit our website: www.tecknapay.co.uk

Share this post


Link to post
Share on other sites

Yup! Works for me too.

 

I also get the pop up saying there's a mixture of secure and unsecure content on the callback page and I agree it might scare some people.

 

Apart from that, the only alternative I could offer is to put the WP return into a pop-up of it's own but I doubt if the session/cart/callback stuff would link back as easily. (can you tell I'm no programmer?)

 

Look forward to installing the revised contribution.

 

Thank you

 

Kenny


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

Share this post


Link to post
Share on other sites

Ezeman,

 

I have tried using separate windows using Java for the payment script and there are a few posts about this subject. I was not happy with the general look of that, so decided against it - ie users could click the wrong window and hide the popup, etc.

 

The popup is a security setting issue which cannot be changed from within osCommerce.

 

Thanks for your input.

 

Graeme

Share this post


Link to post
Share on other sites

I dont think you can cover every possibility, I have been playing with this idea:

 

Create a pop-up window to say 'thank you for your payment, please close this window to complete your order.'

 

Initially, this will be behind the security alert if there is one.

 

Then when the user closes this window, invoke the redirect to checkout_process.

 

Could use something like:

 

win1=window.open('opener1.html','window1','width=300,height=300')

 

if (win1.closed) function1() else function2()

 

or

 

if (window.opener.closed) function1() else function2()

 

invoked using an onload in body.

 

Problem is not sure if it will run when the security alert is manually closed as technically, the user does not actually enter the insecure site - the url remains as worldpay.


Ian-san

Flawlessnet

Share this post


Link to post
Share on other sites

Well after a couple of us at our business look at all suggestions, we have decided that Graema's test from last night was probably the best suggestion.

 

Have a continue button and also the refresh to the next page for completion after 10 seconds, and also the removal of the columns is the best answer to most of the problems.

 

We now just await Graeme's release of this verison.

And we will use this, it seems to be tried and tested with little feedback of problems, or can you tell us any different Graeme from any new feedback?

 

CC.

Share this post


Link to post
Share on other sites

CC

 

All the feedback I have received is through this forum - so as far as I know there are no lurking outstanding issues.

 

The issues raised in this forum (from Beta version 1.0) have all been addressed, and therefore I think this version is stable, logical and easy to use from the customers point of view, and incorporates all the basic requirements that have been asked for.

 

The main problems have been user who have code older than 14th January, when the payment sorting was added, but I have created a module that fixes this and I will send on request.

 

I need to do a small bit of tidying up (ie removing commented out code that I replaced), and then will post as a contribution tonight.

 

Graeme

Share this post


Link to post
Share on other sites

Nice one Graeme.

 

Your hard work is apprciated.

 

Also tho you mention this:

The main problems have been user who have code older than 14th January, when the payment sorting was added, but I have created a module that fixes this and I will send on request.

 

I have a version older than this, but I think I completed a work around for this, but just in case can you please email me the module fix you have created so I can see how if compares with the fix I implemented. I need to make sure I am not missing something. Thanks.

 

I have PM'd you my email.

 

CC.

 

P.S. - Look forward to tonight when the stable version is released!! :bigups:

Share this post


Link to post
Share on other sites

I have added the latest Worldpay module into the contributions section.

 

Version 1.4 Removes boxes to prevent users from clicking away before update, Fixes currency for Yen, Redirects to Checkout_Process after 10 seconds or click by user.

 

This will only work for snapshots after 14/01/2003.

 

Please ensure you fully test before going live.

 

Thanks to Steve, Ian and Nick for their help in getting this module together.

 

Some feedback from others would be nice too !!! :shock:

 

Reggards

Graeme

Share this post


Link to post
Share on other sites

i notice the old version was in the shop frameset and the new is in its own window... is this because if the refresh code?

 

tried the test site and it worked well ... but does it have to be new window ? in the frameset the customer has to anser and can miss it ..

 

 

Andy


Andy Caisey

Teckna Ltd

E: andy.caisey@teckna.com

T: 0870 922 0904

 

Need to take credit cards online or offline ?

As a Worldpay partner you can and get money back on their normal charges. Call today or visit our website: www.tecknapay.co.uk

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  

×