1 | <?php |
||
18 | final class AdyenBridge implements AdyenBridgeInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $requiredFields = [ |
||
24 | 'merchantReference' => null, |
||
25 | 'paymentAmount' => null, |
||
26 | 'currencyCode' => null, |
||
27 | 'shipBeforeDate' => null, |
||
28 | 'skinCode' => null, |
||
29 | 'merchantAccount' => null, |
||
30 | 'sessionValidity' => null, |
||
31 | 'shopperEmail' => null, |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $optionalFields = [ |
||
38 | 'merchantReturnData' => null, |
||
39 | 'shopperReference' => null, |
||
40 | 'allowedMethods' => null, |
||
41 | 'blockedMethods' => null, |
||
42 | 'offset' => null, |
||
43 | 'shopperStatement' => null, |
||
44 | 'recurringContract' => null, |
||
45 | 'billingAddressType' => null, |
||
46 | 'deliveryAddressType' => null, |
||
47 | 'resURL' => null, |
||
48 | ]; |
||
49 | /** |
||
50 | * @var array |
||
51 | */ |
||
52 | protected $othersFields = [ |
||
53 | 'brandCode' => null, |
||
54 | 'countryCode' => null, |
||
55 | 'shopperLocale' => null, |
||
56 | 'orderData' => null, |
||
57 | 'offerEmail' => null, |
||
58 | 'issuerId' => null, |
||
59 | ]; |
||
60 | |||
61 | /** |
||
62 | * @var array |
||
63 | */ |
||
64 | protected $notificationFields = [ |
||
65 | 'pspReference' => null, |
||
66 | 'originalReference' => null, |
||
67 | 'merchantAccountCode' => null, |
||
68 | 'merchantReference' => null, |
||
69 | 'value' => null, |
||
70 | 'currency' => null, |
||
71 | 'eventCode' => null, |
||
72 | 'success' => null, |
||
73 | ]; |
||
74 | |||
75 | /** |
||
76 | * @var ArrayObject |
||
77 | */ |
||
78 | protected $options = [ |
||
79 | 'skinCode' => null, |
||
80 | 'merchantAccount' => null, |
||
81 | 'hmacKey' => null, |
||
82 | 'environment' => null, |
||
83 | 'notification_method' => null, |
||
84 | 'notification_hmac' => null, |
||
85 | 'default_payment_fields' => [], |
||
86 | 'ws_user' => null, |
||
87 | 'ws_user_password' => null, |
||
88 | ]; |
||
89 | |||
90 | /** |
||
91 | * @var \SoapClient|object |
||
92 | */ |
||
93 | protected $soapClient; |
||
94 | |||
95 | /** |
||
96 | * @param array $options |
||
97 | * @param HttpClientInterface $client |
||
98 | * |
||
99 | * @throws \Payum\Core\Exception\InvalidArgumentException if an option is invalid |
||
100 | * @throws \Payum\Core\Exception\LogicException if a sandbox is not boolean |
||
101 | */ |
||
102 | public function __construct(array $options, HttpClientInterface $client = null) |
||
117 | |||
118 | /** |
||
119 | * @return string |
||
120 | */ |
||
121 | public function getApiEndpoint(): string |
||
125 | |||
126 | /** |
||
127 | * @param array $params |
||
128 | * @param bool $isNotify |
||
129 | * @param string $hmacKey |
||
130 | * |
||
131 | * @return string |
||
132 | */ |
||
133 | public function merchantSig(array $params, bool $isNotify = false, string $hmacKey = 'hmacKey'): string |
||
159 | |||
160 | /** |
||
161 | * @param array $params |
||
162 | * |
||
163 | * @return bool |
||
164 | */ |
||
165 | public function verifySign(array $params): bool |
||
177 | |||
178 | /** |
||
179 | * @param array $params |
||
180 | * |
||
181 | * @return bool |
||
182 | */ |
||
183 | public function verifyNotification(array $params): bool |
||
201 | |||
202 | /** |
||
203 | * @param array $params |
||
204 | * |
||
205 | * @return string |
||
206 | */ |
||
207 | public function createSignatureForNotification(array $params): string |
||
217 | |||
218 | /** |
||
219 | * @param array $params |
||
220 | * @param array $details |
||
221 | * |
||
222 | * @return bool |
||
223 | */ |
||
224 | public function verifyRequest(array $params, array $details): bool |
||
237 | |||
238 | /** |
||
239 | * @param array $params |
||
240 | * |
||
241 | * @return array |
||
242 | */ |
||
243 | public function prepareFields(array $params): array |
||
266 | |||
267 | public function createSoapClient(): void |
||
280 | |||
281 | /** |
||
282 | * @return string |
||
283 | */ |
||
284 | public function getWsdl(): string |
||
288 | |||
289 | /** |
||
290 | * @return string |
||
291 | */ |
||
292 | public function getMerchantAccount(): string |
||
296 | |||
297 | /** |
||
298 | * @param array $modificationAmount |
||
299 | * @param string $originalReference |
||
300 | * @param string $reference |
||
301 | * |
||
302 | * @return \stdClass |
||
303 | */ |
||
304 | public function refundAction( |
||
323 | } |
||
324 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.