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
|
|
|
class CrefoPayControllerProvider extends AbstractYvesControllerProvider |
14
|
|
|
{ |
15
|
|
|
protected const BUNDLE_NAME = 'CrefoPay'; |
16
|
|
|
protected const CALLBACK_CONTROLLER_NAME = 'Callback'; |
17
|
|
|
protected const NOTIFICATION_CONTROLLER_NAME = 'Notification'; |
18
|
|
|
protected const CREFO_PAY_NOTIFICATION = 'crefo-pay-notification'; |
19
|
|
|
protected const CREFO_PAY_CONFIRMATION = 'crefo-pay-confirmation'; |
20
|
|
|
protected const CREFO_PAY_SUCCESS = 'crefo-pay-success'; |
21
|
|
|
protected const CREFO_PAY_FAILURE = 'crefo-pay-failure'; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @param \Silex\Application $app |
25
|
|
|
* |
26
|
|
|
* @return void |
27
|
|
|
*/ |
28
|
|
|
protected function defineControllers(Application $app) |
29
|
|
|
{ |
30
|
|
|
$this->createController( |
31
|
|
|
'/crefo-pay/notification', |
32
|
|
|
static::CREFO_PAY_NOTIFICATION, |
33
|
|
|
static::BUNDLE_NAME, |
34
|
|
|
static::NOTIFICATION_CONTROLLER_NAME, |
35
|
|
|
'index' |
36
|
|
|
); |
37
|
|
|
|
38
|
|
|
$this->createController( |
39
|
|
|
'/crefo-pay/callback/confirmation', |
40
|
|
|
static::CREFO_PAY_CONFIRMATION, |
41
|
|
|
static::BUNDLE_NAME, |
42
|
|
|
static::CALLBACK_CONTROLLER_NAME, |
43
|
|
|
'confirmation' |
44
|
|
|
); |
45
|
|
|
|
46
|
|
|
$this->createController( |
47
|
|
|
'/crefo-pay/callback/success', |
48
|
|
|
static::CREFO_PAY_SUCCESS, |
49
|
|
|
static::BUNDLE_NAME, |
50
|
|
|
static::CALLBACK_CONTROLLER_NAME, |
51
|
|
|
'success' |
52
|
|
|
); |
53
|
|
|
|
54
|
|
|
$this->createController( |
55
|
|
|
'/crefo-pay/callback/failure', |
56
|
|
|
static::CREFO_PAY_FAILURE, |
57
|
|
|
static::BUNDLE_NAME, |
58
|
|
|
static::CALLBACK_CONTROLLER_NAME, |
59
|
|
|
'failure' |
60
|
|
|
); |
61
|
|
|
} |
62
|
|
|
} |
63
|
|
|
|