Skip to content
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
aizaz-shahid opened this issue Dec 10, 2019 · 1 comment

Comments

@aizaz-shahid
Copy link

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:

image

@sai5839448
Copy link

ok

@paypal paypal deleted a comment from sai5839448 Dec 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants