skip to Main Content

I have just installed easypaisa payment extention but when I am trying to active it is giving undefined index error the errors are below please check:

Notice: Undefined index: token in easypaisa.php on line 61
Notice: Undefined index: token in easypaisa.php on line 66
Notice: Undefined index: token in easypaisa.php on line 71
Notice: Undefined index: token in easypaisa.php on line 74
Notice: Undefined index: token in easypaisa.php on line 76

And code from line 61 to 76 is below:

$data['breadcrumbs'][] = array(
            'text' => $this->language->get('text_home'),
            'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
        );

        $data['breadcrumbs'][] = array(
            'text' => $this->language->get('text_extension'),
            'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=payment', true)
        );

        $data['breadcrumbs'][] = array(
            'text' => $this->language->get('heading_title'),
            'href' => $this->url->link('extension/payment/easypaisa', 'token=' . $this->session->data['token'], true)
        );

        $data['action'] = $this->url->link('extension/payment/easypaisa', 'token=' . $this->session->data['token'], true);

        $data['cancel'] = $this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=payment', true);

Any idea how can we fix it ? or any other way to active this payment extention maybe if there is any way to enable it from phpmyadmin.

2

Answers


  1. In OC3 you should use user_token instead token

      $data['breadcrumbs'][] = array(
                'text' => $this->language->get('text_home'),
                'href' => $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'], true)
            );
    
            $data['breadcrumbs'][] = array(
                'text' => $this->language->get('text_extension'),
                'href' => $this->url->link('marketplace/extension', 'user_token=' . $this->session->data['user_token'] . '&type=payment', true)
            );
    
            $data['breadcrumbs'][] = array(
                'text' => $this->language->get('heading_title'),
                'href' => $this->url->link('extension/payment/easypaisa', 'user_token=' . $this->session->data['user_token'], true)
            );
    
            $data['action'] = $this->url->link('extension/payment/easypaisa', 'user_token=' . $this->session->data['user_token'], true);
    
            $data['cancel'] = $this->url->link('marketplace/extension', 'user_token=' . $this->session->data['user_token'] . '&type=payment', true);
    
    Login or Signup to reply.
  2. Opencart 3031 You should user_token instead token.and i set session data it properly.
    You can try below code i think is great working..

    $data['breadcrumbs'][] = array(
                'text' => $this->language->get('text_home'),
                'href' => $this->url->link('common/dashboard', 'user_token=' . isset($this->session->data['user_token']), true)
            );
    
            $data['breadcrumbs'][] = array(
                'text' => $this->language->get('text_extension'),
                'href' => $this->url->link('marketplace/extension', 'user_token=' . isset($this->session->data['user_token']) . '&type=payment', true)
            );
    
            $data['breadcrumbs'][] = array(
                'text' => $this->language->get('heading_title'),
                'href' => $this->url->link('extension/payment/easypaisa', 'user_token=' . isset($this->session->data['user_token']), true)
            );
    
            $data['action'] = $this->url->link('extension/payment/easypaisa', 'user_token=' . isset($this->session->data['user_token']), true);
    
            $data['cancel'] = $this->url->link('marketplace/extension', 'user_token=' . isset($this->session->data['user_token']) . '&type=payment', true);
    

    after making these changes sure code working very well..
    Thanks

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search