Closed dennisbuijsgmailcom closed 2 years ago
Hi Dennis.
Thanks for reach us and for your report.
The reported log entry is not related with how longs is the payment method name record in order table. This entry is logged when our platform sent a notification to the webshop to declare a payment link has expired. For example:
Is perfectly normal, desirable and harmless. We log this only with information purposes, and as you probably already notice, the log can be deactivating when you disable debug mode in the extension settings page.
===
However, even when the log is correct, I fully understand your comment and something seems to be not working properly on your side
Do you have more information, because at this moment we can not reproduce this issue. ?
Thanks.
Hi
This log you mentioned 'Callback received with a non registered payment method for' is then missing the if ($this->config->get($this->key_prefix . 'multisafepay_debug_mode')) {
Ok, I checked the default checkout and it is saving forinstance 'iDEAL', so that is ok. I am using Journal 3 so there is the problem, its saving payment_method like iDEAL.
Best regard Dennis
Hi Dennis.
I just received a reply via email from you, with a suggestion about how to fix this. Not sure why GitHub is not indexing that reply here. Maybe it takes a little bit of time. In any case, the following was your suggestion:
<operation info="Reset payment method without icons">
<search><![CDATA['payment_method' => Arr::get($this->session->data, 'payment_method.title', ''),]]></search>
<add position="before" offset="2"><![CDATA[
if(strpos($code, 'multisafepay') !== false) {
$title = Arr::get($this->session->data, 'payment_method.title', '');
$gateway = $this->multisafepay->getGatewayByPaymentCode(Arr::get($this->session->data, 'payment_method.code', ''));
if ($gateway) {
$title = $gateway['description'];
}
return array(
'payment_method' => $title,
'payment_code' => Arr::get($this->session->data, 'payment_method.code', ''),
);
}
]]>
</add>
</operation>
Is funny because we both was working in the same line, at the same moment.
I am going to change your proposal to the following because is cleaner, and also because it follows the same workaround that we implement in the core of OpenCart via Events.
This will be included in the next days in a new release of the OCMOD patch for Journal 3, which as you know is downloadable from this page.
<operation>
<search><![CDATA['payment_method' => Arr::get($this->session->data, 'payment_method.title', ''),]]></search>
<add position="replace"><![CDATA[
'payment_method' => trim(strip_tags(Arr::get($this->session->data, 'payment_method.title', ''))),
]]>
</add>
</operation>
Hi Daniel
Very good. I had a xml attachement, so I have send the previous reply to different Multisafepay email address. that's why it was not included in this issue/ticket.
Best regards Dennis
Hi
I have checked your solution and this is better, it will also does removing the icons for other payment methods aswell, so another used payment method in our website now also stored with icon in the database.
So....Fixed :-)
Best regards Dennis
Hi
Enother small issue. I saw a lot of logging entries like:
Callback received with a non registered payment method for 115480 on 14/03/2022 10:21:03 with status: expired, and PSP ID:
I checked and I think the problem is when you display payment methods with icoons, a very large string will be added in table order->payment_method, more then 128 characters. This depend a bit on the image url with domain name.
You can say, I do the img src without domein name, but then I think when a pdf invoice is generated the image will not be displayed.
I have made the field order->payment_method 256 characters max to solve it.
Best regards Dennis