Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Worldpay support III


scottymcloo

Recommended Posts

All files are present and correct to my knowledge... athlough one thing I'm not sure about is the current lack of domain? The domain I'm meant to be using is already on a production shop so I cant just redirect and see what happens... I'm using the main domain with the account name as the site addy...

 

It sounds like your paths are getting confused, and it can't find /includes/application_top.php which is the file it's trying to find on line 29 of wpcallback.php.

 

When you say 'domain with the account name', do you mean mydomain.com/~myuser ? If so, that might be where it's going wrong. I'd say it's a file paths problem one way or another, rather than permissions.

Link to comment
Share on other sites

  • Replies 281
  • Created
  • Last Reply

Top Posters In This Topic

Does anyone have any ideas on what would cause this?

 

hmmm.. haven't a clue on that one. Sorry! On mine all the payment modules show 'install' except for Worldpay which shows Edit and Delete next to it. Have you followed all the Worldpay module install instructions? You need to do more than copy files i think.

Link to comment
Share on other sites

Is the main problem that you're losing orders with people not waiting for the redirect after the visit to Worldpay? If so, I know how to fix that already. Oh and putting the transaction ID on the invoice and emails etc is quite possible too.

 

For more substantial improvements e.g. keeping the user on your own website, we're gonna have to switch to Select PRO from Select Junior. That's not a problem in itself, but it's all JSP based and many servers won't have that installed.

 

Mine, a RAQ 4, for instance - doesn't have it and I'd have to get Tomcat and other bits working first. I'm thinking that this has limited use to people as a Contribution since they may not have JSP either..?

 

So folks tell me - am I to investigate a whole new contrib based on Select Pro - or do we just need to fix the two things I mentioned above and we can all stay on Select Junior :huh: ?

 

Adam

Link to comment
Share on other sites

Pharkie,

 

I would love to know the fix for people not waiting forthe re-direct and also how to put order and transaction id's into the relevant places?

Link to comment
Share on other sites

Hi Pharkie,

 

I rebuilt everything from scratch. Now it's all working ok. Guess I cocked up transfering my database somehow. DOH!

 

For the impatient ones on the re-direct all I did was strip out the header file info so you just get the thanks for the payment, WorldPay banner and click here if this page doesn't continue. Simple, but seems to be working. Like the idea of putting the order number through though. Spill the beans Pharkie, or if they have already been spilled please point me in the right direction.

 

BTW I'm a select junior.

Edited by theDVDchart
Link to comment
Share on other sites

heh - erm it's not some big secret I'm keeping to myself :ph34r:

 

I'm just thinking that the PHP that puts the order into the database needs to be moved from the final page to wpcallback.php. That should work?

 

As for keeping the transaction ID, that needs a small amount of new code writing. Put the ID in the database somewhere then retrieve it from appropriate bits in admin.

 

Glad you got it working DVDchart.

 

hmmm actually ideally ALL the 'business' code should be moved into wpcallback.php and that page should become the final 'Thanks' page. Then it should just have a link saying "OK take me back to the homepage". Most users at that stage I anticipate will either close their browser or wander off to Google anyway - and that's fine so long as what needs to be done is done.

 

Someone want to try this? Or is it down to me :blink:

Link to comment
Share on other sites

heh ok. Well I just took a quick look and the process is:

 

wpcallback.php -> checkout_process.php (payment ok) OR back-to-payment-page (payment fail) -> checkout_success.php (the final Thanks page)

 

It's checkout_process.php that does the important stuff. It puts the order into the database and sends the order emails. It doesn't display anything, leaving that job to the separate checkout_success.php (which by the same token, doesn't do anything important)

 

Apart from the fact it'd be changing the way OSC likes to work, ideally checkout_process and checkout_success need to be brought into wpcallback.php so that this 1 file does all 3 things:

 

1) Called from Worldpay to do stuff.

2) Puts the order into the database.

3) Says Thanks.

 

I'm willing to have a go, but I'm going to have to install Worldpay into my test store to try it out and report back. I don't know when I'll have time for that but I'll try and remember.

Link to comment
Share on other sites

Two things:

 

1) The current wpcallback.php uses a META refresh redirect, which they don't allow for legal reasons. The user must have chance to read the Worldpay box before continuing. If I can sort this that'll be fixed.

 

2) Ideally the amount charged should be checked against the amount OSC asked Worldpay to charge. It's possible (easy, actually) to change the amount charged on an order with a javascript debugger like the one free with Mozilla.

Link to comment
Share on other sites

1062 - Duplicate entry 'e87cb00d1c18c8ac90d0f2cb81ad15fa' for key 1

insert into sessions values ('e87cb00d1c18c8ac90d0f2cb81ad15fa?language=en', '1073074226', 'cart|O:12:\"shoppingcart\":4:{s:8:\"contents\";a:0:{}s:5:\"total\";i:0;s:6:\"weight\";i:0;s:12 - etc etc

PLEASE HELP!!!!! :angry:

 

I'm still going round in circles with this one I'll explain a bit better maybe someone could help.

 

When a payment is compleated and the world pay banner is being displayed in wpcallback 'responce from worldpay - etc'. At the bottom of the screen Im getting all of the gobbledy goop above (TWICE) then [TEP STOP] after each instance.

 

I'm pretty sure somwhere the script is trying to insert something into the database more than once and it's having trouble.

 

I have tried re-installing the contribution. And tried going through all of the scripts involved. But I still cant find the culprit.

 

If I comment out the very last

require(DIR_WS_INCLUDES . 'application_bottom.php');

In wpcallback. It only outputs the error once.??

 

Any help would be GREATLY!!!!! received!

 

Regards

 

SAM

Link to comment
Share on other sites

Sam

 

If you have followed the install instructions correctly, your problem will not be with the WP Payment Module, OSC or WorldPay as you know that many others are using this module without problem.

 

So the issue must be with your setup or configuration. I would start by checking your settings for Sessions in Admin. Set them all to false and try again.

 

Next, do you get any problems with any other payment modules or parts of your store?

 

Do you store sessions in MySQL in configure.php?

Ian-san

Flawlessnet

Link to comment
Share on other sites

Hello Thanks for replying -

I've checked the install instructions very carfully. And gettting the definate feeling it's only me that has this problem.

 

I have checked all of the session settings in admin - they are all false.

 

Hello Thanks for replying -

I've checked the install instructions very carefully. And am getting the definite feeling it's only me which has this problem and apologise in advance if this post is causing any annoyance.

I don't have any problems with any other modules of parts of my store. Which is why it's so frustrating. I?ve checked all of the session settings in admin - they are all false. And store all of my session variables in mysql. ????

Link to comment
Share on other sites

Sam

 

Keep posting - we all live and learn!

 

Try removing line 125 of modules/worldpay.php (the oscSid) - be careful, it is the last line of the string so you need to terminate the above line.

 

I am certain your problem has something to do with your store attempting to restart a session and finding that it already has an identical one stored.

Ian-san

Flawlessnet

Link to comment
Share on other sites

Thankyou Ian,

I thought that might work! But sadly it didn't :-( Any other Ideas??

 

Do you know at what point it re-connects to the original session upon return to my server??

 

I think that its trying to insert instead of update... but I cant find the blighter to be sure :D

Link to comment
Share on other sites

I think that its trying to insert instead of update... but I cant find the blighter to be sure

 

That sounds unlikely, for the reasons Ian says that everywhere else the code works fine.

 

I think it more likely that it's something to do with domains and sessions and cookies. It could be that the cookie containing the session ID has difficulty crossing between https and http URL's/domains? Or something to do with how Worldpay's dealing with you, transferring the user around.

 

Have you tried simply switching to file-based rather than db-based session storage? See if it at least throws some light on the problem.

 

It will reconnect to the original session at the first point it comes back to your server, which is wpcallback.php, which calls application_top.php.

 

Removing application_bottom.php and 1 error disappearing is interesting. That sounds like this file is trying to make use of a session variable, not finding a session available and trying to be good and create a new one. Have you checked that you get the same error on other computers and it's not just and you-and-your-cookies problem?

Link to comment
Share on other sites

I thinks your right ! Thank you !!! Whooo Hooo I'm making Progress (at last!) Now I just have to figure out how to get worldpay to return to my site using ssl instead... Should be fun!

Thanks again !

Link to comment
Share on other sites

I would just like to say a big thankyou to everyone who helped me during this VERY stressfull time !!

 

I have now solved the problem. Without you I think I'd have a very sore head from bashing it agenst my desk!!

 

If anyone else has this problem in the future it was to do with my https cookie domain set up in configue.php I had a typo! Typical it's the little things that can really mess you up!

 

Thanks again

 

Sam

Link to comment
Share on other sites

Cheers for posting the answer Sam - hope it helps other peeps.

 

Glad it's working for you now B)

 

I'm still thinking about how to improve this contrib, but I just have no time at the mo - I'm busy both at work and home!

 

Ian are my ideas any use to you? If not, I may look into it again at the weekend.

Edited by Pharkie
Link to comment
Share on other sites

  • 2 weeks later...

I am having the same problem has Sam had with the 1062-Duplicate entry error.

 

The payment goes through etc, its just the ugly long error warnings on the bottom of the screen that looks horrible.

 

I have checked my cookie_domain paths, and unfortunately no typos there :(

 

Just to check tho, I have a dedicated SSL , so can someone just confirm that my settings should be...

 

define('HTTP_COOKIE_DOMAIN', 'xxxxxxx.com');

define('HTTPS_COOKIE_DOMAIN', 'secure.xxxxxxx.com');

define('HTTP_COOKIE_PATH', '/store/');

define('HTTPS_COOKIE_PATH', '/store/');

 

obviously i have substituted xxxxxx's for my real domain.

 

I have been trying so many different settings over the last few days to get this working, but whatever I try doesnt seem to work..

 

Any help anyone?

Link to comment
Share on other sites

Hi,

 

I'm new to osCommerce, Worldpay and PHP, and I'm currently testing out a few things using the test mode of Worldpay.

 

I was testing out the cart, and on the last page before I get directed to Worldpay, I did a 'view source' on internet explorer, and noticed that values such as 'instId' and the final cost is on there.

 

Isn't this a problem as someone could easily change these values? or is there something i'm not understanding?

 

Thanks for your help.

 

Yickman

Link to comment
Share on other sites

It's insecure, yes. Someone could alter the values before they go to Worldpay, relatively easily.

 

I think I said this a few pages back in this thread :D

 

My answer is to ask Worldpay how much was billed, which is in the info they return to you. This needs to match what was requested. This check isn't done at the moment, as far as I'm aware (and I think I checked).

 

At the moment the only defence you have is to check the figures make sense when you come to fulfil the order, in the admin screens.

Link to comment
Share on other sites

Hi Pharkie,

 

Thanks for the quick reply. Sorry I missed your message from before.

Yes we will have to check that the values match then. We are planning to use pre-authorisation so that'll give us some time to check.

 

Thanks again.

 

Yickman

Link to comment
Share on other sites

  • 2 weeks later...

hi

i've got a problem with my worldpay 4.0 v1 module.

It's installed on os commerce ms2.2

the order can be placed by the customer and is received by worldpay. However i am not getting it in my admin panel. Cash payments come through fine.

Ive checked my mysql file and the 'INSERT INTO ORDERS_STATUS VALUES...' seem to be there.

I've had the callback url in worldpay admin as

http://<wpdisplay item="MC_callback">

and

<wpdisplay item="MC_callback">

still no joy

 

please please can someone help?

 

cheers

nainesh

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...