@@ -90,7 +90,7 @@ |
||
| 90 | 90 | /** |
| 91 | 91 | * Monolog logger configuration. |
| 92 | 92 | */ |
| 93 | - public const LOGGER_STREAM_OUTPUT = APPLICATION_ROOT_DIR . '/data/log/ratepay.log'; |
|
| 93 | + public const LOGGER_STREAM_OUTPUT = APPLICATION_ROOT_DIR.'/data/log/ratepay.log'; |
|
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | 96 | * Path to bundle glossary file. |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | protected function addZedRequestClient(Container $container) |
| 35 | 35 | { |
| 36 | - $container[static::CLIENT_ZED_REQUEST] = function (Container $container) { |
|
| 36 | + $container[static::CLIENT_ZED_REQUEST] = function(Container $container) { |
|
| 37 | 37 | return $container->getLocator()->zedRequest()->client(); |
| 38 | 38 | }; |
| 39 | 39 | |
@@ -102,8 +102,7 @@ |
||
| 102 | 102 | protected function checkForErrors(RatepayResponseTransfer $ratepayResponseTransfer, CheckoutResponseTransfer $checkoutResponseTransfer) |
| 103 | 103 | { |
| 104 | 104 | if (!$ratepayResponseTransfer->getSuccessful()) { |
| 105 | - $errorMessage = $ratepayResponseTransfer->getCustomerMessage() != '' ? $ratepayResponseTransfer->getCustomerMessage() : |
|
| 106 | - $ratepayResponseTransfer->getResultText(); |
|
| 105 | + $errorMessage = $ratepayResponseTransfer->getCustomerMessage() != '' ? $ratepayResponseTransfer->getCustomerMessage() : $ratepayResponseTransfer->getResultText(); |
|
| 107 | 106 | |
| 108 | 107 | $error = new CheckoutErrorTransfer(); |
| 109 | 108 | $error |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | protected function addSalesFacade(Container $container) |
| 63 | 63 | { |
| 64 | - $container[static::FACADE_SALES] = function (Container $container) { |
|
| 64 | + $container[static::FACADE_SALES] = function(Container $container) { |
|
| 65 | 65 | return new RatepayToSalesBridge($container->getLocator()->sales()->facade()); |
| 66 | 66 | }; |
| 67 | 67 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | protected function addCalculationFacade(Container $container) |
| 77 | 77 | { |
| 78 | - $container[static::FACADE_CALCULATION] = function (Container $container) { |
|
| 78 | + $container[static::FACADE_CALCULATION] = function(Container $container) { |
|
| 79 | 79 | return new RatepayToCalculationBridge($container->getLocator()->calculation()->facade()); |
| 80 | 80 | }; |
| 81 | 81 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | protected function addProductFacade(Container $container) |
| 91 | 91 | { |
| 92 | - $container[self::FACADE_PRODUCT] = function (Container $container) { |
|
| 92 | + $container[self::FACADE_PRODUCT] = function(Container $container) { |
|
| 93 | 93 | return new RatepayToProductBridge($container->getLocator()->product()->facade()); |
| 94 | 94 | }; |
| 95 | 95 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | protected function addGlossaryFacade(Container $container) |
| 105 | 105 | { |
| 106 | - $container[self::FACADE_GLOSSARY] = function (Container $container) { |
|
| 106 | + $container[self::FACADE_GLOSSARY] = function(Container $container) { |
|
| 107 | 107 | return new RatepayToGlossaryBridge($container->getLocator()->glossary()->facade()); |
| 108 | 108 | }; |
| 109 | 109 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | protected function addMoneyFacade(Container $container) |
| 119 | 119 | { |
| 120 | - $container[self::FACADE_MONEY] = function (Container $container) { |
|
| 120 | + $container[self::FACADE_MONEY] = function(Container $container) { |
|
| 121 | 121 | return new RatepayToMoneyBridge($container->getLocator()->money()->facade()); |
| 122 | 122 | }; |
| 123 | 123 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | */ |
| 132 | 132 | protected function addSalesQueryContainer(Container $container) |
| 133 | 133 | { |
| 134 | - $container[self::SALES_QUERY_CONTAINER] = function (Container $container) { |
|
| 134 | + $container[self::SALES_QUERY_CONTAINER] = function(Container $container) { |
|
| 135 | 135 | return new RatepayToSalesQueryContainerBridge($container->getLocator()->sales()->queryContainer()); |
| 136 | 136 | }; |
| 137 | 137 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | protected function injectPaymentPlugins(Container $container) |
| 38 | 38 | { |
| 39 | - $container->extend(PaymentDependencyProvider::CHECKOUT_PLUGINS, function (CheckoutPluginCollection $pluginCollection) { |
|
| 39 | + $container->extend(PaymentDependencyProvider::CHECKOUT_PLUGINS, function(CheckoutPluginCollection $pluginCollection) { |
|
| 40 | 40 | $pluginCollection->add(new RatepaySaveOrderPlugin(), RatepayConfig::PROVIDER_NAME, PaymentDependencyProvider::CHECKOUT_ORDER_SAVER_PLUGINS); |
| 41 | 41 | $pluginCollection->add(new RatepayPostCheckPlugin(), RatepayConfig::PROVIDER_NAME, PaymentDependencyProvider::CHECKOUT_POST_SAVE_PLUGINS); |
| 42 | 42 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | protected function injectCommands(Container $container) |
| 47 | 47 | { |
| 48 | - $container->extend(OmsDependencyProvider::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { |
|
| 48 | + $container->extend(OmsDependencyProvider::COMMAND_PLUGINS, function(CommandCollectionInterface $commandCollection) { |
|
| 49 | 49 | $commandCollection |
| 50 | 50 | ->add(new PaymentRequestPlugin(), 'Ratepay/PaymentRequest') |
| 51 | 51 | ->add(new CancelPaymentPlugin(), 'Ratepay/CancelOrder') |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | protected function injectConditions(Container $container) |
| 68 | 68 | { |
| 69 | - $container->extend(OmsDependencyProvider::CONDITION_PLUGINS, function (ConditionCollectionInterface $conditionCollection) { |
|
| 69 | + $container->extend(OmsDependencyProvider::CONDITION_PLUGINS, function(ConditionCollectionInterface $conditionCollection) { |
|
| 70 | 70 | $conditionCollection |
| 71 | 71 | ->add(new IsPaymentRequestPlugin(), 'Ratepay/IsPaymentRequestSuccess') |
| 72 | 72 | ->add(new IsCancellationConfirmedPlugin(), 'Ratepay/IsCancellationConfirmed') |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | if (!isset($this->paymentMethodsMapping[$paymentMethodName])) { |
| 43 | 43 | throw new NoPaymentMethodException(); |
| 44 | 44 | } |
| 45 | - $paymentMethodGet = 'get' . ucfirst($this->paymentMethodsMapping[$paymentMethodName]); |
|
| 45 | + $paymentMethodGet = 'get'.ucfirst($this->paymentMethodsMapping[$paymentMethodName]); |
|
| 46 | 46 | |
| 47 | 47 | return $payment->$paymentMethodGet(); |
| 48 | 48 | } |
@@ -34,8 +34,8 @@ |
||
| 34 | 34 | public function saveOrderPayment(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponseTransfer) |
| 35 | 35 | { |
| 36 | 36 | $this->getFactory() |
| 37 | - ->createOrderSaver($quoteTransfer, $checkoutResponseTransfer) |
|
| 38 | - ->saveOrderPayment(); |
|
| 37 | + ->createOrderSaver($quoteTransfer, $checkoutResponseTransfer) |
|
| 38 | + ->saveOrderPayment(); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | { |
| 83 | 83 | $data = $this->buildData(); |
| 84 | 84 | $rootTag = $this->getRootTag(); |
| 85 | - $xml = new SimpleXMLElement('<' . $rootTag . '></' . $rootTag . '>'); |
|
| 85 | + $xml = new SimpleXMLElement('<'.$rootTag.'></'.$rootTag.'>'); |
|
| 86 | 86 | $this->arrayToXml($data, $xml); |
| 87 | 87 | |
| 88 | 88 | return $xml->asXML(); |