Reply
osa
Member
Posts: 2
Registered: ‎01-04-2019

PHP SDK Fatal Error void must be compatible with

Hi,

 

I've just cloned the php sdk from git and run 'composer update', but when I try the following command:

 

php PaymentTransactions/charge-credit-card.php

I get the folling error message:

 

PHP Fatal error:  Declaration of JMS\Serializer\JsonDeserializationVisitor::startVisitingObject(JMS\Serializer\Metadata\ClassMetadata $metadata, JMS\Serializer\object $object, array $type): void must be compatible with JMS\Serializer\Visitor\DeserializationVisitorInterface::startVisitingObject(JMS\Serializer\Metadata\ClassMetadata $metadata, JMS\Serializer\Visitor\object $data, array $type): void in authorize/vendor/jms/serializer/src/JsonDeserializationVisitor.php on line 14

php version is:  7.1.23

 

Any ideas ?

 

Thanks,

    John

 

 

osa
Member
Posts: 2
Registered: ‎01-04-2019

Re: PHP SDK Fatal Error void must be compatible with

Hi,

 

Quick update, I've updated my version of PHP to 7.2 and it seems to have resolved the issue.

 

Regards,

   John

Member
Posts: 3
Registered: ‎09-02-2019

Re: PHP SDK Fatal Error void must be compatible with

Hi,

 

I update php version 7.1 to 7.2 and authorize .net version is 1.9.6 but I am facing the same issue. could anyone help.

 

Thanks

Gulfam

All Star
Posts: 627
Registered: ‎11-05-2018

Re: PHP SDK Fatal Error void must be compatible with

@gulfamali

Has your sdk ever worked? Or is this your first time installing it? I don’t think PHP 7 is required for 1.9.6. Id have to look it up but I don’t think that’s your problem.
Member
Posts: 3
Registered: ‎09-02-2019

Re: PHP SDK Fatal Error void must be compatible with

Hi,

 

My problem has been resolved by upgrading authorizenet version to 2.0

 

Thanks

Gulfam