Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Worldpay support III


scottymcloo

Recommended Posts

Warning: session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /usr/www/users/amrit/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/www/users/amrit/includes/functions/sessions.php:67) in /usr/www/users/amrit/includes/functions/sessions.php on line 67

 

Not 100%, but this error could be due to white space in your files.

ie, after the closing ?> at the bottom of the page there should not be any un-used lines below them.

Give it a try anyway.

 

Is it a cookie / session issue?

Make sure you have recreate sessions enabled in your admin sessions.

 

Worth a go!

HTH

Julian

A little knowledge is dangerous, I SHOULD KNOW.

If Life Begins At 40, What ends????

Link to comment
Share on other sites

  • Replies 281
  • Created
  • Last Reply

Top Posters In This Topic

Not 100%, but this error could be due to white space in your files.

ie, after the closing ?> at the bottom of the page there should not be any un-used lines below them.

Give it a try anyway.

Make sure you have recreate sessions enabled in your admin sessions.

 

Worth a go!

HTH

Julian

 

Dear Friends,

 

Have tried many things but to no avail. Where do you suggest I look for extra white space by the way ? In which file ?

 

Thanks.

 

Martin

Link to comment
Share on other sites

Hi Guys,

 

Am getting somewhere...tested the callback url i.e. :

 

http://www.amritdirect.com/wpcallback.php?...181?language=en

 

When I remove the ?language=en

 

It works fine. It seems this is causing the error/bug.

 

Now how to stop this part of the code ? Is Worldpay doing this ?

 

Seems if I can removed the ?language=en bit it will work.

 

Many thanks to all,

 

Martin

Link to comment
Share on other sites

Hi Guys,

 

Seems the ?language=en at the end of the session data is being mistaken for part of the session and that is the bug.

 

I wonder why I am getting this and not other people ?

 

Any ideas how to disable this ? I am only using English so no need for ?language=en in this URL anyway.

 

Best Wishes,

 

Martin

Link to comment
Share on other sites

Hi Guys,

 

Finally solved this but would appreciate comments on the solution.

 

I found out the ?langauge=english was causing the problem in the callback URL. I thought either to disable this code in the worldpay.php module or another solution was to set the callback url manual (as in past versions) to :

 

http://www.amritdirect.com/wpcallback.php

 

rather than

 

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

 

It seems to work 100% now.

 

Can anyone comment on this please.

 

Sincerely,

 

Martin

Link to comment
Share on other sites

Hi All

 

Can anyone shed any light on how I can get the transaction ID or transID to show up in the admin orders or invoice pages? :huh: I am using the worldpay payment module at present:

 

http://www.oscommerce.com/community/contri...search,worldpay

 

I understand I need to save it to the database and use PHP code to display it from the database to the admin/ orders or invoice pages, I'm just not sure how as I am a novice with only limited programing knowledge. I can't find anywhere on the wpcallback.php where the transID is sent? I think it maybe in the actual worldpay module itself but still I am unsure of how to get the transID from the worldpay module to the database and then to the appropriate page as I don't know the syntax for the code :'( I would be really grateful if anyone can shed some light or if anyone else has solved the problem or has any code I can use as I'm totaly stuck on this one >_< Thanks in advance for any help.

 

 

Kind regards Joanna

Half your problems aren't problems at all and the other half are only half as bad as you think they are :)

Link to comment
Share on other sites

found the solution to my problem

and leave it here for those who follow!

 

problems:

after worldpay success i was being sent to login again

solution:

turned off search engine friendly urls

 

spotted if I use a "normal" link the session wasn't being lost

 

hope this saves soemone the hours I lost trying to tie this down

Matt

Link to comment
Share on other sites

Can anyone shed any light on how I can get the transaction ID or transID to show up in the admin orders or invoice pages?

Hi Joanna,

 

I have completely reworked my callback script BUT something like this might work for adding the WorldPay transaction ID into admin.

SO BACK UP FIRST, and if any of this doesn't match what you have then revert to your backup and apologies for wasting your time! I hope you're comfortable with php because I may have made a few mistakes here & there.

 

This gets the ID into the admin order lists (default order.php display). If it works for you then it won't be much effort to add the ID into the order detail page, invoice etc.

 

I'm afraid I don't have much time to spend on this board so don't count on any support of this. I'm providing this as a hint rather than a solution!

 

anna

 

1. In mysql:

alter table orders add `worldpay_transId` int(16) unsigned default NULL;

 

2. In catalog/wpcallback.php approx line 74:

replace

$url = tep_href_link(FILENAME_CHECKOUT_PROCESS, $cartId, 'NONSSL', false);

with

$worldpay_transId = (int) $_POST['transId'];
$url = tep_href_link(FILENAME_CHECKOUT_PROCESS, $cartId.'&trans='.$worldpay_transId, 'NONSSL', false);

as WorldPay should POST the transId to the callback and you need to send it on to checkout_process.php

 

3. In catalog/checkout_process.php approx line 95:

In the line before:

tep_db_perform(TABLE_ORDERS, $sql_data_array);

that ends

'currency_value' => $order->info['currency_value']);

change the end from

'currency_value' => $order->info['currency_value']);

to

'currency_value' => $order->info['currency_value'],
'worldpay_transId' => (int) $_GET['trans']);

to get it into the database.

 

4. In admin/orders.php approx line 350

After

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>

add

<td class="dataTableHeadingContent" align="right">Worldpay ID</td>

to give a heading.

Note this doesn't use the language file - I was lazy as I don't have any call for multi-language admin.

 

5. Still in admin/orders.php 3 lines follow soon after and they all start with $orders_query_raw. Add o.worldpay_transID into the sql as below:

Change

$orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC";

to

$orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, o.worldpay_transID, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC";

then change

$orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC";

to

$orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, o.worldpay_transID, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC";

and change

$orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC";

to

$orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, o.worldpay_transID, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC";

all to retrieve it from the db

 

6. Still in admin/orders.php approx line 379 after

<td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td>

add

<td class="dataTableContent" align="right"><?php echo $orders['worldpay_transID']; ?></td>

to display it.

 

good luck!

Link to comment
Share on other sites

Thank you sooooo much Anna!! :D I have been totally stuck! The Worldpay transID is now showing on the orders page in the general orders column. I am now trying to get the transID to show up on the individual orders pages and have tried this:

 

<tr>

<td class="main"><b>WorldPay ID</b></td>

</tr>

<tr>

<td class="main"><?php echo $orders['worldpay_transID']; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

 

I think I am close but I'm not sure where I'm going wrong, can anyone help out here.

 

I'm not sure if this will make any difference?

 

<?php //M

if (isset($order->info['worldpay_transID'])){

?>

<tr>

<td class="main"><b>WorldPay ID</b></td>

</tr>

<tr>

<td class="main"><?php echo $orders['worldpay_transID']; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

}

?>

 

I tried this but it still does not show up, the previous one showed the Heading but not the content for the Worldpay ID. Am I refering to the wrong tables? Thanks in advance for any help and a huge thank you to Anna for all the code, your a star :thumbsup:

 

Kind regards Joanna

 

P.S. Sorry about the pants coding but I'm new to PHP :huh:

Half your problems aren't problems at all and the other half are only half as bad as you think they are :)

Link to comment
Share on other sites

  • 2 weeks later...

Well having read every post about Worldpay I havent found a solution to my problem.

 

I use Cre loaded 61a with patch 1,

worldpay - v4.0 - ver1.8

 

The module does everything it should, it processes my card, gives me a conformation, sends me an email but stays on the Worldpay conformation page.

I dont get redirected to my store and an order doesnt get registered.

 

Ive done every fix suggested but to no avail. Its a common problem by all the posts I've read but please anyone got any suggestions at all

HELP

 

Shane

Link to comment
Share on other sites

  • 3 weeks later...

Hello has any one had any problem switching to pre-auth transactions for worldpay and what, if any, are the potential pitfalls of doing so?

The sooner you fall behind, the more time you'll have to catch up.

Link to comment
Share on other sites

The main drawback is that it requires plenty of discipline to operate. You might forget to authorise the transaction within the necessary time frame then you had better be sure you havn't shipped the item :-)

 

On the other hand it is very useful if you are expecting a lot of orders that you may choose not to delivery for reasons of suspected fraud, item unavailable, cannot be shipped overseas etc.

Link to comment
Share on other sites

Are there any known technical integration issues within the worldpay module i.e. with callback?

 

Or is it purely an administrative inconvenience with just the setting to change in the admin panel (once pre-auth is setup with worldpay)?

The sooner you fall behind, the more time you'll have to catch up.

Link to comment
Share on other sites

  • 2 weeks later...

I have a big problem with the worldpay payment module but i will come back to that after i am sure i tested EVERYTHING and EVERY combination i can think of.

 

In the meanwhile i wonder if the line

 

tep_draw_hidden_field('MC_oscsid', $oscSid);

 

shouldn't read

 

tep_draw_hidden_field('MC_oscsid', $osCsid); ?

 

Futhermore i saw some topics regarding worldpay stying on the last screen when in 100 or 101 mode.

 

Jou can solve that by using there test Visa card # 4000 0000 0000 0002

security: 123

Expiry: within 7 years from now.

 

It will then do the callback and display the button.

 

Rgds,

 

Joop.

Link to comment
Share on other sites

  • 2 months later...

I`ve tried anything you said here, but I don`t get send back from the Worldpay page to my shop and the order isn`t saved to the database either. I only get the money, but I don`t get the order...

 

can someone pleeeeeeeeeeeeease help me?

Link to comment
Share on other sites

  • 4 weeks later...

hello,

 

I am getting the same problem as the previous post.

 

I have installed the contrib and everything appears to be working fine, but when I make a transaction I dont get redirected back to the site. Also the order has not been placed into the database.

 

Another question, why is the reference number so long ?

 

thanks

Clive

Regards,

Clive

Link to comment
Share on other sites

  • 1 month later...

hi,

 

got worldpay v4.0 installed, but was getting the following error when i went to test the transaction:

 

"The information sent from the merchant's site is invalid or incomplete. The transaction cannot be processed due to the following: he currency or amount is not recognised."

 

i called worldpay support who said i needed to have pre-auth enabled in order for it to work with osc. is this ture? i understand the beenfits of pre-auth, but do i really need to have it enabled first?

 

cheers, will.

Link to comment
Share on other sites

There is an option in your admin whether or not to have PreAuth. As long as you haven't asked Worldpay to set it up as PreAuth you should be fine without it in osC.

Edited by radders
Link to comment
Share on other sites

Apologies if this has been covered before but I can't find it. I already have 2 other OSCOmmerce stores that this woks fine on, but despite having copied them exactly, I have a problem with the payment screen.

 

In Admin, when you go into payments, they are all listed BUT the box to the right hand side where you edit the settings is missing? It is there for the other modules, shipping stc but it's missing on the payments page.

 

Obviously this is a problem as I need to edit my WP settings?

 

Any ideas anyone? I have replaced all module.php files and WP files to no avail.

Link to comment
Share on other sites

the story continues ... following my earlier post above [#274] it now transpires that it is nothing to do with pre-authorisation but everything to do with the ticket that osc is creating for worldpay has the wrong curreny code i.e. ukp instead of gbp.

 

so, i changed the curreny code in the osc admin to gbp and now all my product prices have disappeared!! am i missing something here?!

 

any ideas/soluations very much appreciated.

Edited by proteinos
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...