-
Notifications
You must be signed in to change notification settings - Fork 1
/
mypos_gateway.php
53 lines (41 loc) · 1.25 KB
/
mypos_gateway.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/*
Module Name: Mypos Gateway
Description: Mypos Payment Gateway module
Version: 1.0.0
Requires at least: 1.0.*
*/
define('MYPOS_GATEWAY_MODULE_NAME', 'mypos_gateway');
$CI = &get_instance();
/**
* Load the module helper
*/
$CI->load->helper(MYPOS_GATEWAY_MODULE_NAME . '/mypos_gateway');
/**
* Register activation module hook
*/
register_activation_hook(MYPOS_GATEWAY_MODULE_NAME, 'mypos_gateway_activation_hook');
function mypos_gateway_activation_hook()
{
require_once(__DIR__ . '/install.php');
}
/**
* Register language files, must be registered if the module is using languages
*/
register_language_files(MYPOS_GATEWAY_MODULE_NAME, [MYPOS_GATEWAY_MODULE_NAME]);
/**
* Actions for inject the custom styles
*/
hooks()->add_filter('module_mypos_gateway_action_links', 'module_mypos_gateway_action_links');
/**
* Add additional settings for this module in the module list area
* @param array $actions current actions
* @return array
*/
function module_mypos_gateway_action_links($actions)
{
$actions[] = '<a href="' . admin_url('settings?group=payment_gateways') . '">' . _l('settings') . '</a>';
return $actions;
}
register_payment_gateway('mypos_gateway', 'mypos_gateway');