Skip to content

Commit

Permalink
fix function (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkong87 authored Nov 15, 2024
1 parent 2ac093d commit 0dd054c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Model/Plugin/Order/EditOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,16 @@ public function __construct(RedirectFactory $forwardFactory)
* Plugin for save order after edit
*
* @param SaveAction $controller
* @param callable $method
* @return \Magento\Framework\Controller\Result\Redirect
*/
public function beforeExecute(SaveAction $controller, \Closure $method)
public function beforeExecute(SaveAction $controller)
{
$data = $controller->getRequest()->getParam('payment');
if (isset($data['method']) && $data['method'] == \Astound\Affirm\Model\Ui\ConfigProvider::CODE) {
$resultRedirect = $this->forwardRedirectFactory->create();
$resultRedirect->setPath('affirm/affirm/error');
return $resultRedirect;
}
return $method();
return $controller;
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "affirm/magento2",
"description": "Affirm's extension for the Magento 2 https://www.affirm.com/",
"type": "magento2-module",
"version": "4.0.4",
"version": "4.0.5",
"require": {
"php": "~7.4.0||~8.1.0||~8.2.0||~8.3.0"
},
Expand Down

0 comments on commit 0dd054c

Please sign in to comment.