Skip to content
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
@aizaz-shahid

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:

image

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions