1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* MIT License |
5
|
|
|
* For full license information, please view the LICENSE file that was distributed with this source code. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace SprykerEco\Yves\CrefoPay\Plugin\Provider; |
9
|
|
|
|
10
|
|
|
use Silex\Application; |
11
|
|
|
use SprykerShop\Yves\ShopApplication\Plugin\Provider\AbstractYvesControllerProvider; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* @deprecated Use {@link \SprykerEco\Yves\CrefoPay\Plugin\Router\CrefoPayRouteProviderPlugin} instead. |
15
|
|
|
*/ |
16
|
|
|
class CrefoPayControllerProvider extends AbstractYvesControllerProvider |
|
|
|
|
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @var string |
20
|
|
|
*/ |
21
|
|
|
protected const BUNDLE_NAME = 'CrefoPay'; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var string |
25
|
|
|
*/ |
26
|
|
|
protected const CALLBACK_CONTROLLER_NAME = 'Callback'; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var string |
30
|
|
|
*/ |
31
|
|
|
protected const NOTIFICATION_CONTROLLER_NAME = 'Notification'; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var string |
35
|
|
|
*/ |
36
|
|
|
protected const CREFO_PAY_NOTIFICATION = 'crefo-pay-notification'; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var string |
40
|
|
|
*/ |
41
|
|
|
protected const CREFO_PAY_CONFIRMATION = 'crefo-pay-confirmation'; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var string |
45
|
|
|
*/ |
46
|
|
|
protected const CREFO_PAY_SUCCESS = 'crefo-pay-success'; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var string |
50
|
|
|
*/ |
51
|
|
|
protected const CREFO_PAY_FAILURE = 'crefo-pay-failure'; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @param \Silex\Application $app |
55
|
|
|
* |
56
|
|
|
* @return void |
57
|
|
|
*/ |
58
|
|
|
protected function defineControllers(Application $app): void |
59
|
|
|
{ |
60
|
|
|
$this->createController( |
61
|
|
|
'/crefo-pay/notification', |
62
|
|
|
static::CREFO_PAY_NOTIFICATION, |
63
|
|
|
static::BUNDLE_NAME, |
64
|
|
|
static::NOTIFICATION_CONTROLLER_NAME, |
65
|
|
|
'index', |
66
|
|
|
); |
67
|
|
|
|
68
|
|
|
$this->createController( |
69
|
|
|
'/crefo-pay/callback/confirmation', |
70
|
|
|
static::CREFO_PAY_CONFIRMATION, |
71
|
|
|
static::BUNDLE_NAME, |
72
|
|
|
static::CALLBACK_CONTROLLER_NAME, |
73
|
|
|
'confirmation', |
74
|
|
|
); |
75
|
|
|
|
76
|
|
|
$this->createController( |
77
|
|
|
'/crefo-pay/callback/success', |
78
|
|
|
static::CREFO_PAY_SUCCESS, |
79
|
|
|
static::BUNDLE_NAME, |
80
|
|
|
static::CALLBACK_CONTROLLER_NAME, |
81
|
|
|
'success', |
82
|
|
|
); |
83
|
|
|
|
84
|
|
|
$this->createController( |
85
|
|
|
'/crefo-pay/callback/failure', |
86
|
|
|
static::CREFO_PAY_FAILURE, |
87
|
|
|
static::BUNDLE_NAME, |
88
|
|
|
static::CALLBACK_CONTROLLER_NAME, |
89
|
|
|
'failure', |
90
|
|
|
); |
91
|
|
|
} |
92
|
|
|
} |
93
|
|
|
|