Skip to content

Commit ba79b9d

Browse files
committed
Updating assets and version
1 parent a41ce2d commit ba79b9d

File tree

7 files changed

+37
-33
lines changed

7 files changed

+37
-33
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<name>prestapaystack</name>
44
<displayName><![CDATA[Paystack]]></displayName>
55
<version><![CDATA[1.0.5]]></version>
6-
<description><![CDATA[Paystack for PrestaShop, Accept online card payments on your store.]]></description>
6+
<description><![CDATA[Paystack for PrestaShop. Accept online card payments on your store.]]></description>
77
<author><![CDATA[Paystack]]></author>
88
<tab><![CDATA[payments_gateways]]></tab>
99
<is_configurable>1</is_configurable>

prestapaystack.php

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function install()
3434
{
3535
$this->registerHook('orderConfirmation');
3636
$this->registerHook('return');
37-
if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('return') || !$this->registerHook('orderConfirmation') ||
37+
if (!parent::install() || !$this->registerHook('displayPayment') || !$this->registerHook('displayPaymentReturn') || !$this->registerHook('orderConfirmation') ||
3838
!Db::getInstance()->Execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paystack_txncodes` (
3939
`id` int(10) NOT NULL,
4040
`cart_id` int(11) NOT NULL,
@@ -50,38 +50,12 @@ public function install()
5050
}
5151
return true;
5252
}
53-
public function uninstall()
54-
{
55-
// Uninstall parent and unregister Configuration
56-
// Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'paystack_txncodes`');
57-
// $orderState = new OrderState((int)Configuration::get('VOGU_WAITING_PAYMENT'));
58-
// $orderState->delete();
59-
// Configuration::deleteByName('VOGU_WAITING_PAYMENT');
60-
if (!parent::uninstall()) {
61-
return false;
62-
}
63-
return true;
64-
}
65-
66-
public function getHookController($hook_name)
67-
{
68-
// Include the controller file
69-
require_once(dirname(__FILE__).'/controllers/hook/'.$hook_name.'.php');
70-
71-
// Build the controller name dynamically
72-
$controller_name = $this->name.$hook_name.'Controller';
73-
74-
// Instantiate controller
75-
$controller = new $controller_name($this, __FILE__, $this->_path);
7653

77-
// Return the controller
78-
return $controller;
79-
}
8054
public function installOrderState()
8155
{
8256
if (Configuration::get('PS_OS_PRESTAPAYSTACK_PAYMENT') < 1) {
8357
$order_state = new OrderState();
84-
$order_state->send_email = false;
58+
$order_state->send_email = true;
8559
$order_state->module_name = $this->name;
8660
$order_state->invoice = false;
8761
$order_state->color = '#98c3ff';
@@ -121,11 +95,35 @@ public function installOrderState()
12195
}
12296
return true;
12397
}
124-
public function getContent()
98+
99+
public function uninstall()
125100
{
126-
$controller = $this->getHookController('getContent');
127-
return $controller->run();
101+
// Uninstall parent and unregister Configuration
102+
// Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'paystack_txncodes`');
103+
// $orderState = new OrderState((int)Configuration::get('VOGU_WAITING_PAYMENT'));
104+
// $orderState->delete();
105+
// Configuration::deleteByName('VOGU_WAITING_PAYMENT');
106+
if (!parent::uninstall()) {
107+
return false;
108+
}
109+
return true;
110+
}
111+
112+
public function getHookController($hook_name)
113+
{
114+
// Include the controller file
115+
require_once(dirname(__FILE__).'/controllers/hook/'.$hook_name.'.php');
116+
117+
// Build the controller name dynamically
118+
$controller_name = $this->name.$hook_name.'Controller';
119+
120+
// Instantiate controller
121+
$controller = new $controller_name($this, __FILE__, $this->_path);
122+
123+
// Return the controller
124+
return $controller;
128125
}
126+
129127
public function hookReturn($params)
130128
{
131129
$this->smarty->assign(array('vogURedirection' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/'));
@@ -197,4 +195,9 @@ public function hookDisplayPaymentReturn($params)
197195
$controller = $this->getHookController('displayPaymentReturn');
198196
return $controller->run($params);
199197
}
198+
public function getContent()
199+
{
200+
$controller = $this->getHookController('getContent');
201+
return $controller->run();
202+
}
200203
}

views/img/logo2.png

6.53 KB
Loading

views/img/paystack_logo.png

23 KB
Loading

views/templates/hook/getContent.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<img src="../modules/prestapaystack/views/img/paystack_logo.png" alt="logo" class="vogu-logo" style="height:60px;display:inline-block" />
1010

11-
<h2 style="display:inline-block" >Configuration</h2>
11+
{* <h2 style="display:inline-block" >Configuration</h2> *}
1212

1313

1414
</div>

0 commit comments

Comments
 (0)