Worldpay / Worldpay-Magento2-CG

Worldpay Magento 2 Plugin for Worldpay Corporate Gateway
Other
17 stars 35 forks source link

Magento 2.4.4 with PHP8.1. Sapient_Worldpay is not working #86

Closed sanjusmaliyelil closed 2 years ago

sanjusmaliyelil commented 2 years ago

Hi,

We are getting the below errors with the Sapient_Worldpay extension when we upgraded Magento to 2.4.4. Please assist us to fix it.

  1. 1/9 [===>------------------------] 11% 5 secs 170.0 Misyntax error, unexpected fully qualified name "\Payment\State"#0 D:\wamp3.2.6\www\alexandra-code\vendor\composer\ClassLoader.php(428): Composer\Autoload\includeFile('D:\wamp3.2.6\ww ...')

    1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Sapient\Worldpa...')

2.Fatal error: Declaration of Sapient\Worldpay\Logger\WorldpayLogger::addRecord($level, $message, array $context = []) must be compatible with Monolog\Logger::addRecord(int $level, string $message, array $context = []): bool in D:\wamp3.2.6\www\alexandra-code\vendor\sapien t\module-worldpay\Logger\WorldpayLogger.php on line 9

  1. Laminas\Code\Reflection\ClassReflection Object ( [name] => Sapient\Worldpay\Api\PaymentTypeInterface [docBlock:protected] => ) Type Error occurred when creating object: Magento\Framework\Communication\Config\Data, Magento\Framework\Reflection\TypeProcessor::resolveFullyQualifiedClassName(): Argument #2 ($typeName) must be of type string, null given, called in D:\wamp3.2.6\www\alexandra-code\vend or\magento\framework\Reflection\TypeProcessor.php on line 550

In AbstractFactory.php line 131:

Type Error occurred when creating object: Magento\Framework\Communication\Config\Data, Magento\Framework\Reflection\TypeProcessor::resolveFullyQualifiedClassName(): Argument #2 ($typeName) must be of type string, null given, called in D:\wamp3.2.6\www\alexandra-code \vendor\magento\framework\Reflection\TypeProcessor.php on line 550

Many thanks! Sanju

obsergiu commented 2 years ago

we've hit the same issue

i do understand that the current module is not yet fully compatible with M2.4.4 but still ...

deemantha22 commented 2 years ago

Hi,

Unfortunately, we are getting same issue. I am on php 7.4 and Magento 2.4.4.

Type Error occurred when creating object: Magento\Framework\Communication\Config\Data, Argument 2 passed to Magento\Framework\Reflection\TypeProcessor::resolveFullyQualifiedClassName() must be of the type string, null given, called in vendor/magento/framework/Reflection/TypeProcessor.php on line 550

chandan-PS commented 2 years ago

@sanjusmaliyelil , @obsergiu and @deemantha22 - We have not released the 2.4.4 compatible plugin yet. Please check back this space after mid of June for our latest release updates.

deemantha22 commented 2 years ago

@chandan-PS - Many thanks for the update. We will check back mid June.

zamoroka commented 2 years ago

The fix is here: https://github.com/Worldpay/Worldpay-Magento2-CG/pull/87

deemantha22 commented 2 years ago

Hi @zamoroka

Thanks for the update but I am still getting same error after applying patch you posted(vendor/sapient/module-worldpay/Model/Payment/Update/Authorised.php)

Module 'Magento_AdvancedPricingImportExport':
Module 'Magento_Directory':
Module 'Magento_Amqp':
Type Error occurred when creating object: Magento\Framework\Communication\Config\Data, Argument 2 passed to Magento\Framework\Reflection\TypeProcessor::resolveFullyQualifiedClassName() must be of the type string, null given, called in /vendor/magento/framework/Reflection/TypeProcessor.php on line 550
zamoroka commented 2 years ago

@deemantha22 could yu please double check if there is no . at the end of * @param string $countryId doc block in Sapient\Worldpay\Api\PaymentTypeInterface after you applied the patch?

deemantha22 commented 2 years ago

@zamoroka excellent, it worked. Seems like it was the dot. I had to remove dot from all below not only PaymentTypeInterface.

HostedUrlInterface HistoryInterface LatAmInstalInterface

sanjusmaliyelil commented 2 years ago

Hi @zamoroka https://github.com/zamoroka

How can I download this patch file?

Many Thanks, Sanju S Maliyelil , Senior Software Engineer Mobile: +91 9496089220 CORRA.COM /LINKEDIN https://www.linkedin.com/company-beta/141347//TWITTER https://twitter.com/GoCorra

On Tue, May 24, 2022 at 9:00 PM Deemantha @.***> wrote:

@zamoroka https://github.com/zamoroka excellent, it worked. Seems like it was the dot. I had to remove dot from all below not only PaymentTypeInterface.

HostedUrlInterface HistoryInterface LatAmInstalInterface

— Reply to this email directly, view it on GitHub https://github.com/Worldpay/Worldpay-Magento2-CG/issues/86#issuecomment-1136077906, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBE4YED3NJCWGOYFBF6PC3VLTYYZANCNFSM5WH5X5FA . You are receiving this because you were mentioned.Message ID: @.***>

zamoroka commented 2 years ago

@sanjusmaliyelil check PR https://github.com/Worldpay/Worldpay-Magento2-CG/pull/87/files

sanjusmaliyelil commented 2 years ago

Yea I saw this. Is it possible to download it as .patch file? We are using the composer version of the extension. So should be applied via patch.

Many Thanks, Sanju S Maliyelil , Senior Software Engineer Mobile: +91 9496089220 CORRA.COM /LINKEDIN https://www.linkedin.com/company-beta/141347//TWITTER https://twitter.com/GoCorra

On Tue, May 24, 2022 at 9:05 PM zamoroka @.***> wrote:

@sanjusmaliyelil https://github.com/sanjusmaliyelil check PR https://github.com/Worldpay/Worldpay-Magento2-CG/pull/87/files

— Reply to this email directly, view it on GitHub https://github.com/Worldpay/Worldpay-Magento2-CG/issues/86#issuecomment-1136083317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBE4YG4A2WM5LIEQZ7X5STVLTZK5ANCNFSM5WH5X5FA . You are receiving this because you were mentioned.Message ID: @.***>

zamoroka commented 2 years ago

@sanjusmaliyelil https://letmegooglethat.com/?q=github+create+patch+from+pull+request

sanjusmaliyelil commented 2 years ago

Hi @zamoroka ,

I have downloaded the patch and applied it. di:compile is successful. But while running setup:upgrade got below error ` The XML in file "D:/wamp3.2.6/www/alexandra-code/vendor/sapient/module-worldpay/etc/db_schema.xml" is invalid: Element 'column', attribute 'padding': The attribute 'padding' is not allowed. Line: 5

Element 'column', attribute 'unsigned': The attribute 'unsigned' is not allowed. Line: 5

Element 'column', attribute 'identity': The attribute 'identity' is not allowed. Line: 5

Element 'column', attribute 'padding': The attribute 'padding' is not allowed. Line: 100

Element 'column', attribute 'unsigned': The attribute 'unsigned' is not allowed. Line: 100

Element 'column', attribute 'identity': The attribute 'identity' is not allowed. Line: 100

Verify the XML and try again. `

sanjusmaliyelil commented 2 years ago

Hi @zamoroka ,

I got patch for the pull request https://github.com/Worldpay/Worldpay-Magento2-CG/pull/83/files and I have successfully completed the setup upgrade.

Thanks! Sanju

sanjusmaliyelil commented 2 years ago

Hi @zamoroka ,

While trying to place order using world pay , getting below error as a response. {"message":"Deprecated Functionality: Constant FILTER_SANITIZE_STRING is deprecated in \/app\/c7t5qvabrjwco_stg\/vendor\/sapient\/module-worldpay\/Model\/Mapping\/Service.php on line 315"}

Can you please let us know how we can resolve this?

Thanks! Sanju

sanjusmaliyelil commented 2 years ago

Hi @zamoroka ,

Any update regarding above issue?

Thanks! Sanju