Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

WorldPay Callback Not Working


Pompeylad

Recommended Posts

Hi,

 

I know there are many posts on this subject but I have read most of them but I still can not find the answer to why my wpcallback is not working.

 

I will list out everything which I have done.

 

Ok I am using the Worldpay 4.0 version 1.6 contrib, which I have installed corectly, as I have gone over it with a fine tooth comb!! I have also read the readme file many times and I have done all it has told me to do. I have also set up my WorldPay admin how I was told to in the read me file.

 

But I still get this email every time a test order is processed.

 

A 404 file not found error occurred on your website mysite.com with the following details:-

 

URL: http://mysite.com/catalog/FILENAME_WPCALLBACK

 

I have also entered....

 

PLUS add: define('FILENAME_WPCALLBACK', 'wpcallback.php'); To catalog/includes/filenames.php

 

....into filenames.php....

 

Released under the GNU General Public License

*/

 

// define the filenames used in the project

  define('FILENAME_ACCOUNT', 'account.php');

  define('FILENAME_ACCOUNT_EDIT', 'account_edit.php');

  define('FILENAME_ACCOUNT_HISTORY', 'account_history.php');

  define('FILENAME_ACCOUNT_HISTORY_INFO', 'account_history_info.php');

  define('FILENAME_ACCOUNT_NEWSLETTERS', 'account_newsletters.php');

  define('FILENAME_ACCOUNT_NOTIFICATIONS', 'account_notifications.php');

  define('FILENAME_ACCOUNT_PASSWORD', 'account_password.php');

  define('FILENAME_ADDRESS_BOOK', 'address_book.php');

  define('FILENAME_ADDRESS_BOOK_PROCESS', 'address_book_process.php');

  define('FILENAME_ADVANCED_SEARCH', 'advanced_search.php');

  define('FILENAME_ADVANCED_SEARCH_RESULT', 'advanced_search_result.php');

  define('FILENAME_ALSO_PURCHASED_PRODUCTS', 'also_purchased_products.php');

  define('FILENAME_CHECKOUT_CONFIRMATION', 'checkout_confirmation.php');

  define('FILENAME_CHECKOUT_PAYMENT', 'checkout_payment.php');

  define('FILENAME_CHECKOUT_PAYMENT_ADDRESS', 'checkout_payment_address.php');

  define('FILENAME_CHECKOUT_PROCESS', 'checkout_process.php');

  define('FILENAME_CHECKOUT_SHIPPING', 'checkout_shipping.php');

  define('FILENAME_CHECKOUT_SHIPPING_ADDRESS', 'checkout_shipping_address.php');

  define('FILENAME_CHECKOUT_SUCCESS', 'checkout_success.php');

  define('FILENAME_CONTACT_US', 'contact_us.php');

  define('FILENAME_CONDITIONS', 'conditions.php');

  define('FILENAME_COOKIE_USAGE', 'cookie_usage.php');

  define('FILENAME_CREATE_ACCOUNT', 'create_account.php');

  define('FILENAME_CREATE_ACCOUNT_SUCCESS', 'create_account_success.php');

  define('FILENAME_DEFAULT', 'index.php');

  define('FILENAME_DOWNLOAD', 'download.php');

  define('FILENAME_INFO_SHOPPING_CART', 'info_shopping_cart.php');

  define('FILENAME_LOGIN', 'login.php');

  define('FILENAME_LOGOFF', 'logoff.php');

  define('FILENAME_NEW_PRODUCTS', 'new_products.php');

  define('FILENAME_PASSWORD_FORGOTTEN', 'password_forgotten.php');

  define('FILENAME_POPUP_IMAGE', 'popup_image.php');

  define('FILENAME_POPUP_SEARCH_HELP', 'popup_search_help.php');

  define('FILENAME_PRIVACY', 'privacy.php');

  define('FILENAME_PRODUCT_INFO', 'product_info.php');

  define('FILENAME_PRODUCT_LISTING', 'product_listing.php');

  define('FILENAME_PRODUCT_REVIEWS', 'product_reviews.php');

  define('FILENAME_PRODUCT_REVIEWS_INFO', 'product_reviews_info.php');

  define('FILENAME_PRODUCT_REVIEWS_WRITE', 'product_reviews_write.php');

  define('FILENAME_PRODUCTS_NEW', 'products_new.php');

  define('FILENAME_REDIRECT', 'redirect.php');

  define('FILENAME_REVIEWS', 'reviews.php');

  define('FILENAME_SHIPPING', 'shipping.php');

  define('FILENAME_SHOPPING_CART', 'shopping_cart.php');

  define('FILENAME_SPECIALS', 'specials.php');

  define('FILENAME_SSL_CHECK', 'ssl_check.php');

  define('FILENAME_TELL_A_FRIEND', 'tell_a_friend.php');

  define('FILENAME_UPCOMING_PRODUCTS', 'upcoming_products.php');

  define('FILENAME_WPCALLBACK', 'wpcallback.php');

?>

 

....so does anybody know what's wrong?

 

Pompeylad.

PHP?!? Long live HTML!!!! But then again we never stop learning.

Link to comment
Share on other sites

Ok,

 

Nimmit I hope you are reading this as your OSC mail box is full. I did try to send you this...

 

Ok I did that now I got a warning saying...

 

Fatal error: Failed opening required 'includes/languages/english/FILENAME_WPCALLBACK' (include_path='.:/usr/share/pear') in /home/wj32/public_html/catalog/wpcallback.php on line 29

 

...so what do you think? I am checking out wpcallback.php line 29 now.

 

Pompeylad.

 

...ok I checked out the line 29 which is...

 

define('HEADING_TITLE', 'Thank you for shopping with ' . STORE_NAME . ' .... ');

 

So what could it be? Looks fine to me.

 

Pompeylad.

PHP?!? Long live HTML!!!! But then again we never stop learning.

Link to comment
Share on other sites

Opps,

 

Wrong file, the line is...

 

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_WPCALLBACK);

 

...so I guess it can not find the wpcallback file in language/english.

 

Pompeylad <_<

PHP?!? Long live HTML!!!! But then again we never stop learning.

Link to comment
Share on other sites

Ok,

 

So line 29 is....

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_WPCALLBACK);

 

...and it means that it can not find wpcallback.php in the English folder, but it is in there.

 

And line 29 in file english/wpcallback.php is...

 

define('HEADING_TITLE', 'Thank you for shopping with ' . STORE_NAME . ' .... ');

 

...which is (I guess) the same as everybody else's.

 

Well, I have to say that I am beating. Is it really worth all this trouble?

 

Pompeylad :blink:

PHP?!? Long live HTML!!!! But then again we never stop learning.

Link to comment
Share on other sites

Your problem is right there in the error;

Fatal error: Failed opening required 'includes/languages/english/FILENAME_WPCALLBACK' (include_path='.:/usr/share/pear') in /home/wj32/public_html/catalog/wpcallback.php on line 29

 

 

that it is looking for the file in home/wj32/public_html/catalog/wpcallback, and it should (if I read things right) should be looking in home/wj32/public_html/catalog/includes/languages/english/wpcallback

 

Change this line;

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_WPCALLBACK);

 

to

require(DIR_WS_LANGUAGES . $language . 'includes/languages/english/' . FILENAME_WPCALLBACK);

 

or something like that. Also check your installation to make sure you did it correctly and also check your configure.php files to make sure you have the proper directories set up.

Link to comment
Share on other sites

AAAAGGGGGGHHHHHHHHHHHHH!!!!

 

Nah, no hope there!

 

Is it 'cos I have V1.5? As I have read many posts which have problems with this version. Maybe I used try V1.4?

 

I have reinstalled this contrib many times but still get the same problem.

 

Pompeylad.

PHP?!? Long live HTML!!!! But then again we never stop learning.

Link to comment
Share on other sites

poppeylad -

(sorry roaster) - but ignore roasters post -- 'DIR_WS_LANGUAGES' already has the full path (have a look in configure.php and see for your self) and the third of line your error line 'in /home/wj32/public_html/catalog/wpcallback.php on line 29' is reffering to what page it is on not what it is looking for. t

he two things are the same problem.

(This is why oscommerce language files and files are named the same so each file knows what its corresponding file is.)

 

For some reason (although i can see quite clearly from your filenames file that you have it there) it seems not to be parsing the FILENAME_WPCALLBACK define ?? It has nothing to do with the virsion (1.5) it is stable ( i have been keeping my eye on it because i released it :D)

 

one thing that you could try is just replacing the 3 instances of FILENAME_WPCALLBACK in inludes->modules->payment->wordpay.php (line 110, 115, 120) with just the filename (wpcallback.php) as these are the lines that build that part of the callback. Its a bodge but will at least make it work ( or you'll be able to tell if it is another problem elseware)

 

I have cleared some of the crap out of my mailbox now so if you are still having this problem give me a shout.

 

Sam

Edited by Nimmit
Link to comment
Share on other sites

WOO-HOO

 

Its working at last!!!!!!!

 

I changed the callback URL in the WorldPay admin to http://mysite.com/catalog/wpcallback.php.

 

I did this afew days ago but it did not work. But now it seems to be a-okay.

 

A big thank you goes to both Nimmit and Yesudo, you guys are there at the top!!!!!

 

Pompeylad.

PHP?!? Long live HTML!!!! But then again we never stop learning.

Link to comment
Share on other sites

  • 5 weeks later...

Hello,

 

I get a simular error. My callback does not seem to work at all. I have gone over all the install.txt and tried differnt callback urls in the worldpay admin but nothing. It does not even attempt to call back my site. I have setup an email address if there are erors but I don't get anything.

 

When I make a transaction it just stays on the last page of Worldpay and does not return to my site. I get an email from workdpay saying I have placed the order.

 

If I manuall type in www.mysite.com/shop/wpcallback.php it gives me this error:

 

Fatal error: Failed opening required 'includes/languages/english/FILENAME_WPCALLBACK' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site5/fst/var/www/html/shop/wpcallback.php on line 29

 

I am not sure if that is because I am manually typing in the URL or because there is a problem.

 

Can you help?

 

Thanks,

 

Rob

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