Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Can't create manual transaction #3812

Open
MatthiasBrodelet opened this issue Dec 11, 2024 · 3 comments
Open

[5.x]: Can't create manual transaction #3812

MatthiasBrodelet opened this issue Dec 11, 2024 · 3 comments

Comments

@MatthiasBrodelet
Copy link

What happened?

Description

Creating a manual transaction always results in a server error.

[TypeError] craft\commerce\elements\Order::setPaymentAmount(): Argument #1 ($amount) must be of type float, array given, called in /var/www/vhosts/the-house.be/sites/the-house.be/vendor/craftcms/commerce/src/controllers/PaymentsController.php on line 447 {"trace":["#0 /var/www/vhosts/the-house.be/sites/the-house.be/vendor/craftcms/commerce/src/controllers/PaymentsController.php(447): craft\\commerce\\elements\\Order->setPaymentAmount()","#1 [internal function]: craft\\commerce\\controllers\\PaymentsController->actionPay()","#2 /var/www/vhosts/the-house.be/sites/the-house.be/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()","#3 /var/www/vhosts/the-house.be/sites/the-house.be/vendor/yiisoft/yii2/base/Controller.php(178): yii\\base\\InlineAction->runWithParams()","#4 /var/www/vhosts/the-house.be/sites/the-house.be/vendor/yiisoft/yii2/base/Module.php(552): yii\\base\\Controller->runAction()","#5 /var/www/vhosts/the-house.be/sites/the-house.be/vendor/craftcms/cms/src/web/Application.php(350): yii\\base\\Module->runAction()","#6 /var/www/vhosts/the-house.be/sites/the-house.be/vendor/craftcms/cms/src/web/Application.php(649): craft\\web\\Application->runAction()","#7 /var/www/vhosts/the-house.be/sites/the-house.be/vendor/craftcms/cms/src/web/Application.php(312): craft\\web\\Application->_processActionRequest()","#8 /var/www/vhosts/the-house.be/sites/the-house.be/vendor/yiisoft/yii2/base/Application.php(384): craft\\web\\Application->handleRequest()","#9 /var/www/vhosts/the-house.be/sites/the-house.be/web/index.php(12): yii\\base\\Application->run()","#10 {main}"],"memory":13283872,"exception":"[object] (TypeError(code: 0): craft\\commerce\\elements\\Order::setPaymentAmount(): Argument #1 ($amount) must be of type float, array given, called in /var/www/vhosts/the-house.be/sites/the-house.be/vendor/craftcms/commerce/src/controllers/PaymentsController.php on line 447 at /var/www/vhosts/the-house.be/sites/the-house.be/vendor/craftcms/commerce/src/elements/Order.php:2569)"}

Image

As you can see the field still converts the amount wrong.
It should have been fixed but it isn't.
Maybe it is related.

This issue is really blocking for us since no manual transactions can be registered and this means that the order can't be set to paid.

Steps to reproduce

  1. Set account to Dutch
  2. Open manual transaction dialog
  3. Edit amount to be correctly formatted
  4. Click on save

Expected behavior

The amount should be correctly formatted and should not throw an error.

Actual behavior

Big server error.

Craft CMS version

5.5.5

Craft Commerce version

5.2.8

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Copy link

linear bot commented Dec 11, 2024

@MatthiasBrodelet
Copy link
Author

I just noticed that 5.2.9 has a fix for the server error.
I can confirm that this fixes the biggest issue.

Can the number formatting still be fixed though?
Our customer always has to delete the amount in the input field and re-enter it correctly.

@lukeholder
Copy link
Member

@MatthiasBrodelet sorry, yes we released a partial fix, sorry for not updating this ticket. We are working on the number formatting for the next release. Will close this issue once that is out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants