Adyen / adyen-magento2

Adyen Payment plugin for Magento2
MIT License
155 stars 213 forks source link

additionnal_information in payment table is truncated on big orders #1698

Open Nuranto opened 2 years ago

Nuranto commented 2 years ago

Describe the bug

On one of our order, additional_information in payment table is so big that it exceed the column size limit (TEXT). It leads to truncated text that causes errors in Magento (cannot list orders, cannot view concerned order, etc..)

Stack trace:
#0 /var/www/html/vendor/magento/framework/Model/ResourceModel/AbstractResource.php(153): Magento\Framework\Serialize\Serializer\Json->unserialize('{"guestEmail":"...')
#1 /var/www/html/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(489): Magento\Framework\Model\ResourceModel\AbstractResource->_unserializeField(Object(Magento\Sales\Model\Order\Payment\Interceptor), 'additional_info...', Array)
#2 /var/www/html/vendor/magento/module-sales/Model/ResourceModel/Order/Payment/Collection.php(80): Magento\Framework\Model\ResourceModel\Db\AbstractDb->unserializeFields(Object(Magento\Sales\Model\Order\Payment\Interceptor))

To Reproduce

I don't know how to reproduce

Magento version

2.4.5

Plugin version

8.4.0

Nuranto commented 2 years ago

Additional information (ahah ..?) : It occurs 2 times actually. Both on very big orders (with a lot of products)

Morerice commented 2 years ago

Hi @Nuranto,

Thanks for opening this issue. We have had similar issues before, more specifically related to the size of the additional_information field. We will look into identifying a suitable solution for this issue.

Thanks, Jean Adyen

Morerice commented 2 years ago

Hi @Nuranto,

I was not able to replicate the specified issue, even when I added a large number of products to the order. From my tests, the number of products does not impact the info saved by the adyen module in the additional_information field since the module does not save any product related info in this field.

The module does save the action variable in this field which can be quite long. However this variable cannot be deleted/truncated during payment processing since it is required by the module. However, it is possible to remove it once the payment is completed (after webhook handling).

Did this issue occur when the payment was done using a specific payment method? Also would it be possible for you to check if you have some other enabled module that is adding product data in the additional_information field?

Thanks, Jean Adyen

Nuranto commented 2 years ago

Hi @Morerice,

The quantity of product was just a guess. It was not because of that then...

It happened 2 times only. Never since.

There is no other extension that could add data in the additional_information.

I can send you the PSP reference if that can help.

Morerice commented 2 years ago

Hi @Nuranto,

Yes definitely, but we prefer to not send pspReferences trough Github. Could you please send an email to support@adyen.com and in it include the pspReferences and also the data (if any) that gets successfully saved in the in the additional_information field?

It would also be great if you included a link to this github issue in your email.

Thanks, Jean Adyen

Nuranto commented 2 years ago

Of course !

It's done

ghost commented 1 year ago

Closing ticket since being handled via support email.

Nuranto commented 1 year ago

Note: I just disabled additionnal risk data option, which hide the issue. Doesn't mean the issue is resolved in this package.

Nuranto commented 8 months ago

Update : We had several cases those past few days. (we did not changed anything in our conf, additionnal risk data option is still disabled). It's very annoying.