cancel
Showing results for 
Search instead for 
Did you mean: 

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
4 REPLIES 4

Hi,

 

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

 

Regards,

   John

osa
Member

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

gulfamali
Member
@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.

Hi,

 

My problem has been resolved by upgrading authorizenet version to 2.0

 

Thanks

Gulfam