Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Worldpay Callback with Simple Template System STS


Guest

Recommended Posts

Hey guys,

 

I'm a new member, so excuse me if I'm overstepping the mark here, but I think it's necessary that this information is placed in it's own post that's easy to find.

 

We've been working on an OSCommerce installation and customisation for a client and we added the Simple Template System (STS) to allow template customisation. The customer then requested that we add the Worldpay module and that's when things went a bit weird. Worldpay was working up to the point of calling back at which point we got a page with no content and the order didn't appear in the system.

 

After spending ages attempting to locate a bug in the Worldpay module we came to the forums desperately seeking an answer. The first few searches didn't throw up much in the way of help but we eventually found the answer in this thread about STS.

 

Just to make things easier for people in the future using these two brilliant modules together, here is the solution in plain English:

 

in sts_display_output.php at around line 34 directly after the code to override popups you need to enter the following lines:

 

// override if $notemplate is set in the page **********
if(isset($notemplate) && $notemplate == "YES") {
$display_template_output = 0;
$display_normal_output = 1;
}
// **** end notemplate-mod RE

 

Then, open wpcallback.php (the one in your catalog base directory) and add the following code directly after the opening PHP tag (<?php).

 

// ****** flag to prevent STS template-system
$notemplate = "YES";
// ****** end

 

Then upload both files to the correct directories on your web server, place a test order and it should all work.

 

I would just like to say, I didn't write this fix, but I'm very thankful to Veetkam for documenting it and I hope my post has made it a little bit easier for everyone to find.

 

Enjoy!

 

Andy

http://www.greendezire.com

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

After inserting this code, should the user be redirected to the store? I have added the code and the transaction is successful, but it sticks on a Worldpay 'Thank You' page:

 

https://select.worldpay.com/aequitas/card?o...D=1106137939200

 

The standard Worldpay email gets sent out, but the OSCommerce email doesn't (and the stock isn't amended in the admin section).

 

Are any other code mods in addition to these required for Worldpay/STS to work correctly?

 

Any help would be greatly appreciated.

 

Many thanks,

 

Justin

 

Hey guys,

 

I'm a new member, so excuse me if I'm overstepping the mark here, but I think it's necessary that this information is placed in it's own post that's easy to find.

 

We've been working on an OSCommerce installation and customisation for a client and we added the Simple Template System (STS) to allow template customisation. The customer then requested that we add the Worldpay module and that's when things went a bit weird. Worldpay was working up to the point of calling back at which point we got a page with no content and the order didn't appear in the system.

 

After spending ages attempting to locate a bug in the Worldpay module we came to the forums desperately seeking an answer. The first few searches didn't throw up much in the way of help but we eventually found the answer in this thread about STS.

 

Just to make things easier for people in the future using these two brilliant modules together, here is the solution in plain English:

 

in sts_display_output.php at around line 34 directly after the code to override popups you need to enter the following lines:

 

// override if $notemplate is set in the page **********
if(isset($notemplate) && $notemplate == "YES") {
$display_template_output = 0;
$display_normal_output = 1;
}
// **** end notemplate-mod RE

 

Then, open wpcallback.php (the one in your catalog base directory) and add the following code directly after the opening PHP tag (<?php).

 

// ****** flag to prevent STS template-system
$notemplate = "YES";
// ****** end

 

Then upload both files to the correct directories on your web server, place a test order and it should all work.

 

I would just like to say, I didn't write this fix, but I'm very thankful to Veetkam for documenting it and I hope my post has made it a little bit easier for everyone to find.

 

Enjoy!

 

Andy

http://www.greendezire.com

Link to comment
Share on other sites

  • 1 month later...

My template still shows after adding the code in sts_display_output.php and wpcallback.php. I've tried several solutions I've found here on the forum but none of them works.. just an empty template and no order showing up in admin.

Link to comment
Share on other sites

Please, someone. Worldpay has caused so much problems. Finally I got callback working.. now there is problems with sts templates..

 

 

In sts_display_output.php

 

if(isset($notemplate) && $notemplate == "YES") {

$display_template_output = 0;

$display_normal_output = 1;

}

 

 

In wpcallback.php

 

$notemplate = "YES";

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...