Post by nuwancy » Fri Oct 06, 2017 1:23 am

Where I can find the changes that I have to do for the scripts that are working perfectly on version 2.3.0.2 but not working with version 3.0.2.0?

I freshly installed version 3.0.2.0 and tried to use custom payment method that was working on 2.3.0.2.
It was installed successfully and i can see that it is listed under Extensions > extensions > Payments. ::)
I can even click install button also and it installs without any errors. ::)
But when i click edit button it throws me following error. ???
(edit: controller and model codes are attached)




Notice: Undefined index: token in /storage/ssd3/688/2921688/public_html/admin/controller/extension/payment/ez_cash.php on line 28Notice: Undefined index: token in /storage/ssd3/688/2921688/public_html/admin/controller/extension/payment/ez_cash.php on line 29Notice: Undefined index: token in /storage/ssd3/688/2921688/public_html/admin/controller/extension/payment/ez_cash.php on line 77Notice: Undefined index: token in /storage/ssd3/688/2921688/public_html/admin/controller/extension/payment/ez_cash.php on line 82Notice: Undefined index: token in /storage/ssd3/688/2921688/public_html/admin/controller/extension/payment/ez_cash.php on line 87 :crazy:


It says something wrong with line number 28,29 etc.
below is line 28 and 29
$data['action'] = $this->url->link('extension/payment/ez_cash', 'token=' . $this->session->data['token'], 'SSL');
$data['cancel'] = $this->url->link('extension/extension', 'token=' . $this->session->data['token'], 'SSL');

Newbie

Posts

Joined
Sun Oct 01, 2017 12:44 am

Post by bumcarks » Fri Oct 06, 2017 2:08 am

Your code should be like this
$data['action'] = $this->url->link('extension/payment/ez_cash', '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);

Opencart 3.0.2.0 structure is changed. Template engine is also changed. Now this version is use template engine twig.
I will convert the custom payment extension to opencart 3.0.2.0. I have experience of this version.

New member

Posts

Joined
Sun Oct 01, 2017 5:34 pm


Post by nuwancy » Fri Oct 06, 2017 2:30 am

Wow thank you so much. I'll try it out.
Do you mean that I have to change my template file also?
its a small one so could you pls check where i should modify? OR May be I cave to convert it to twig using some kind of tool ryt?

<form class="form-horizontal" method="post" action="https://ipg.dialog.lk/ezCashIPGExtranet ... t_sentinal">
<fieldset id="payment">
<input type="hidden" value="<?php echo $invoice; ?>" name="merchantInvoice">
</fieldset>
<div class="buttons">
<div class="pull-right">
<input type="submit" value="<?php echo $button_confirm; ?>" id="button-confirm" class="btn btn-primary" data-loading-text="<?php echo $text_loading; ?>" />
</div>
</div>
</form>

How can I know what are the changes in a new version? Structure changes etc etc?

Newbie

Posts

Joined
Sun Oct 01, 2017 12:44 am

Post by bumcarks » Fri Oct 06, 2017 2:48 am

yes you need to convert template file also.

New member

Posts

Joined
Sun Oct 01, 2017 5:34 pm

Who is online

Users browsing this forum: No registered users and 7 guests