Forums / Addon Payment Modules / losing some data of order in my custom payment module

losing some data of order in my custom payment module

Views: 1,180

Results 1 to 1 of 1
20 Jul 2013, 10:44 AM
#1
dial avatar

dial

New Zenner

Join Date:
Jul 2013
Posts:
1
Plugin Contributions:
0

losing some data of order in my custom payment module

Hi there,

I need help please, I don't know why in the confirmation function I'm losing the data of $order->info.

When I try to get information of: php 'payment_method' => $order->info['payment_method'], is empty, but if get from Session is there ```php
'payment_method' => $_SESSION['payment'],


After this part of code $order_totals  is empty, maybe is this the problem?:
```php
             if ($insert_order == true) {
                $order_totals = array();

                if (is_array($_SESSION['order_total_modules']->modules)) {
                    reset($_SESSION['order_total_modules']->modules);
                   
                    while (list (, $value) = each($_SESSION['order_total_modules']->modules)) {
                        $class = substr($value, 0, strrpos($value, '.'));

                        if ($GLOBALS[$class]->enabled) {
                            for ($i = 0, $n = sizeof($GLOBALS[$class]->output); $i < $n; $i++) {
                                if (zen_not_null($GLOBALS[$class]->output[$i]['title']) && zen_not_null($GLOBALS[$class]->output[$i]['text'])) {
                                    $order_totals[] = array('code' => $GLOBALS[$class]->code,
                                        'title' => $GLOBALS[$class]->output[$i]['title'],
                                        'text' => $GLOBALS[$class]->output[$i]['text'],
                                        'value' => $GLOBALS[$class]->output[$i]['value'],
                                        'sort_order' => $GLOBALS[$class]->sort_order
                                    );
                                }
                            }
                        }
                    }
                }