|
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\Heidelpay\Plugin\Provider; |
|
9
|
|
|
|
|
10
|
|
|
use Silex\Application; |
|
11
|
|
|
use SprykerShop\Yves\ShopApplication\Plugin\Provider\AbstractYvesControllerProvider; |
|
12
|
|
|
|
|
13
|
|
|
class HeidelpayControllerProvider extends AbstractYvesControllerProvider |
|
|
|
|
|
|
14
|
|
|
{ |
|
15
|
|
|
public const HEIDELPAY_PAYMENT = 'heidelpay-payment'; |
|
16
|
|
|
public const HEIDELPAY_EASY_CREDIT_PAYMENT = 'heidelpay-easy-credit-payment'; |
|
17
|
|
|
public const HEIDELPAY_EASY_CREDIT_INITIALIZE_PAYMENT = 'heidelpay-easy-credit-initialize-payment'; |
|
18
|
|
|
public const HEIDELPAY_PAYMENT_FAILED = 'heidelpay-payment-failed'; |
|
19
|
|
|
public const HEIDELPAY_IDEAL_AUTHORIZE = 'heidelpay-ideal-authorize'; |
|
20
|
|
|
public const HEIDELPAY_CREDIT_CARD_REGISTER = 'heidelpay-cc-register'; |
|
21
|
|
|
public const HEIDELPAY_CREDIT_CARD_REGISTER_SUCCESS = 'heidelpay-cc-register-success'; |
|
22
|
|
|
public const HEIDELPAY_NOTIFICATION = 'heidelpay-notification'; |
|
23
|
|
|
public const HEIDELPAY_DIRECT_DEBIT_REGISTER = 'heidelpay-dd-register'; |
|
24
|
|
|
public const HEIDELPAY_DIRECT_DEBIT_REGISTER_SUCCESS = 'heidelpay-dd-register-success'; |
|
25
|
|
|
|
|
26
|
|
|
/** |
|
27
|
|
|
* @param \Silex\Application $app |
|
28
|
|
|
* |
|
29
|
|
|
* @return void |
|
30
|
|
|
*/ |
|
31
|
|
|
protected function defineControllers(Application $app): void |
|
32
|
|
|
{ |
|
33
|
|
|
$this->createController( |
|
34
|
|
|
'/heidelpay/payment-failed', |
|
35
|
|
|
static::HEIDELPAY_PAYMENT_FAILED, |
|
36
|
|
|
'Heidelpay', |
|
37
|
|
|
'Heidelpay', |
|
38
|
|
|
'paymentFailed' |
|
39
|
|
|
); |
|
40
|
|
|
|
|
41
|
|
|
$this->createController( |
|
42
|
|
|
'/heidelpay/payment', |
|
43
|
|
|
static::HEIDELPAY_PAYMENT, |
|
44
|
|
|
'Heidelpay', |
|
45
|
|
|
'Heidelpay', |
|
46
|
|
|
'payment' |
|
47
|
|
|
); |
|
48
|
|
|
|
|
49
|
|
|
$this->createController( |
|
50
|
|
|
'/heidelpay/easyCreditPayment', |
|
51
|
|
|
static::HEIDELPAY_EASY_CREDIT_PAYMENT, |
|
52
|
|
|
'Heidelpay', |
|
53
|
|
|
'EasyCredit', |
|
54
|
|
|
'easyCreditPayment' |
|
55
|
|
|
); |
|
56
|
|
|
|
|
57
|
|
|
$this->createController( |
|
58
|
|
|
'/heidelpay/easyCreditInitializePayment', |
|
59
|
|
|
static::HEIDELPAY_EASY_CREDIT_INITIALIZE_PAYMENT, |
|
60
|
|
|
'Heidelpay', |
|
61
|
|
|
'EasyCredit', |
|
62
|
|
|
'easyCreditInitializePayment' |
|
63
|
|
|
); |
|
64
|
|
|
|
|
65
|
|
|
$this->createController( |
|
66
|
|
|
'/heidelpay/ideal-authorize', |
|
67
|
|
|
static::HEIDELPAY_IDEAL_AUTHORIZE, |
|
68
|
|
|
'Heidelpay', |
|
69
|
|
|
'Ideal', |
|
70
|
|
|
'authorize' |
|
71
|
|
|
); |
|
72
|
|
|
|
|
73
|
|
|
$this->createController( |
|
74
|
|
|
'/heidelpay/cc-register-response', |
|
75
|
|
|
static::HEIDELPAY_CREDIT_CARD_REGISTER, |
|
76
|
|
|
'Heidelpay', |
|
77
|
|
|
'CreditCard', |
|
78
|
|
|
'registrationRequest' |
|
79
|
|
|
); |
|
80
|
|
|
|
|
81
|
|
|
$this->createController( |
|
82
|
|
|
'/heidelpay/cc-register-success', |
|
83
|
|
|
static::HEIDELPAY_CREDIT_CARD_REGISTER_SUCCESS, |
|
84
|
|
|
'Heidelpay', |
|
85
|
|
|
'CreditCard', |
|
86
|
|
|
'registrationSuccess' |
|
87
|
|
|
); |
|
88
|
|
|
|
|
89
|
|
|
$this->createPostController( |
|
90
|
|
|
'/heidelpay/notification', |
|
91
|
|
|
static::HEIDELPAY_NOTIFICATION, |
|
92
|
|
|
'Heidelpay', |
|
93
|
|
|
'Notification', |
|
94
|
|
|
'index' |
|
95
|
|
|
); |
|
96
|
|
|
|
|
97
|
|
|
$this->createPostController( |
|
98
|
|
|
'/heidelpay/dd-register-response', |
|
99
|
|
|
static::HEIDELPAY_DIRECT_DEBIT_REGISTER, |
|
100
|
|
|
'Heidelpay', |
|
101
|
|
|
'DirectDebit', |
|
102
|
|
|
'registrationRequest' |
|
103
|
|
|
); |
|
104
|
|
|
|
|
105
|
|
|
$this->createController( |
|
106
|
|
|
'/heidelpay/dd-register-success', |
|
107
|
|
|
static::HEIDELPAY_DIRECT_DEBIT_REGISTER_SUCCESS, |
|
108
|
|
|
'Heidelpay', |
|
109
|
|
|
'DirectDebit', |
|
110
|
|
|
'registrationSuccess' |
|
111
|
|
|
); |
|
112
|
|
|
} |
|
113
|
|
|
} |
|
114
|
|
|
|