@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $configuration = new Configuration(); |
| 23 | 23 | $config = $this->processConfiguration($configuration, $configs); |
| 24 | 24 | |
| 25 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 25 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 26 | 26 | $loader->load('services.yml'); |
| 27 | 27 | } |
| 28 | 28 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | Logger $logger, |
| 37 | 37 | UserTranslator $userTranslator |
| 38 | 38 | ) { |
| 39 | - parent::__construct($clientId, $clientPassword, $baseUrl,$mangoPayApi, $logger); |
|
| 39 | + parent::__construct($clientId, $clientPassword, $baseUrl, $mangoPayApi, $logger); |
|
| 40 | 40 | $this->userTranslator = $userTranslator; |
| 41 | 41 | } |
| 42 | 42 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | Logger $logger |
| 33 | 33 | |
| 34 | 34 | ) { |
| 35 | - parent::__construct($clientId, $clientPassword, $baseUrl,$mangoPayApi, $logger); |
|
| 35 | + parent::__construct($clientId, $clientPassword, $baseUrl, $mangoPayApi, $logger); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function list() |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | // Hook Variables |
| 75 | 75 | // https://docs.mangopay.com/endpoints/v2.01/hooks#e246_the-hook-object |
| 76 | 76 | const HOOK_EVENT_TYPE = "EventType"; |
| 77 | - const HOOK_RESOURCE_ID = "RessourceId"; // Known spelling mistake in MangoPay Api |
|
| 77 | + const HOOK_RESOURCE_ID = "RessourceId"; // Known spelling mistake in MangoPay Api |
|
| 78 | 78 | const HOOK_DATE = "Date"; |
| 79 | 79 | |
| 80 | 80 | // Event types |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $responses = []; |
| 56 | 56 | |
| 57 | 57 | $hookItems = $this->getHookService()->list(); |
| 58 | - foreach($hookItems as $hook) { |
|
| 58 | + foreach ($hookItems as $hook) { |
|
| 59 | 59 | $hookId = $hook->Id; |
| 60 | 60 | $this->output->infoid("Updating Hook ID " . $hookId . " with " . $url); |
| 61 | 61 | try { |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | public function __construct($clientId, $clientPassword, $baseUrl, MangoPayApi $mangoPayApi, Logger $logger) |
| 31 | 31 | { |
| 32 | 32 | $this->logger = $logger; |
| 33 | - $path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR. '..' . DIRECTORY_SEPARATOR. '..' . DIRECTORY_SEPARATOR. '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR. 'var/logs/mangopay.log'; |
|
| 33 | + $path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'var/logs/mangopay.log'; |
|
| 34 | 34 | $this->logger->pushHandler(new StreamHandler($path, Logger::DEBUG)); |
| 35 | 35 | |
| 36 | 36 | $this->mangoPayApi = $mangoPayApi; |
@@ -75,10 +75,10 @@ |
||
| 75 | 75 | return $this->payInTranslator->translateMangoPayBankwireDirectPayInToDto($createdPayIn); |
| 76 | 76 | } |
| 77 | 77 | $this->logger->addCritical( |
| 78 | - "Pay-In has been created with status: ".$createdPayIn->Status . ' (result code: ' . $createdPayIn->ResultCode . ')' |
|
| 78 | + "Pay-In has been created with status: " . $createdPayIn->Status . ' (result code: ' . $createdPayIn->ResultCode . ')' |
|
| 79 | 79 | ); |
| 80 | 80 | throw new PartFireException( |
| 81 | - "Pay-In has been created with status: ".$createdPayIn->Status . ' (result code: ' . $createdPayIn->ResultCode . ')' |
|
| 81 | + "Pay-In has been created with status: " . $createdPayIn->Status . ' (result code: ' . $createdPayIn->ResultCode . ')' |
|
| 82 | 82 | ); |
| 83 | 83 | } |
| 84 | 84 | $this->logger->addCritical("Failed to create PayIn"); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | { |
| 88 | 88 | $output->info(count($this->getAllNewWebhooks()) . " new hooks to check"); |
| 89 | 89 | |
| 90 | - foreach($this->getAllNewWebhooks() as $webHook) { |
|
| 90 | + foreach ($this->getAllNewWebhooks() as $webHook) { |
|
| 91 | 91 | $output->infoid(" Processing hook ID " . $webHook->getResourceId() . " - Action Type = " . $webHook->getEventType()); |
| 92 | 92 | try { |
| 93 | 93 | $this->processWebhook($webHook, $output); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | if (MangoPayConstants::isEventTypeOk($hook->getEventType())) { |
| 105 | 105 | |
| 106 | 106 | } else { |
| 107 | - $errMsg = "Received webhook from MangoPay *" . $hook->getEventType() ."*, which is unknown. Firing event anyway \n ```" . json_encode($hook->getRawHookData()) . "```"; |
|
| 107 | + $errMsg = "Received webhook from MangoPay *" . $hook->getEventType() . "*, which is unknown. Firing event anyway \n ```" . json_encode($hook->getRawHookData()) . "```"; |
|
| 108 | 108 | $commonOutput->error($errMsg); |
| 109 | 109 | $this->sendErrorMessage( |
| 110 | 110 | $errMsg, |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | return $this->mangoPayRepositoryFactory->saveAndGetEntity($hook); |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | - private function getIdentityCheckReportByOnfidoReportId(OnfidoHookQueue $onfidoHookQueue) : ?IdentityCheckReport |
|
| 239 | + private function getIdentityCheckReportByOnfidoReportId(OnfidoHookQueue $onfidoHookQueue) : ? IdentityCheckReport |
|
| 240 | 240 | { |
| 241 | 241 | return $this->mangoPayRepositoryFactory->getIdentityCheckReport()->findOneByOnfidoReportId( |
| 242 | 242 | $onfidoHookQueue->getResourceId() |
@@ -55,10 +55,10 @@ |
||
| 55 | 55 | return $this->payOutTranslator->translateMangoToPayOutDto($createdPayout); |
| 56 | 56 | } |
| 57 | 57 | $this->logger->addCritical( |
| 58 | - "Pay-Out has been created with status: ".$createdPayout->Status . ' (result code: ' . $createdPayout->ResultCode . ' '. $createdPayout->ResultMessage.')' |
|
| 58 | + "Pay-Out has been created with status: " . $createdPayout->Status . ' (result code: ' . $createdPayout->ResultCode . ' ' . $createdPayout->ResultMessage . ')' |
|
| 59 | 59 | ); |
| 60 | 60 | throw new PartFireException( |
| 61 | - "Pay-Out has been created with status: ".$createdPayout->Status . ' (result code: ' . $createdPayout->ResultCode . ' '. $createdPayout->ResultMessage.')' |
|
| 61 | + "Pay-Out has been created with status: " . $createdPayout->Status . ' (result code: ' . $createdPayout->ResultCode . ' ' . $createdPayout->ResultMessage . ')' |
|
| 62 | 62 | ); |
| 63 | 63 | } |
| 64 | 64 | $this->logger->addCritical("Failed to create PayOut"); |