Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

checkout_payment.php payment_error


Recommended Posts

Error message is not displaying in checkout_payment.   Am looking for tips in how to diagnose.

This bit of error handling code has been around a long time.  In OSC,   it starts at line #130 in checkout_payment.php

 if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) {

First question I have, is:  Why is there a single "=" instead of a "==" for the "$error = $" in the line above

Second question is:   Where does "$error['title']" come from?  I am assuming it is an array element...but where created and loaded with data.  I know these error messages come from payment or order total modules, but I cannot find any code referencing "title".

echo '<strong>' . tep_output_string_protected($error['title']) 

Third question:  Why is OSC  still using $HTTP_GET_VARS ?  Thought we were past that.

Edited by MountainMan
Further clarification
Link to comment
Share on other sites

Answering my own questions:

1.  The single "=" is required because there is in fact an assignment to the variable $error going on there

2.  $error['title']  is assigned in the get_error() functions found in the order total modules

3.  Above my pay grade

The reason the error messages were not showing up was because I left off a "return" in the get_error() function I was repurposing.

Link to comment
Share on other sites

21 hours ago, MountainMan said:

Third question:  Why is OSC  still using $HTTP_GET_VARS ?  Thought we were past that.

That version of oscommerce hasn't been updated in about 5 years. 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

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.

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