| @@ -22,7 +22,7 @@ | ||
| 22 | 22 | */ | 
| 23 | 23 | public function provideServiceLayerDependencies(Container $container) | 
| 24 | 24 |      { | 
| 25 | -        $container[static::CLIENT_ZED_REQUEST] = function (Container $container) { | |
| 25 | +        $container[static::CLIENT_ZED_REQUEST] = function(Container $container) { | |
| 26 | 26 | return $container->getLocator()->zedRequest()->client(); | 
| 27 | 27 | }; | 
| 28 | 28 | |
| @@ -116,9 +116,9 @@ | ||
| 116 | 116 | return $this->getProvidedDependency(AmazonPayDependencyProvider::SERVICE_UTIL_ENCODING); | 
| 117 | 117 | } | 
| 118 | 118 | |
| 119 | - /** | |
| 120 | - * @return \SprykerEco\Zed\AmazonPay\Business\Api\Adapter\AdapterFactoryInterface | |
| 121 | - */ | |
| 119 | + /** | |
| 120 | + * @return \SprykerEco\Zed\AmazonPay\Business\Api\Adapter\AdapterFactoryInterface | |
| 121 | + */ | |
| 122 | 122 | public function createAdapterFactory() | 
| 123 | 123 |      { | 
| 124 | 124 | return new AdapterFactory( | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | */ | 
| 63 | 63 | protected function addSalesFacade(Container $container) | 
| 64 | 64 |      { | 
| 65 | -        $container[static::FACADE_SALES] = function (Container $container) { | |
| 65 | +        $container[static::FACADE_SALES] = function(Container $container) { | |
| 66 | 66 | return new AmazonPayToSalesBridge($container->getLocator()->sales()->facade()); | 
| 67 | 67 | }; | 
| 68 | 68 | } | 
| @@ -74,7 +74,7 @@ discard block | ||
| 74 | 74 | */ | 
| 75 | 75 | protected function addMoneyFacade(Container $container) | 
| 76 | 76 |      { | 
| 77 | -        $container[static::FACADE_MONEY] = function (Container $container) { | |
| 77 | +        $container[static::FACADE_MONEY] = function(Container $container) { | |
| 78 | 78 | return new AmazonPayToMoneyBridge($container->getLocator()->money()->facade()); | 
| 79 | 79 | }; | 
| 80 | 80 | } | 
| @@ -86,7 +86,7 @@ discard block | ||
| 86 | 86 | */ | 
| 87 | 87 | protected function addShipmentFacade(Container $container) | 
| 88 | 88 |      { | 
| 89 | -        $container[static::FACADE_SHIPMENT] = function (Container $container) { | |
| 89 | +        $container[static::FACADE_SHIPMENT] = function(Container $container) { | |
| 90 | 90 | return new AmazonPayToShipmentBridge($container->getLocator()->shipment()->facade()); | 
| 91 | 91 | }; | 
| 92 | 92 | } | 
| @@ -98,7 +98,7 @@ discard block | ||
| 98 | 98 | */ | 
| 99 | 99 | protected function addUtilEncodingService(Container $container) | 
| 100 | 100 |      { | 
| 101 | -        $container[static::SERVICE_UTIL_ENCODING] = function (Container $container) { | |
| 101 | +        $container[static::SERVICE_UTIL_ENCODING] = function(Container $container) { | |
| 102 | 102 | return new AmazonPayToUtilEncodingBridge($container->getLocator()->utilEncoding()->service()); | 
| 103 | 103 | }; | 
| 104 | 104 | } | 
| @@ -110,7 +110,7 @@ discard block | ||
| 110 | 110 | */ | 
| 111 | 111 | protected function addRefundFacade(Container $container) | 
| 112 | 112 |      { | 
| 113 | -        $container[static::FACADE_REFUND] = function (Container $container) { | |
| 113 | +        $container[static::FACADE_REFUND] = function(Container $container) { | |
| 114 | 114 | return new AmazonPayToRefundBridge($container->getLocator()->refund()->facade()); | 
| 115 | 115 | }; | 
| 116 | 116 | } | 
| @@ -122,7 +122,7 @@ discard block | ||
| 122 | 122 | */ | 
| 123 | 123 | protected function addOmsFacade(Container $container) | 
| 124 | 124 |      { | 
| 125 | -        $container[static::FACADE_OMS] = function (Container $container) { | |
| 125 | +        $container[static::FACADE_OMS] = function(Container $container) { | |
| 126 | 126 | return new AmazonPayToOmsBridge($container->getLocator()->oms()->facade()); | 
| 127 | 127 | }; | 
| 128 | 128 | } | 
| @@ -37,13 +37,13 @@ | ||
| 37 | 37 | protected function loggingEnabledMap() | 
| 38 | 38 |      { | 
| 39 | 39 | return [ | 
| 40 | -            static::REPORT_LEVEL_ALL => function () { | |
| 40 | +            static::REPORT_LEVEL_ALL => function() { | |
| 41 | 41 | return true; | 
| 42 | 42 | }, | 
| 43 | -            static::REPORT_LEVEL_DISABLED => function () { | |
| 43 | +            static::REPORT_LEVEL_DISABLED => function() { | |
| 44 | 44 | return false; | 
| 45 | 45 | }, | 
| 46 | -            static::REPORT_LEVEL_ERRORS_ONLY => function (AmazonpayResponseHeaderTransfer $headerTransfer) { | |
| 46 | +            static::REPORT_LEVEL_ERRORS_ONLY => function(AmazonpayResponseHeaderTransfer $headerTransfer) { | |
| 47 | 47 | return !$headerTransfer->getIsSuccess(); | 
| 48 | 48 | }, | 
| 49 | 49 | ]; | 
| @@ -22,16 +22,16 @@ | ||
| 22 | 22 | protected function getTypeToConverterMap() | 
| 23 | 23 |      { | 
| 24 | 24 | return [ | 
| 25 | -            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_AUTHORIZE => function () { | |
| 25 | +            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_AUTHORIZE => function() { | |
| 26 | 26 | return $this->createIpnPaymentAuthorizeRequestConverter(); | 
| 27 | 27 | }, | 
| 28 | -            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_CAPTURE => function () { | |
| 28 | +            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_CAPTURE => function() { | |
| 29 | 29 | return $this->createIpnPaymentCaptureRequestConverter(); | 
| 30 | 30 | }, | 
| 31 | -            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_REFUND => function () { | |
| 31 | +            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_REFUND => function() { | |
| 32 | 32 | return $this->createIpnPaymentRefundRequestConverter(); | 
| 33 | 33 | }, | 
| 34 | -            AmazonPayConfig::IPN_REQUEST_TYPE_ORDER_REFERENCE_NOTIFICATION => function () { | |
| 34 | +            AmazonPayConfig::IPN_REQUEST_TYPE_ORDER_REFERENCE_NOTIFICATION => function() { | |
| 35 | 35 | return $this->createIpnOrderReferenceNotificationConverter(); | 
| 36 | 36 | }, | 
| 37 | 37 | ]; | 
| @@ -73,7 +73,7 @@ | ||
| 73 | 73 | protected function getAffectedItemIds(AmazonpayCallTransfer $amazonpayCallTransfer) | 
| 74 | 74 |      { | 
| 75 | 75 | return array_map( | 
| 76 | -            function (ItemTransfer $item) { | |
| 76 | +            function(ItemTransfer $item) { | |
| 77 | 77 | return $item->getIdSalesOrderItem(); | 
| 78 | 78 | }, | 
| 79 | 79 | $amazonpayCallTransfer->getItems()->getArrayCopy() | 
| @@ -71,7 +71,7 @@ | ||
| 71 | 71 | $repeatable = 2; | 
| 72 | 72 |          while ($repeatable-- > 0) { | 
| 73 | 73 |              try { | 
| 74 | -                $this->handleDatabaseTransaction(function () use ($paymentRequestTransfer) { | |
| 74 | +                $this->handleDatabaseTransaction(function() use ($paymentRequestTransfer) { | |
| 75 | 75 |                      if ($this->config->getEnableIsolateLevelRead()) { | 
| 76 | 76 |                          Propel::getConnection()->exec('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;'); | 
| 77 | 77 | } | 
| @@ -94,16 +94,16 @@ discard block | ||
| 94 | 94 | protected function getNotificationTypeToHandlerMap() | 
| 95 | 95 |      { | 
| 96 | 96 | return [ | 
| 97 | -            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_AUTHORIZE => function (AmazonpayIpnPaymentRequestTransfer $ipnRequest) { | |
| 97 | +            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_AUTHORIZE => function(AmazonpayIpnPaymentRequestTransfer $ipnRequest) { | |
| 98 | 98 | return $this->getIpnPaymentAuthorizeHandler($ipnRequest); | 
| 99 | 99 | }, | 
| 100 | -            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_CAPTURE => function (AmazonpayIpnPaymentRequestTransfer $ipnRequest) { | |
| 100 | +            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_CAPTURE => function(AmazonpayIpnPaymentRequestTransfer $ipnRequest) { | |
| 101 | 101 | return $this->getIpnPaymentCaptureHandler($ipnRequest); | 
| 102 | 102 | }, | 
| 103 | -            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_REFUND => function (AmazonpayIpnPaymentRequestTransfer $ipnRequest) { | |
| 103 | +            AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_REFUND => function(AmazonpayIpnPaymentRequestTransfer $ipnRequest) { | |
| 104 | 104 | return $this->getIpnPaymentRefundHandler($ipnRequest); | 
| 105 | 105 | }, | 
| 106 | -            AmazonPayConfig::IPN_REQUEST_TYPE_ORDER_REFERENCE_NOTIFICATION => function (AmazonpayIpnPaymentRequestTransfer $ipnRequest) { | |
| 106 | +            AmazonPayConfig::IPN_REQUEST_TYPE_ORDER_REFERENCE_NOTIFICATION => function(AmazonpayIpnPaymentRequestTransfer $ipnRequest) { | |
| 107 | 107 | return $this->getIpnOrderReferenceHandler($ipnRequest); | 
| 108 | 108 | }, | 
| 109 | 109 | ]; | 
| @@ -115,25 +115,25 @@ discard block | ||
| 115 | 115 | protected function getAuthorizeHandlerMap() | 
| 116 | 116 |      { | 
| 117 | 117 | return [ | 
| 118 | -            AmazonPayConfig::STATUS_TRANSACTION_TIMED_OUT => function () { | |
| 118 | +            AmazonPayConfig::STATUS_TRANSACTION_TIMED_OUT => function() { | |
| 119 | 119 | return $this->createIpnPaymentAuthorizeSuspendedHandler(); | 
| 120 | 120 | }, | 
| 121 | -            AmazonPayConfig::STATUS_SUSPENDED => function () { | |
| 121 | +            AmazonPayConfig::STATUS_SUSPENDED => function() { | |
| 122 | 122 | return $this->createIpnPaymentAuthorizeSuspendedHandler(); | 
| 123 | 123 | }, | 
| 124 | -            AmazonPayConfig::STATUS_PAYMENT_METHOD_INVALID => function () { | |
| 124 | +            AmazonPayConfig::STATUS_PAYMENT_METHOD_INVALID => function() { | |
| 125 | 125 | return $this->createIpnPaymentAuthorizeSuspendedHandler(); | 
| 126 | 126 | }, | 
| 127 | -            AmazonPayConfig::STATUS_DECLINED => function () { | |
| 127 | +            AmazonPayConfig::STATUS_DECLINED => function() { | |
| 128 | 128 | return $this->createIpnPaymentAuthorizeDeclineHandler(); | 
| 129 | 129 | }, | 
| 130 | -            AmazonPayConfig::STATUS_OPEN => function () { | |
| 130 | +            AmazonPayConfig::STATUS_OPEN => function() { | |
| 131 | 131 | return $this->createIpnPaymentAuthorizeOpenHandler(); | 
| 132 | 132 | }, | 
| 133 | -            AmazonPayConfig::STATUS_CLOSED => function () { | |
| 133 | +            AmazonPayConfig::STATUS_CLOSED => function() { | |
| 134 | 134 | return $this->createIpnPaymentAuthorizeClosedHandler(); | 
| 135 | 135 | }, | 
| 136 | -            AmazonPayConfig::STATUS_EXPIRED => function () { | |
| 136 | +            AmazonPayConfig::STATUS_EXPIRED => function() { | |
| 137 | 137 | return $this->createIpnPaymentAuthorizeClosedHandler(); | 
| 138 | 138 | }, | 
| 139 | 139 | ]; | 
| @@ -209,13 +209,13 @@ discard block | ||
| 209 | 209 | protected function getCaptureHandlerMap() | 
| 210 | 210 |      { | 
| 211 | 211 | return [ | 
| 212 | -            AmazonPayConfig::STATUS_DECLINED => function () { | |
| 212 | +            AmazonPayConfig::STATUS_DECLINED => function() { | |
| 213 | 213 | return $this->createIpnPaymentCaptureDeclineHandler(); | 
| 214 | 214 | }, | 
| 215 | -            AmazonPayConfig::STATUS_COMPLETED => function () { | |
| 215 | +            AmazonPayConfig::STATUS_COMPLETED => function() { | |
| 216 | 216 | return $this->createIpnPaymentCaptureCompletedHandler(); | 
| 217 | 217 | }, | 
| 218 | -            AmazonPayConfig::STATUS_CLOSED => function () { | |
| 218 | +            AmazonPayConfig::STATUS_CLOSED => function() { | |
| 219 | 219 | return $this->createIpnEmptyHandler(); | 
| 220 | 220 | }, | 
| 221 | 221 | ]; | 
| @@ -273,10 +273,10 @@ discard block | ||
| 273 | 273 | protected function getRefundHandlerMap() | 
| 274 | 274 |      { | 
| 275 | 275 | return [ | 
| 276 | -            AmazonPayConfig::STATUS_DECLINED => function () { | |
| 276 | +            AmazonPayConfig::STATUS_DECLINED => function() { | |
| 277 | 277 | return $this->createIpnPaymentRefundDeclineHandler(); | 
| 278 | 278 | }, | 
| 279 | -            AmazonPayConfig::STATUS_COMPLETED => function () { | |
| 279 | +            AmazonPayConfig::STATUS_COMPLETED => function() { | |
| 280 | 280 | return $this->createIpnPaymentRefundCompletedHandler(); | 
| 281 | 281 | }, | 
| 282 | 282 | ]; | 
| @@ -327,25 +327,25 @@ discard block | ||
| 327 | 327 | protected function getOrderReferenceHandlerMap() | 
| 328 | 328 |      { | 
| 329 | 329 | return [ | 
| 330 | -            AmazonPayConfig::STATUS_OPEN => function () { | |
| 330 | +            AmazonPayConfig::STATUS_OPEN => function() { | |
| 331 | 331 | return $this->createIpnOrderReferenceOpenHandler(); | 
| 332 | 332 | }, | 
| 333 | -            AmazonPayConfig::STATUS_AMAZON_CLOSED => function () { | |
| 333 | +            AmazonPayConfig::STATUS_AMAZON_CLOSED => function() { | |
| 334 | 334 | return $this->createIpnOrderReferenceClosedHandler(); | 
| 335 | 335 | }, | 
| 336 | -            AmazonPayConfig::STATUS_EXPIRED => function () { | |
| 336 | +            AmazonPayConfig::STATUS_EXPIRED => function() { | |
| 337 | 337 | return $this->createIpnOrderReferenceClosedHandler(); | 
| 338 | 338 | }, | 
| 339 | -            AmazonPayConfig::STATUS_CLOSED => function () { | |
| 339 | +            AmazonPayConfig::STATUS_CLOSED => function() { | |
| 340 | 340 | return $this->createIpnEmptyHandler(); | 
| 341 | 341 | }, | 
| 342 | -            AmazonPayConfig::STATUS_PAYMENT_METHOD_INVALID => function () { | |
| 342 | +            AmazonPayConfig::STATUS_PAYMENT_METHOD_INVALID => function() { | |
| 343 | 343 | return $this->createIpnOrderReferenceSuspendedHandler(); | 
| 344 | 344 | }, | 
| 345 | -            AmazonPayConfig::STATUS_SUSPENDED => function () { | |
| 345 | +            AmazonPayConfig::STATUS_SUSPENDED => function() { | |
| 346 | 346 | return $this->createIpnOrderReferenceSuspendedHandler(); | 
| 347 | 347 | }, | 
| 348 | -            AmazonPayConfig::STATUS_CANCELLED => function () { | |
| 348 | +            AmazonPayConfig::STATUS_CANCELLED => function() { | |
| 349 | 349 | return $this->createIpnOrderReferenceCancelledHandler(); | 
| 350 | 350 | }, | 
| 351 | 351 | ]; | 
| @@ -53,7 +53,7 @@ discard block | ||
| 53 | 53 | */ | 
| 54 | 54 | protected function addQuoteClient(Container $container) | 
| 55 | 55 |      { | 
| 56 | -        $container[static::CLIENT_QUOTE] = function () use ($container) { | |
| 56 | +        $container[static::CLIENT_QUOTE] = function() use ($container) { | |
| 57 | 57 | return new AmazonPayToQuoteBridge($container->getLocator()->quote()->client()); | 
| 58 | 58 | }; | 
| 59 | 59 | } | 
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 | */ | 
| 66 | 66 | protected function addCartClient(Container $container) | 
| 67 | 67 |      { | 
| 68 | -        $container[static::CLIENT_CART] = function () use ($container) { | |
| 68 | +        $container[static::CLIENT_CART] = function() use ($container) { | |
| 69 | 69 | return new AmazonPayToCartBridge($container->getLocator()->cart()->client()); | 
| 70 | 70 | }; | 
| 71 | 71 | } | 
| @@ -77,7 +77,7 @@ discard block | ||
| 77 | 77 | */ | 
| 78 | 78 | protected function addShipmentClient(Container $container) | 
| 79 | 79 |      { | 
| 80 | -        $container[static::CLIENT_SHIPMENT] = function () use ($container) { | |
| 80 | +        $container[static::CLIENT_SHIPMENT] = function() use ($container) { | |
| 81 | 81 | return new AmazonPayToShipmentBridge($container->getLocator()->shipment()->client()); | 
| 82 | 82 | }; | 
| 83 | 83 | } | 
| @@ -89,7 +89,7 @@ discard block | ||
| 89 | 89 | */ | 
| 90 | 90 | protected function addCheckoutClient(Container $container) | 
| 91 | 91 |      { | 
| 92 | -        $container[static::CLIENT_CHECKOUT] = function () use ($container) { | |
| 92 | +        $container[static::CLIENT_CHECKOUT] = function() use ($container) { | |
| 93 | 93 | return new AmazonPayToCheckoutBridge($container->getLocator()->checkout()->client()); | 
| 94 | 94 | }; | 
| 95 | 95 | } | 
| @@ -101,7 +101,7 @@ discard block | ||
| 101 | 101 | */ | 
| 102 | 102 | protected function addCalculationClient(Container $container) | 
| 103 | 103 |      { | 
| 104 | -        $container[static::CLIENT_CALCULATION] = function () use ($container) { | |
| 104 | +        $container[static::CLIENT_CALCULATION] = function() use ($container) { | |
| 105 | 105 | return new AmazonPayToCalculationBridge($container->getLocator()->calculation()->client()); | 
| 106 | 106 | }; | 
| 107 | 107 | } | 
| @@ -113,7 +113,7 @@ discard block | ||
| 113 | 113 | */ | 
| 114 | 114 | protected function addCustomerClient(Container $container) | 
| 115 | 115 |      { | 
| 116 | -        $container[static::CLIENT_CUSTOMER] = function () use ($container) { | |
| 116 | +        $container[static::CLIENT_CUSTOMER] = function() use ($container) { | |
| 117 | 117 | return new AmazonPayToCustomerBridge($container->getLocator()->customer()->client()); | 
| 118 | 118 | }; | 
| 119 | 119 | } | 
| @@ -125,7 +125,7 @@ discard block | ||
| 125 | 125 | */ | 
| 126 | 126 | protected function addGlossaryStorageClient(Container $container) | 
| 127 | 127 |      { | 
| 128 | -        $container[static::CLIENT_GLOSSARY_STORAGE] = function () use ($container) { | |
| 128 | +        $container[static::CLIENT_GLOSSARY_STORAGE] = function() use ($container) { | |
| 129 | 129 | return new AmazonPayToGlossaryStorageBridge($container->getLocator()->glossaryStorage()->client()); | 
| 130 | 130 | }; | 
| 131 | 131 | } |