|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Created by PhpStorm. |
|
4
|
|
|
* User: Azizbek Eshonaliyev |
|
5
|
|
|
* Date: 2/15/2019 |
|
6
|
|
|
* Time: 5:01 PM |
|
7
|
|
|
*/ |
|
8
|
|
|
|
|
9
|
|
|
namespace Goodoneuz\PayUz\Http\Controllers; |
|
10
|
|
|
|
|
11
|
|
|
|
|
12
|
|
|
use App\Http\Controllers\Controller; |
|
13
|
|
|
|
|
14
|
|
|
class PageController extends Controller |
|
15
|
|
|
{ |
|
16
|
|
|
/** |
|
17
|
|
|
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
18
|
|
|
*/ |
|
19
|
|
|
public function dashboard(){ |
|
20
|
|
|
return view('pay-uz::dashboard'); |
|
21
|
|
|
} |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
25
|
|
|
*/ |
|
26
|
|
|
public function editors(){ |
|
27
|
|
|
|
|
28
|
|
|
$converters = []; |
|
29
|
|
|
$listeners = []; |
|
30
|
|
|
|
|
31
|
|
|
$listeners['before_pay']['content'] = file_get_contents(base_path('/app/Http/Controllers/Payments/before_pay.php')); |
|
32
|
|
|
$listeners['before_pay']['title'] = 'Before pay: payListener($model, $transaction = null, $action_type = \'before-pay\')'; |
|
33
|
|
|
|
|
34
|
|
|
$listeners['after_pay']['content'] = file_get_contents(base_path('/app/Http/Controllers/Payments/after_pay.php')); |
|
35
|
|
|
$listeners['after_pay']['title'] = 'After pay: payListener($model = null, $transaction, $action_type = \'after-pay\')'; |
|
36
|
|
|
|
|
37
|
|
|
$listeners['paying']['content'] = file_get_contents(base_path('/app/Http/Controllers/Payments/paying.php')); |
|
38
|
|
|
$listeners['paying']['title'] = 'Paying: payListener($model, $transaction, $action_type = \'paying\')'; |
|
39
|
|
|
|
|
40
|
|
|
$listeners['cancel_pay']['content'] = file_get_contents(base_path('/app/Http/Controllers/Payments/cancel_pay.php')); |
|
41
|
|
|
$listeners['cancel_pay']['title'] = 'Cancel pay: payListener($model = null, $transaction, $action_type = \'cancel-pay\')'; |
|
42
|
|
|
|
|
43
|
|
|
$converters['key_model']['content'] = file_get_contents(base_path('/app/Http/Controllers/Payments/key_model.php')); |
|
44
|
|
|
$converters['key_model']['title'] = 'Key to Model: convertKeyToModel($key), returns Elequent model or null'; |
|
45
|
|
|
|
|
46
|
|
|
$converters['model_key']['content'] = file_get_contents(base_path('/app/Http/Controllers/Payments/model_key.php')); |
|
47
|
|
|
$converters['model_key']['title'] = 'Model to Key: convertModelToKey($model), returns string'; |
|
48
|
|
|
|
|
49
|
|
|
$converters['is_proper']['content'] = file_get_contents(base_path('/app/Http/Controllers/Payments/is_proper.php')); |
|
50
|
|
|
$converters['is_proper']['title'] = 'Is proper: isProperModelAndAmount($model, $amount), returns true or false'; |
|
51
|
|
|
|
|
52
|
|
|
return view('pay-uz::editors',compact('listeners','converters')); |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
57
|
|
|
*/ |
|
58
|
|
|
public function blank(){ |
|
59
|
|
|
return view('pay-uz::blank'); |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
64
|
|
|
*/ |
|
65
|
|
|
public function settings(){ |
|
66
|
|
|
return view('pay-uz::settings'); |
|
67
|
|
|
} |
|
68
|
|
|
} |
|
69
|
|
|
|