Skip to content

Commit

Permalink
Revert "request explicit input"
Browse files Browse the repository at this point in the history
This reverts commit d2c2535.
  • Loading branch information
kingjia90 committed Aug 26, 2024
1 parent d2c2535 commit a3206b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class PaymentController extends AbstractController\AbstractFrontendController
/** @var Mpay24Seamless $payment */
$payment = $checkoutManager->getPayment();
$paymentInfo = $checkoutManager->startOrderPayment();
$paymentType = $request->request->getString('type');
$paymentType = $request->get('type');
if ($request->isMethod('post')) {
if ($request->isMethod('post') && $paymentType == 'INVOICE') {
Expand Down Expand Up @@ -237,7 +237,7 @@ class PaymentController extends AbstractController\AbstractFrontendController
$serviceShop->getCart()
);
$type = $request->request->getString('type');
$type = $request->get('type');
if ($type == 'confirmation') {
//@see https://docs.mpay24.com/docs/backend2backend-integration
$this->getLogger()->info('Mpay24 called confirmation URL.');
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"minimum-stability": "dev",
"require": {
"mpay24/mpay24-php": "^4.2",
"pimcore/pimcore": "^11.2",
"pimcore/pimcore": "^11.0",
"pimcore/ecommerce-framework-bundle": "^1.0"
},
"conflict": {
Expand Down
6 changes: 3 additions & 3 deletions src/PaymentManager/Payment/Mpay24Seamless.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function getInitPaymentRedirectUrl($config): array
}

$mpay24 = new \Mpay24\Mpay24($this->getMpay24Config());
$paymentType = $request->request->getString('type');
$paymentType = $request->get('type');

if ($request->isMethod('post') && isset($paymentType)) {
$order = $config['order'];
Expand All @@ -237,13 +237,13 @@ public function getInitPaymentRedirectUrl($config): array
'useProfile' => 'false', // Optional: set if you want to create a profile
];

$payment['token'] = $request->request->getString('token');
$payment['token'] = $request->get('token');
switch ($paymentType) {
case 'CC':
$paymentType = 'TOKEN';
break;
case 'TOKEN':
$payment['token'] = $request->request->getString('token');
$payment['token'] = $request->get('token');
break;
}

Expand Down

0 comments on commit a3206b6

Please sign in to comment.