Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How can $GLOBALS[$this->selected_module] get unset during payment processing?


technoczech

Recommended Posts

Posted

So I'm using the Paypal Website Payments Pro contrib by dynamoeffects. I have it all set up and working, except when using express checkout it's not displaying the Payment Method section on checkout_confirmation.php, which throws off the formatting of the whole screen. Weirdly, if I refresh checkout_confirmation.php, then it will show up and the page looks normal.

 

I *think* I've pinned down the problem to $GLOBALS[$this->selected_module] somehow getting unset somewhere. A var_dump before the refresh shows it null, and a var_dump after the refresh shows the correct module.

 

This line in checkout_confirmation.php is false before the refresh (and consequently prevents this section from displaying):

if ($confirmation = $payment_modules->confirmation())

 

The confirmation function in payment.php recognizes the array, but not the selected module:

function confirmation() {

var_dump('this modules = ' . $this->modules); <<<returns "Array"

if (is_array($this->modules)) {

var_dump('selected mod = ' . $GLOBALS[$this->selected_module]); <<< see below for error returned

if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) {

return $GLOBALS[$this->selected_module]->confirmation();

 

The var_dump on $GLOBALS[$this->selected_module] returns:

Catchable fatal error: Object of class paypal_wpp could not be converted to string

 

When I do a var_dump of $payment_modules->confirmation on the checkout_confirmation page, it says null before the refresh, and gives the correct selected module after the refresh.

 

That's just a snippet of everything I've looked at; I'm happy to post more if needed. Am I missing setting a global variable somewhere? Any ideas, anyone, please...? My head's really sore from banging it against the wall...

 

Many thanks in advance!

Archived

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

×
×
  • Create New...