0

Working with Update Plan API http://paypal.github.io/PayPal-PHP-SDK/sample/doc/billing/UpdatePlan.html I did not find if plan has “inactive” state and which key have I to use for it? I made :

$value = new PayPalModel('{
   "state":"INACTIVE"
 }');

But got error :

Requested state change is invalid.

1) How valid?

2) If in my developer's account there is a page where I can see all my plans and work with them in my developer's account ?

Thanks!

Petro Gromovo
  • 1,755
  • 5
  • 33
  • 91

1 Answers1

1

Code taken from: https://github.com/paypal/PayPal-PHP-SDK/blob/master/lib/PayPal/Api/BankAccount.php

The BankAccount API extends PayPalModel and uses $state on the following line: 392

Here is the array:

 /**
 * State of this funding instrument.
 * Valid Values: ["ACTIVE", "INACTIVE", "DELETED"]
 *
 * @param string $state
 * 
 * @return $this
 */

public function setState($state)
{
    $this->state = $state;
    return $this;
}

From this PayPal Rest API - Update Billing Plan Return URL answer it might appear that you already have agreements attached to your plan so therefore you cannot make it INACTIVE.

Addi
  • 199
  • 14