Post by opentoshopping » Mon Aug 19, 2019 2:53 pm

Hi All,

Since upgrade to mollie 9.1 (download latest files, and just overwrite/upload to ftp) I got following error 422 with locale invalid.

The way how we solved it now is to go back to 8.4.

Is there anything you guys know about that could be causing this? We're on 2.3.x with journal 2 theme.

2019-08-18 17:48:23 - Error setting up transaction with Mollie: Error executing API call (422: Unprocessable Entity): The locale is invalid. Field: locale. Documentation: https://docs.mollie.com/guides/handling-errors.

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by burrito » Mon Aug 19, 2019 3:33 pm

Just a quick reply here as I cannot get into my Github account...
What language setting are you using?

Image
Opencart specialist | Our website | Our modules


User avatar
Active Member

Posts

Joined
Tue Dec 15, 2009 6:10 pm
Location - Amsterdam, The Netherlands

Post by opentoshopping » Mon Aug 19, 2019 5:34 pm

What do you mean with language settings?

We want to use up to 8 languages. Right now those are: English and German.
See screenshots of the settings. Default admin and web is English.
Rest of the languages are disabled.

Attachments

Schermafbeelding 2019-08-19 om 11.34.09.png

Schermafbeelding 2019-08-19 om 11.34.09.png (71.78 KiB) Viewed 3144 times

Schermafbeelding 2019-08-19 om 11.34.14.png

Schermafbeelding 2019-08-19 om 11.34.14.png (38.09 KiB) Viewed 3144 times

Schermafbeelding 2019-08-19 om 11.34.26.png

Schermafbeelding 2019-08-19 om 11.34.26.png (38.07 KiB) Viewed 3144 times


New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by burrito » Mon Aug 19, 2019 5:49 pm

Can you try to open the mollie payment module and saving it? There is a new default setting that needs to be saved

Image
Opencart specialist | Our website | Our modules


User avatar
Active Member

Posts

Joined
Tue Dec 15, 2009 6:10 pm
Location - Amsterdam, The Netherlands

Post by opentoshopping » Mon Aug 19, 2019 6:03 pm

I think that worked, I don't get that error anymore.
However, I'm getting payment in Mollie in the currency of the webshop now. This used to be always EUR. How can I make it that it's always EUR?

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by burrito » Mon Aug 19, 2019 6:10 pm

it will use the currency used in the store if Mollie supports it. We do not have a setting currently to force EUR always. We're discussing now if this should be added in a next release.

Image
Opencart specialist | Our website | Our modules


User avatar
Active Member

Posts

Joined
Tue Dec 15, 2009 6:10 pm
Location - Amsterdam, The Netherlands

Post by opentoshopping » Mon Aug 19, 2019 7:04 pm

That's not completely correct, in the older mollie plugin, I really did get the payments within mollie as EUR. But on the website customers could select a different currency from the theme. We entered the conversion rates manually and even never updated them.
So I guess after checkout page when handover to mollie payment, somewhere conversion happened that the currency sent to mollie was EUR.

This is easier processing since within mollie the EUR payments directly switch to PAID (other currencies are in afwachting).
Also we don't have to pay for conversion costs or other issues.

Do you have a location in the plugin files where I can manually change some piece of code?

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by opentoshopping » Mon Aug 19, 2019 7:07 pm

Also, I see that when payments don't succeed, the orders are tagged as missing orders. Know how to solve this?

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by burrito » Mon Aug 19, 2019 7:41 pm

in the older versions, multi-currency wasn't supported at all, this is why it would always be processed in Euro. Since 9.x, multi-currency got introduced.
for the missing orders, this can happen in some cases, but it should generally be updated to either failed or expired.

Image
Opencart specialist | Our website | Our modules


User avatar
Active Member

Posts

Joined
Tue Dec 15, 2009 6:10 pm
Location - Amsterdam, The Netherlands

Post by opentoshopping » Mon Aug 19, 2019 7:46 pm

Although it sounds unlogically, we want to disable multicurrency :) So we want everything to go back to being sent in eur.

I found this code in mollie base.php

protected function convertCurrency($amount) {
$currency = '$this->session->data['currency']';
$configCurrency = $this->config->get("config_currency");
return $this->currency->convert($amount, $configCurrency, $currency);
}

and changed to
protected function convertCurrency($amount) {
$currency = 'EUR';
$configCurrency = $this->config->get("config_currency");
return $this->currency->convert($amount, $configCurrency, $currency);
}

will that work?

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by opentoshopping » Mon Aug 19, 2019 8:17 pm

I've also changed

// Load essentials
Util::load()->language("payment/mollie");

$model = $this->getModuleModel();
$order_id = $this->getOrderID();
$order = $this->getOpenCartOrder($order_id);

$currency = $this->session->data['currency'];
to
$currency = "EUR";

That seesm to work. The convert currency thing seems to be ok for now.

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by opentoshopping » Wed Aug 21, 2019 8:13 pm

Hey man, could you reply if the code I added is good?

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by OSWorX » Sat Aug 24, 2019 1:03 am

opentoshopping wrote:
Wed Aug 21, 2019 8:13 pm
Hey man, could you reply if the code I added is good?
Yes, the code is okay.
But - more for the developer himself! - this should be an option in the backend if the shopowner wants only 1 currency!

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: No registered users and 68 guests