@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | protected function addQuoteClient(Container $container) |
| 49 | 49 | { |
| 50 | - $container[static::CLIENT_QUOTE] = function () use ($container) { |
|
| 50 | + $container[static::CLIENT_QUOTE] = function() use ($container) { |
|
| 51 | 51 | return new AmazonPayToQuoteBridge($container->getLocator()->quote()->client()); |
| 52 | 52 | }; |
| 53 | 53 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | protected function addShipmentClient(Container $container) |
| 61 | 61 | { |
| 62 | - $container[static::CLIENT_SHIPMENT] = function () use ($container) { |
|
| 62 | + $container[static::CLIENT_SHIPMENT] = function() use ($container) { |
|
| 63 | 63 | return new AmazonPayToShipmentBridge($container->getLocator()->shipment()->client()); |
| 64 | 64 | }; |
| 65 | 65 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | protected function addCheckoutClient(Container $container) |
| 73 | 73 | { |
| 74 | - $container[static::CLIENT_CHECKOUT] = function () use ($container) { |
|
| 74 | + $container[static::CLIENT_CHECKOUT] = function() use ($container) { |
|
| 75 | 75 | return new AmazonPayToCheckoutBridge($container->getLocator()->checkout()->client()); |
| 76 | 76 | }; |
| 77 | 77 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | protected function addCalculationClient(Container $container) |
| 85 | 85 | { |
| 86 | - $container[static::CLIENT_CALCULATION] = function () use ($container) { |
|
| 86 | + $container[static::CLIENT_CALCULATION] = function() use ($container) { |
|
| 87 | 87 | return new AmazonPayToCalculationBridge($container->getLocator()->calculation()->client()); |
| 88 | 88 | }; |
| 89 | 89 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | protected function addCustomerClient(Container $container) |
| 97 | 97 | { |
| 98 | - $container[static::CLIENT_CUSTOMER] = function () use ($container) { |
|
| 98 | + $container[static::CLIENT_CUSTOMER] = function() use ($container) { |
|
| 99 | 99 | return new AmazonPayToCustomerBridge($container->getLocator()->customer()->client()); |
| 100 | 100 | }; |
| 101 | 101 | } |
@@ -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() |
@@ -39,18 +39,18 @@ |
||
| 39 | 39 | const OMS_FLAG_NOT_AUTH = 'not auth'; |
| 40 | 40 | const OMS_FLAG_NOT_CAPTURED = 'not captured'; |
| 41 | 41 | |
| 42 | - const STATUS_DECLINED = 'STATUS_DECLINED';//setIsDeclined |
|
| 43 | - const STATUS_CANCELLED = 'STATUS_CANCELLED';//setIsCancelled |
|
| 44 | - const STATUS_CLOSED = 'STATUS_CLOSED';//setIsClosed |
|
| 42 | + const STATUS_DECLINED = 'STATUS_DECLINED'; //setIsDeclined |
|
| 43 | + const STATUS_CANCELLED = 'STATUS_CANCELLED'; //setIsCancelled |
|
| 44 | + const STATUS_CLOSED = 'STATUS_CLOSED'; //setIsClosed |
|
| 45 | 45 | const STATUS_SUSPENDED = 'STATUS_SUSPENDED'; |
| 46 | - const STATUS_PENDING = 'STATUS_PENDING';//setIsPending |
|
| 47 | - const STATUS_OPEN = 'STATUS_OPEN';//setIsOpen |
|
| 48 | - const STATUS_COMPLETED = 'STATUS_COMPLETED';//setIsCompleted |
|
| 49 | - const STATUS_EXPIRED = 'STATUS_EXPIRED';//setIsReauthorizable |
|
| 50 | - const STATUS_PAYMENT_METHOD_INVALID = 'STATUS_CODE_PAYMENT_METHOD_INVALID';//setIsPaymentMethodInvalid |
|
| 51 | - const STATUS_AMAZON_CLOSED = 'STATUS_CODE_AMAZON_CLOSED';//setIsClosedByAmazon |
|
| 52 | - const STATUS_TRANSACTION_TIMED_OUT = 'STATUS_CODE_TRANSACTION_TIMED_OUT';//setIsTransactionTimedOut |
|
| 53 | - const STATUS_PAYMENT_METHOD_CHANGED = 'STATUS_PAYMENT_METHOD_CHANGED';//setIsTransactionTimedOut |
|
| 46 | + const STATUS_PENDING = 'STATUS_PENDING'; //setIsPending |
|
| 47 | + const STATUS_OPEN = 'STATUS_OPEN'; //setIsOpen |
|
| 48 | + const STATUS_COMPLETED = 'STATUS_COMPLETED'; //setIsCompleted |
|
| 49 | + const STATUS_EXPIRED = 'STATUS_EXPIRED'; //setIsReauthorizable |
|
| 50 | + const STATUS_PAYMENT_METHOD_INVALID = 'STATUS_CODE_PAYMENT_METHOD_INVALID'; //setIsPaymentMethodInvalid |
|
| 51 | + const STATUS_AMAZON_CLOSED = 'STATUS_CODE_AMAZON_CLOSED'; //setIsClosedByAmazon |
|
| 52 | + const STATUS_TRANSACTION_TIMED_OUT = 'STATUS_CODE_TRANSACTION_TIMED_OUT'; //setIsTransactionTimedOut |
|
| 53 | + const STATUS_PAYMENT_METHOD_CHANGED = 'STATUS_PAYMENT_METHOD_CHANGED'; //setIsTransactionTimedOut |
|
| 54 | 54 | |
| 55 | 55 | const IPN_REQUEST_TYPE_PAYMENT_AUTHORIZE = 'PaymentAuthorize'; |
| 56 | 56 | const IPN_REQUEST_TYPE_PAYMENT_CAPTURE = 'PaymentCapture'; |
@@ -85,16 +85,16 @@ discard block |
||
| 85 | 85 | protected function getNotificationTypeToHandlerMap() |
| 86 | 86 | { |
| 87 | 87 | return [ |
| 88 | - AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_AUTHORIZE => function (AmazonpayIpnPaymentRequestTransfer $ipnRequest) { |
|
| 88 | + AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_AUTHORIZE => function(AmazonpayIpnPaymentRequestTransfer $ipnRequest) { |
|
| 89 | 89 | return $this->getIpnPaymentAuthorizeHandler($ipnRequest); |
| 90 | 90 | }, |
| 91 | - AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_CAPTURE => function (AmazonpayIpnPaymentRequestTransfer $ipnRequest) { |
|
| 91 | + AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_CAPTURE => function(AmazonpayIpnPaymentRequestTransfer $ipnRequest) { |
|
| 92 | 92 | return $this->getIpnPaymentCaptureHandler($ipnRequest); |
| 93 | 93 | }, |
| 94 | - AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_REFUND => function (AmazonpayIpnPaymentRequestTransfer $ipnRequest) { |
|
| 94 | + AmazonPayConfig::IPN_REQUEST_TYPE_PAYMENT_REFUND => function(AmazonpayIpnPaymentRequestTransfer $ipnRequest) { |
|
| 95 | 95 | return $this->getIpnPaymentRefundHandler($ipnRequest); |
| 96 | 96 | }, |
| 97 | - AmazonPayConfig::IPN_REQUEST_TYPE_ORDER_REFERENCE_NOTIFICATION => function (AmazonpayIpnPaymentRequestTransfer $ipnRequest) { |
|
| 97 | + AmazonPayConfig::IPN_REQUEST_TYPE_ORDER_REFERENCE_NOTIFICATION => function(AmazonpayIpnPaymentRequestTransfer $ipnRequest) { |
|
| 98 | 98 | return $this->getIpnOrderReferenceHandler($ipnRequest); |
| 99 | 99 | }, |
| 100 | 100 | ]; |
@@ -106,25 +106,25 @@ discard block |
||
| 106 | 106 | protected function getAuthorizeHandlerMap() |
| 107 | 107 | { |
| 108 | 108 | return [ |
| 109 | - AmazonPayConfig::STATUS_TRANSACTION_TIMED_OUT => function () { |
|
| 109 | + AmazonPayConfig::STATUS_TRANSACTION_TIMED_OUT => function() { |
|
| 110 | 110 | return $this->createIpnPaymentAuthorizeSuspendedHandler(); |
| 111 | 111 | }, |
| 112 | - AmazonPayConfig::STATUS_SUSPENDED => function () { |
|
| 112 | + AmazonPayConfig::STATUS_SUSPENDED => function() { |
|
| 113 | 113 | return $this->createIpnPaymentAuthorizeSuspendedHandler(); |
| 114 | 114 | }, |
| 115 | - AmazonPayConfig::STATUS_PAYMENT_METHOD_INVALID => function () { |
|
| 115 | + AmazonPayConfig::STATUS_PAYMENT_METHOD_INVALID => function() { |
|
| 116 | 116 | return $this->createIpnPaymentAuthorizeSuspendedHandler(); |
| 117 | 117 | }, |
| 118 | - AmazonPayConfig::STATUS_DECLINED => function () { |
|
| 118 | + AmazonPayConfig::STATUS_DECLINED => function() { |
|
| 119 | 119 | return $this->createIpnPaymentAuthorizeDeclineHandler(); |
| 120 | 120 | }, |
| 121 | - AmazonPayConfig::STATUS_OPEN => function () { |
|
| 121 | + AmazonPayConfig::STATUS_OPEN => function() { |
|
| 122 | 122 | return $this->createIpnPaymentAuthorizeOpenHandler(); |
| 123 | 123 | }, |
| 124 | - AmazonPayConfig::STATUS_CLOSED => function () { |
|
| 124 | + AmazonPayConfig::STATUS_CLOSED => function() { |
|
| 125 | 125 | return $this->createIpnPaymentAuthorizeClosedHandler(); |
| 126 | 126 | }, |
| 127 | - AmazonPayConfig::STATUS_EXPIRED => function () { |
|
| 127 | + AmazonPayConfig::STATUS_EXPIRED => function() { |
|
| 128 | 128 | return $this->createIpnPaymentAuthorizeClosedHandler(); |
| 129 | 129 | }, |
| 130 | 130 | ]; |
@@ -196,13 +196,13 @@ discard block |
||
| 196 | 196 | protected function getCaptureHandlerMap() |
| 197 | 197 | { |
| 198 | 198 | return [ |
| 199 | - AmazonPayConfig::STATUS_DECLINED => function () { |
|
| 199 | + AmazonPayConfig::STATUS_DECLINED => function() { |
|
| 200 | 200 | return $this->createIpnPaymentCaptureDeclineHandler(); |
| 201 | 201 | }, |
| 202 | - AmazonPayConfig::STATUS_COMPLETED => function () { |
|
| 202 | + AmazonPayConfig::STATUS_COMPLETED => function() { |
|
| 203 | 203 | return $this->createIpnPaymentCaptureCompletedHandler(); |
| 204 | 204 | }, |
| 205 | - AmazonPayConfig::STATUS_CLOSED => function () { |
|
| 205 | + AmazonPayConfig::STATUS_CLOSED => function() { |
|
| 206 | 206 | return $this->createIpnEmptyHandler(); |
| 207 | 207 | }, |
| 208 | 208 | ]; |
@@ -258,10 +258,10 @@ discard block |
||
| 258 | 258 | protected function getRefundHandlerMap() |
| 259 | 259 | { |
| 260 | 260 | return [ |
| 261 | - AmazonPayConfig::STATUS_DECLINED => function () { |
|
| 261 | + AmazonPayConfig::STATUS_DECLINED => function() { |
|
| 262 | 262 | return $this->createIpnPaymentRefundDeclineHandler(); |
| 263 | 263 | }, |
| 264 | - AmazonPayConfig::STATUS_COMPLETED => function () { |
|
| 264 | + AmazonPayConfig::STATUS_COMPLETED => function() { |
|
| 265 | 265 | return $this->createIpnPaymentRefundCompletedHandler(); |
| 266 | 266 | }, |
| 267 | 267 | ]; |
@@ -310,25 +310,25 @@ discard block |
||
| 310 | 310 | protected function getOrderReferenceHandlerMap() |
| 311 | 311 | { |
| 312 | 312 | return [ |
| 313 | - AmazonPayConfig::STATUS_OPEN => function () { |
|
| 313 | + AmazonPayConfig::STATUS_OPEN => function() { |
|
| 314 | 314 | return $this->createIpnOrderReferenceOpenHandler(); |
| 315 | 315 | }, |
| 316 | - AmazonPayConfig::STATUS_AMAZON_CLOSED => function () { |
|
| 316 | + AmazonPayConfig::STATUS_AMAZON_CLOSED => function() { |
|
| 317 | 317 | return $this->createIpnOrderReferenceClosedHandler(); |
| 318 | 318 | }, |
| 319 | - AmazonPayConfig::STATUS_EXPIRED => function () { |
|
| 319 | + AmazonPayConfig::STATUS_EXPIRED => function() { |
|
| 320 | 320 | return $this->createIpnEmptyHandler(); |
| 321 | 321 | }, |
| 322 | - AmazonPayConfig::STATUS_CLOSED => function () { |
|
| 322 | + AmazonPayConfig::STATUS_CLOSED => function() { |
|
| 323 | 323 | return $this->createIpnEmptyHandler(); |
| 324 | 324 | }, |
| 325 | - AmazonPayConfig::STATUS_PAYMENT_METHOD_INVALID => function () { |
|
| 325 | + AmazonPayConfig::STATUS_PAYMENT_METHOD_INVALID => function() { |
|
| 326 | 326 | return $this->createIpnOrderReferenceSuspendedHandler(); |
| 327 | 327 | }, |
| 328 | - AmazonPayConfig::STATUS_SUSPENDED => function () { |
|
| 328 | + AmazonPayConfig::STATUS_SUSPENDED => function() { |
|
| 329 | 329 | return $this->createIpnOrderReferenceSuspendedHandler(); |
| 330 | 330 | }, |
| 331 | - AmazonPayConfig::STATUS_CANCELLED => function () { |
|
| 331 | + AmazonPayConfig::STATUS_CANCELLED => function() { |
|
| 332 | 332 | return $this->createIpnOrderReferenceCancelledHandler(); |
| 333 | 333 | }, |
| 334 | 334 | ]; |