razorpay / razorpay-magento

Razorpay Payment Extension for Magento
28 stars 39 forks source link

Not compatible with PHP8.2 and Magento2.4.6-p1 #449

Closed syedsaleem086 closed 5 months ago

syedsaleem086 commented 1 year ago

Hi,

We installed the default magento2.4.6-p1 with PHP8.2 the checkout page goes blank

We installed latest Razorpay using composer

Kind Regards, Syed

VishalAgarwal commented 1 year ago

Hi requesting to resolve this on priority.

sachingulwane1 commented 1 year ago

File:

Model/TrackPluginInstrumentation.php

updating funtion on line 35 - TrackPluginInstrumentation

as bellow, has fixed it for me. on Magento 2.4.6 PHP 8.2

Updated function Code:

class TrackPluginInstrumentation { const MODULE_NAME = 'Razorpay_Magento';

protected $api;

protected $mode;

protected $moduleList;

protected \Razorpay\Magento\Model\Config $config; // Add explicit property declaration
protected \Psr\Log\LoggerInterface $logger; // Add explicit property declaration

public function __construct(
    \Razorpay\Magento\Model\Config $config, // Update parameter type hint
    ModuleListInterface $moduleList,
    \Psr\Log\LoggerInterface $logger // Update parameter type hint
)
{
    $this->config       = $config;
    $this->api          = $this->setAndGetRzpApiInstance();
    $this->moduleList   = $moduleList;
    $this->logger       = $logger;
}

Update: this only fixes installation error, but there are some more errors on checkout page.

nicedhanraj commented 1 year ago

I am having the same issue. This issues means that we cannot have Razorpay on Magento 2.4.6.

ramth05 commented 5 months ago

@gijoe707 , this is not related to Razorpay.

ramth05 commented 5 months ago

We have already release latest plugin with php8.2 support.