/
Payment.php
51 lines (44 loc) · 1009 Bytes
/
Payment.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
<?php
// vim: set ts=4 sw=4 sts=4 et:
/**
* Velocity Payment Module
*
* @category X-Cart 5
* @author Velcity Team
* @copyright Copyright (c) 2015-2016 Velocity. All rights reserved
* @license
* @link http://nabvelocity.com/
*/
namespace XLite\Module\XC\Velocity\View;
/**
* Payment
*/
class Payment extends \XLite\View\AView
{
/**
* Return widget default template
*
* @return string
*/
protected function getDefaultTemplate()
{
return 'modules/XC/Velocity/payment.tpl';
}
/**
* Get codes of every state
*
* @return string
*/
protected function getStateCodes()
{
$states = \XLite\Core\Database::getRepo('\XLite\Model\State')->findAll();
$result = array();
foreach ($states as $state) {
$result[] = array(
'id' => $state->getStateId(),
'code' => $state->getCode(),
);
}
return json_encode($result);
}
}