codenteq/iyzico-payment-gateway

Call to a member function toArray() on null

Closed this issue · 1 comments

Hi,
I am using bagisto 1.4.5 and your extension
after checkout and payment in iyzico sandbox, i get this error in the image below

image

Hello @AlaaL, with the release of Bagisto v2.0, some routes have been updated. You need to update the payment_methods line to paymentmethods in the src/Config/system.php file. The same process should be applied to src/Providers/IyzicoServiceProvider.php, where you need to update the payment_methods line to paymentmethods.

src/Config/system.php

$this->mergeConfigFrom(
   +    'key'    => 'sales.paymentmethods.iyzico',
   -      'key'    => 'sales.payment_methods.iyzico',
);

src/Providers/IyzicoServiceProvider.php

$this->mergeConfigFrom(
   +    dirname(__DIR__) . '/Config/paymentmethods.php', 'paymentmethods'
   -     dirname(__DIR__) . '/Config/paymentmethods.php', 'payment_methods'
);

This method will work with your Bagisto version.