-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.php
executable file
·56 lines (48 loc) · 1.56 KB
/
settings.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
54
55
56
<?php
use Modules\Account\Classes\Ledger;
use Modules\Account\Classes\Gateway;
if (!Schema::hasTable('account_ledger') || !Schema::hasTable('account_gateway')) {
return [];
}
$ledger = new Ledger();
$gateway = new Gateway();
$mpesa_ledger = @$ledger->getLedgerBySlug('mpesa');
$mpesa_gateway = @$gateway->getGatewayBySlug('mpesa');
$mpesa_ledger_id = (isset($mpesa_ledger->id)) ? $mpesa_ledger->id : 3;
$mpesa_gateway_id = (isset($mpesa_gateway->id)) ? $mpesa_gateway->id : 7;
return [
'return_url' => [
"title" => "Return URL",
"type" => "text",
"value" => "",
"category" => "Mpesa",
],
'status' => [
"title" => "Status",
"type" => "text",
"value" => "sandbox",
"category" => "Mpesa",
],
'ledger_id' => [
"title" => "Ledger Id",
"type" => "recordpicker",
"value" => $mpesa_ledger_id,
"comp_url" => "account/admin/ledger/list.vue",
"setting" => [
'path_param' => ["account", "ledger"],
'fields' => ['name', 'slug', 'chart_id__account_chart_of_account__name'],
'template' => '[name] ([slug]) - [chart_id__account_chart_of_account__name]',
],
],
'payment_method_id' => [
"title" => "Payment Method Id",
"type" => "recordpicker",
"value" => $mpesa_gateway_id,
"comp_url" => "account/admin/gateway/list.vue",
"setting" => [
'path_param' => ["account", "gateway"],
'fields' => ['title'],
'template' => '[title]',
],
],
];