@@ -24,20 +24,20 @@ |
||
24 | 24 | * @var array $defaultConfigs |
25 | 25 | */ |
26 | 26 | public $defaultConfigs = array('PAGANTIS_TITLE'=>'Instant Financing', |
27 | - 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pmtSDK.simulator.types.SIMPLE', |
|
28 | - 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pmtSDK.simulator.skins.BLUE', |
|
29 | - 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
30 | - 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
31 | - 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
32 | - 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
33 | - 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pmtSDK.simulator.positions.INNER', |
|
34 | - 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
35 | - 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
36 | - 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
37 | - 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
38 | - 'PAGANTIS_URL_OK'=>'', |
|
39 | - 'PAGANTIS_URL_KO'=>'', |
|
40 | - 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
27 | + 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pmtSDK.simulator.types.SIMPLE', |
|
28 | + 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pmtSDK.simulator.skins.BLUE', |
|
29 | + 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
30 | + 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
31 | + 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
32 | + 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
33 | + 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pmtSDK.simulator.positions.INNER', |
|
34 | + 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
35 | + 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
36 | + 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
37 | + 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
38 | + 'PAGANTIS_URL_OK'=>'', |
|
39 | + 'PAGANTIS_URL_KO'=>'', |
|
40 | + 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
41 | 41 | ); |
42 | 42 | |
43 | 43 | /** |
@@ -360,9 +360,9 @@ |
||
360 | 360 | $magentoVersion = $this->productMetadataInterface->getVersion(); |
361 | 361 | $moduleInfo = $this->moduleList->getOne('Pagantis_Pagantis'); |
362 | 362 | return array( 'magento' => $magentoVersion, |
363 | - 'pagantis' => $moduleInfo['setup_version'], |
|
364 | - 'php' => phpversion(), |
|
365 | - 'curl' => $curlVersion); |
|
363 | + 'pagantis' => $moduleInfo['setup_version'], |
|
364 | + 'php' => phpversion(), |
|
365 | + 'curl' => $curlVersion); |
|
366 | 366 | } |
367 | 367 | |
368 | 368 | /** |
@@ -107,12 +107,12 @@ discard block |
||
107 | 107 | $customer = $quote->getCustomer(); |
108 | 108 | $shippingAddress = $quote->getShippingAddress(); |
109 | 109 | |
110 | - if (isset($params['email']) && $params['email']!='') { |
|
110 | + if (isset($params['email']) && $params['email'] != '') { |
|
111 | 111 | $this->session->setEmail($params['email']); //Get guest email after refresh page |
112 | 112 | $customer->setEmail($params['email']); |
113 | 113 | $quote->setCheckoutMethod('guest'); |
114 | 114 | $quote->getBillingAddress()->setEmail($params['email']); |
115 | - } elseif ($customer->getEmail()=='') { |
|
115 | + } elseif ($customer->getEmail() == '') { |
|
116 | 116 | $customer->setEmail($this->session->getEmail()); |
117 | 117 | $quote->setCheckoutMethod('guest'); |
118 | 118 | $quote->getBillingAddress()->setEmail($this->session->getEmail()); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $currentQuote->setCustomerEmail($customer->getEmail()); |
124 | 124 | $this->quoteRepository->save($currentQuote); |
125 | 125 | |
126 | - $userAddress = new Address(); |
|
126 | + $userAddress = new Address(); |
|
127 | 127 | $userAddress |
128 | 128 | ->setZipCode($shippingAddress->getPostcode()) |
129 | 129 | ->setFullName($shippingAddress->getFirstname()." ".$shippingAddress->getLastname()) |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | ->setMobilePhone($shippingAddress->getTelephone()) |
144 | 144 | ; |
145 | 145 | |
146 | - $orderBillingAddress = new Address(); |
|
146 | + $orderBillingAddress = new Address(); |
|
147 | 147 | $billingAddress = $quote->getBillingAddress(); |
148 | 148 | $orderBillingAddress |
149 | 149 | ->setZipCode($billingAddress->getPostcode()) |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | if ($customer->getDob()) { |
171 | 171 | $orderUser->setDateOfBirth($customer->getDob()); |
172 | 172 | } |
173 | - if ($customer->getTaxvat()!='') { |
|
173 | + if ($customer->getTaxvat() != '') { |
|
174 | 174 | $orderUser->setDni($customer->getTaxvat()); |
175 | 175 | $orderBillingAddress->setDni($customer->getTaxvat()); |
176 | 176 | $orderShippingAddress->setDni($customer->getTaxvat()); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | ->setUser($orderUser) |
251 | 251 | ; |
252 | 252 | |
253 | - if ($this->config['pagantis_public_key']=='' || $this->config['pagantis_private_key']=='') { |
|
253 | + if ($this->config['pagantis_public_key'] == '' || $this->config['pagantis_private_key'] == '') { |
|
254 | 254 | throw new \Exception('Public and Secret Key not found'); |
255 | 255 | } |
256 | 256 | |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | } |
277 | 277 | |
278 | 278 | $displayMode = $this->extraConfig['PAGANTIS_FORM_DISPLAY_TYPE']; |
279 | - if ($displayMode==='0') { |
|
279 | + if ($displayMode === '0') { |
|
280 | 280 | echo $url; |
281 | 281 | exit; |
282 | 282 | } else { |
@@ -298,11 +298,11 @@ discard block |
||
298 | 298 | private function getOrders($customerId) |
299 | 299 | { |
300 | 300 | $orderCollection = array(); |
301 | - if ($customerId!='') { |
|
301 | + if ($customerId != '') { |
|
302 | 302 | $this->orderCollection->addAttributeToFilter('customer_id', $customerId) |
303 | 303 | ->addAttributeToFilter( |
304 | 304 | 'status', |
305 | - ['in' => ['processing','pending','complete']] |
|
305 | + ['in' => ['processing', 'pending', 'complete']] |
|
306 | 306 | ) |
307 | 307 | ->load(); |
308 | 308 | $orderCollection = $this->orderCollection->getData(); |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | $tableName = $this->dbObject->getTableName(self::ORDERS_TABLE); |
346 | 346 | return $dbConnection->insertOnDuplicate( |
347 | 347 | $tableName, |
348 | - array('id'=>$quoteId,'order_id'=>$pagantisOrderId), |
|
348 | + array('id'=>$quoteId, 'order_id'=>$pagantisOrderId), |
|
349 | 349 | array('order_id') |
350 | 350 | ); |
351 | 351 | } |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | $curlVersion = $curlInfo['version']; |
360 | 360 | $magentoVersion = $this->productMetadataInterface->getVersion(); |
361 | 361 | $moduleInfo = $this->moduleList->getOne('Pagantis_Pagantis'); |
362 | - return array( 'magento' => $magentoVersion, |
|
362 | + return array('magento' => $magentoVersion, |
|
363 | 363 | 'pagantis' => $moduleInfo['setup_version'], |
364 | 364 | 'php' => phpversion(), |
365 | 365 | 'curl' => $curlVersion); |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $secretKey = $this->getRequest()->getParam('secret'); |
50 | 50 | $privateKey = isset($this->config['pagantis_private_key']) ? $this->config['pagantis_private_key'] : null; |
51 | 51 | |
52 | - if ($secretKey!='' && $privateKey!='') { |
|
52 | + if ($secretKey != '' && $privateKey != '') { |
|
53 | 53 | $this->checkDbLogTable(); |
54 | 54 | /** @var \Magento\Framework\DB\Adapter\AdapterInterface $dbConnection */ |
55 | 55 | $dbConnection = $this->dbObject->getConnection(); |
@@ -20,20 +20,20 @@ |
||
20 | 20 | * @var array $defaultConfigs |
21 | 21 | */ |
22 | 22 | public $defaultConfigs = array('PAGANTIS_TITLE'=>'Instant Financing', |
23 | - 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pmtSDK.simulator.types.SIMPLE', |
|
24 | - 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pmtSDK.simulator.skins.BLUE', |
|
25 | - 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
26 | - 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
27 | - 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
28 | - 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
29 | - 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pmtSDK.simulator.positions.INNER', |
|
30 | - 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
31 | - 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
32 | - 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
33 | - 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
34 | - 'PAGANTIS_URL_OK'=>'', |
|
35 | - 'PAGANTIS_URL_KO'=>'', |
|
36 | - 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
23 | + 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pmtSDK.simulator.types.SIMPLE', |
|
24 | + 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pmtSDK.simulator.skins.BLUE', |
|
25 | + 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
26 | + 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
27 | + 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
28 | + 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
29 | + 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pmtSDK.simulator.positions.INNER', |
|
30 | + 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
31 | + 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
32 | + 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
33 | + 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
34 | + 'PAGANTIS_URL_OK'=>'', |
|
35 | + 'PAGANTIS_URL_KO'=>'', |
|
36 | + 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | /** |