This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
While activating plan using paypal-php-sdk receiving this error “Call to a member function toJSON() on array” #1323
Open
Description
This is my code as given in sdk samples:
` $patch = new Patch();
$value = new PayPalModel('{"state":"ACTIVE"}');
$patch->setOp('replace')
->setPath('/')
->setValue($value);
$patchRequest = new PatchRequest();
$patchRequest->addPatch($patch);
$output->update($patchRequest, $this->_api_context);
$plan = Plan::get($output->id , $this->_api_context);`
This is the error i am getting: