Skip to content

Commit 4fc5eca

Browse files
Merge branch 'release/1.0.0'
2 parents 26c296e + 7e5f86e commit 4fc5eca

File tree

8 files changed

+788
-26
lines changed

8 files changed

+788
-26
lines changed

Controller/Satispay/Callback.php

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
<?php
2+
/*
3+
Satispay Magento2 Plugin
4+
Copyright (C) 2017 Satispay
5+
6+
This program is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
This program is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
220
namespace Satispay\Satispay\Controller\Satispay;
321

422
class Callback extends \Magento\Framework\App\Action\Action {
523
protected $_order;
6-
protected $_satispayPayment;
7-
protected $_logger;
824

925
public function __construct(
1026
\Magento\Framework\App\Action\Context $context,
11-
\Magento\Sales\Model\Order $order,
12-
\Satispay\Satispay\Model\Payment $satispayPayment,
13-
\Psr\Log\LoggerInterface $logger
27+
\Magento\Sales\Model\Order $order
1428
) {
1529
parent::__construct($context);
1630
$this->_order = $order;
17-
$this->_satispayPayment = $satispayPayment;
18-
$this->_logger = $logger;
1931
}
2032

2133
public function execute() {

Controller/Satispay/Payment.php

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
<?php
2+
/*
3+
Satispay Magento2 Plugin
4+
Copyright (C) 2017 Satispay
5+
6+
This program is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
This program is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
220
namespace Satispay\Satispay\Controller\Satispay;
321

422
class Payment extends \Magento\Framework\App\Action\Action {
5-
protected $_satispayPayment;
623
protected $_checkoutSession;
7-
protected $_logger;
824

925
public function __construct(
1026
\Magento\Framework\App\Action\Context $context,
11-
\Satispay\Satispay\Model\Payment $satispayPayment,
12-
\Magento\Checkout\Model\Session $checkoutSession,
13-
\Psr\Log\LoggerInterface $logger
27+
\Magento\Checkout\Model\Session $checkoutSession
1428
) {
1529
parent::__construct($context);
16-
$this->_satispayPayment = $satispayPayment;
1730
$this->_checkoutSession = $checkoutSession;
18-
$this->_logger = $logger;
1931
}
2032

2133
public function execute() {
@@ -25,9 +37,9 @@ public function execute() {
2537
'description' => '#'.$lastOrder->getIncrementId(),
2638
'phone_number' => $lastOrder->getBillingAddress()->getTelephone(),
2739
'redirect_url' => $this->_url->getUrl('satispay/satispay/redirect'),
28-
'callback_url' => $this->_url->getUrl('satispay/satispay/callback', $this->_redirect->updatePathParams([
40+
'callback_url' => $this->_url->getUrl('satispay/satispay/callback', array(
2941
'charge' => '{uuid}'
30-
])),
42+
)),
3143
'amount_unit' => $lastOrder->getGrandTotal() * 100,
3244
'currency' => $lastOrder->getOrderCurrencyCode(),
3345
'metadata' => array(

Controller/Satispay/Redirect.php

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
<?php
2+
/*
3+
Satispay Magento2 Plugin
4+
Copyright (C) 2017 Satispay
5+
6+
This program is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
This program is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
220
namespace Satispay\Satispay\Controller\Satispay;
321

422
class Redirect extends \Magento\Framework\App\Action\Action {
5-
protected $_satispayPayment;
623
protected $_checkoutSession;
7-
protected $_logger;
824

925
public function __construct(
1026
\Magento\Framework\App\Action\Context $context,
11-
\Satispay\Satispay\Model\Payment $satispayPayment,
12-
\Magento\Checkout\Model\Session $checkoutSession,
13-
\Psr\Log\LoggerInterface $logger
27+
\Magento\Checkout\Model\Session $checkoutSession
1428
) {
1529
parent::__construct($context);
16-
$this->_satispayPayment = $satispayPayment;
1730
$this->_checkoutSession = $checkoutSession;
18-
$this->_logger = $logger;
1931
}
2032

2133
public function execute() {

0 commit comments

Comments
 (0)