@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | $config = $this->processConfiguration($this->getConfiguration([], $container), $config); |
20 | 20 | |
21 | - $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
21 | + $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
22 | 22 | |
23 | 23 | $loader->load('services.yaml'); |
24 | 24 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | 'payum.action.status' => new StatusAction(), |
22 | 22 | ]); |
23 | 23 | |
24 | - $config['payum.api'] = function (ArrayObject $config) { |
|
24 | + $config['payum.api'] = function(ArrayObject $config) { |
|
25 | 25 | return new MercadoPagoApi( |
26 | 26 | $config['access_token'], |
27 | 27 | $config['sandbox'] |
@@ -31,7 +31,7 @@ |
||
31 | 31 | ->add('sandbox', CheckboxType::class, [ |
32 | 32 | 'label' => 'odiseo_sylius_mercado_pago_plugin.form.gateway_configuration.mercado_pago.sandbox', |
33 | 33 | ]) |
34 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
34 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
35 | 35 | $data = $event->getData(); |
36 | 36 | |
37 | 37 | $data['payum.http_client'] = '@sylius.payum.http_client'; |
@@ -214,7 +214,7 @@ |
||
214 | 214 | $request->getToken()->getGatewayName(), |
215 | 215 | $request->getToken()->getDetails() |
216 | 216 | ); |
217 | - $preference->__set('notification_url', $notifyToken->getTargetUrl().'?source_news=webhooks'); |
|
217 | + $preference->__set('notification_url', $notifyToken->getTargetUrl() . '?source_news=webhooks'); |
|
218 | 218 | |
219 | 219 | $preference->__set('auto_return', 'all'); |
220 | 220 |
@@ -58,11 +58,11 @@ |
||
58 | 58 | private function log(array $data): void |
59 | 59 | { |
60 | 60 | // Todo use a better way to log the information |
61 | - $log = "User: ".$_SERVER['REMOTE_ADDR'].' - '.date("F j, Y, g:i a").PHP_EOL. |
|
62 | - "Attempt: ".(json_encode($data)).PHP_EOL. |
|
63 | - "-------------------------".PHP_EOL; |
|
61 | + $log = "User: " . $_SERVER['REMOTE_ADDR'] . ' - ' . date("F j, Y, g:i a") . PHP_EOL . |
|
62 | + "Attempt: " . (json_encode($data)) . PHP_EOL . |
|
63 | + "-------------------------" . PHP_EOL; |
|
64 | 64 | |
65 | - file_put_contents(__DIR__.'/../../../../../../var/log/mercado_pago_log_'.date("j.n.Y").'.txt', $log, FILE_APPEND); |
|
65 | + file_put_contents(__DIR__ . '/../../../../../../var/log/mercado_pago_log_' . date("j.n.Y") . '.txt', $log, FILE_APPEND); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |