Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to display Secure Trading error messges


Mata

Recommended Posts

Hi,

 

I've set up my shop, http://www.matazone.co.uk/shop with the Secure Trading payment contribution, and I see that the file in the payment modules, securetrading.php, has a facility to display an error message.

 

Currently I don't see how the customer gets to see the error message: is this part of the contribution only for people who are using https on their shop to do the transaction, or am I missing out on some configuration issue? Currently I can't work out how to show a customer a message about why their transaction is declined. I leave them on the ST site for the transaction confirmation to avoid the warning about moving to a non-secure page, if that makes any difference.

 

I'm also finding that my shop puts through the transaction even when the callback-f.txt file is used and I have to check the credit card email to confirm whether the payment has actually been made. Should there be a difference between the callback.txt file and the callback-f.txt file? Currently mine are the same and that seems a bit illogical to me!

 

Thanks in advance for any help you may be able to offer.

 

EDIT: Oh, I'd also like to be able to change the name of the payment option (displayed on the checkout_payment.php page) to something more useful for a customer, such as 'SecureTrading encrypted credit card payments'. Any ideas?

Link to comment
Share on other sites

Another, slightly more important, query. Does anyone know how to get start-date fields working in the SecureTrading form without breaking the very tempremental callback.txt file?

 

I added those fields, the thing stopped working, I took them out, and callback still isn't working. Aaargh! I hate bloomin' callback!

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

When a transaction is made, securetrading will post a field back to your callback script page (checkout_process.php) called 'stresult' this is either 1 for a succesful transaction or 2 for a failure. As the securetrading system knows this result it can determine which callback file to use (callback-f or just callback)

Because of this both files can be identical and because they will both post the stresult, oscommerce will automatically know whether to display the transaction as been successful or failed.

 

If you want to see the error in the oscommerce success page or the secure trading success page you need to add the fields $sterror this will display things like 'invalid card number' however if you want to display the messages which return from the bank i.e. declined you can display the $stauthcode which will display the result from the bank, auth code for a successful transaction and declined for a non-successful.

 

As for the start date and end date, when you added these to the form, did you also add the values to the fields1 in your callback? i.e.

 

fields1 name, stresult, startmonth

 

One last thing, make absolutely sure you are using tabs not spaces in your callback file, this will cause problems.

 

It should be like this;

 

method1TABPOST

url1TABwww.yoursite

 

:)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...