1
|
|
|
<?php
|
2
|
|
|
/**
|
3
|
|
|
* @author Sergey Glagolev <[email protected]>
|
4
|
|
|
* @link https://github.com/shogodev/argilla/
|
5
|
|
|
* @copyright Copyright © 2003-2013 Shogo
|
6
|
|
|
* @license http://argilla.ru/LICENSE
|
7
|
|
|
* @package frontend.controllers
|
8
|
|
|
*/
|
9
|
|
|
class PaymentController extends FController
|
10
|
|
|
{
|
11
|
|
|
public function filters()
|
12
|
|
|
{
|
13
|
|
|
return array(
|
14
|
|
|
'postOnly + check, result, capture',
|
15
|
|
|
);
|
16
|
|
|
}
|
17
|
|
|
|
18
|
|
|
public function actionCheck()
|
19
|
|
|
{
|
20
|
|
|
try
|
21
|
|
|
{
|
22
|
|
|
$paymentSystem = new PlatronSystem();
|
23
|
|
|
$paymentSystem->processCheckPayment();
|
24
|
|
|
}
|
25
|
|
|
catch(CException $exception)
|
|
|
|
|
26
|
|
|
{
|
27
|
|
|
throw new CHttpException(404, $exception->getMessage());
|
28
|
|
|
}
|
29
|
|
|
}
|
30
|
|
|
|
31
|
|
|
public function actionResult()
|
32
|
|
|
{
|
33
|
|
|
try
|
34
|
|
|
{
|
35
|
|
|
$paymentSystem = new PlatronSystem();
|
36
|
|
|
$paymentSystem->processResultPayment();
|
37
|
|
|
}
|
38
|
|
|
catch(CException $exception)
|
|
|
|
|
39
|
|
|
{
|
40
|
|
|
throw new CHttpException(404, $exception->getMessage());
|
41
|
|
|
}
|
42
|
|
|
}
|
43
|
|
|
|
44
|
|
|
public function actionCapture()
|
45
|
|
|
{
|
46
|
|
|
try
|
47
|
|
|
{
|
48
|
|
|
$paymentSystem = new PlatronSystem();
|
49
|
|
|
$paymentSystem->processCapturePayment();
|
50
|
|
|
}
|
51
|
|
|
catch(CException $exception)
|
|
|
|
|
52
|
|
|
{
|
53
|
|
|
throw new CHttpException(404, $exception->getMessage());
|
54
|
|
|
}
|
55
|
|
|
}
|
56
|
|
|
|
57
|
|
|
public function actionSuccess()
|
58
|
|
|
{
|
59
|
|
|
$this->breadcrumbs = array(
|
60
|
|
|
'Оплата успешно произведена',
|
61
|
|
|
);
|
62
|
|
|
|
63
|
|
|
try
|
64
|
|
|
{
|
65
|
|
|
$paymentSystem = new PlatronSystem();
|
66
|
|
|
$paymentSystem->successPaymentResult();
|
67
|
|
|
}
|
68
|
|
|
catch(CException $exception)
|
|
|
|
|
69
|
|
|
{
|
70
|
|
|
throw new CHttpException(404, $exception->getMessage());
|
71
|
|
|
}
|
72
|
|
|
|
73
|
|
|
$this->render('success', array(
|
74
|
|
|
'order' => Order::model()->findByPk($paymentSystem->getOrderId()),
|
75
|
|
|
));
|
76
|
|
|
}
|
77
|
|
|
|
78
|
|
|
public function actionFailure()
|
79
|
|
|
{
|
80
|
|
|
$this->breadcrumbs = array(
|
81
|
|
|
'Оплата не произведена',
|
82
|
|
|
);
|
83
|
|
|
|
84
|
|
|
try
|
85
|
|
|
{
|
86
|
|
|
$paymentSystem = new PlatronSystem();
|
87
|
|
|
$error = $paymentSystem->failurePaymentResult();
|
88
|
|
|
}
|
89
|
|
|
catch(CException $exception)
|
|
|
|
|
90
|
|
|
{
|
91
|
|
|
throw new CHttpException(404, $exception->getMessage());
|
92
|
|
|
}
|
93
|
|
|
|
94
|
|
|
$this->render('failure', array(
|
95
|
|
|
'order' => Order::model()->findByPk($paymentSystem->getOrderId()),
|
96
|
|
|
'textBlock' => strtr(
|
97
|
|
|
$this->textBlockRegister('Оплата не произведена', 'Оплата не произведена.', array('class' => 'success-message bb center red')),
|
98
|
|
|
array('{error}' => $error)
|
99
|
|
|
),
|
100
|
|
|
));
|
101
|
|
|
}
|
102
|
|
|
|
103
|
|
|
protected function beforeAction($action)
|
104
|
|
|
{
|
105
|
|
|
Yii::app()->log->getRoutes()[1]->enabled = false;
|
106
|
|
|
return parent::beforeAction($action);
|
107
|
|
|
}
|
108
|
|
|
} |
Scrutinizer analyzes your
composer.json
/composer.lock
file if available to determine the classes, and functions that are defined by your dependencies.It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.