【问题标题】:if paypal plan has “inactive” status?如果贝宝计划具有“非活动”状态?
【发布时间】:2019-11-29 02:59:55
【问题描述】:

使用更新计划 API http://paypal.github.io/PayPal-PHP-SDK/sample/doc/billing/UpdatePlan.html 我没有找到计划是否具有“非活动”状态以及我应该使用哪个键? 我做了:

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

但出现错误:

请求的状态更改无效。

1) 有效程度如何?

2) 如果在我的开发者帐户中有一个页面,我可以在其中查看我的所有计划并在我的开发者帐户中使用它们?

谢谢!

【问题讨论】:

    标签: paypal


    【解决方案1】:

    代码取自: https://github.com/paypal/PayPal-PHP-SDK/blob/master/lib/PayPal/Api/BankAccount.php

    BankAccount API 扩展了 PayPalModel 并在以下行使用 $state:392

    这是数组:

     /**
     * State of this funding instrument.
     * Valid Values: ["ACTIVE", "INACTIVE", "DELETED"]
     *
     * @param string $state
     * 
     * @return $this
     */
    
    public function setState($state)
    {
        $this->state = $state;
        return $this;
    }
    

    从这个PayPal Rest API - Update Billing Plan Return URL 的回答看来,您的计划已经附加了协议,因此您不能将其设为无效。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-20
      • 2017-09-02
      • 2014-06-16
      • 2023-04-04
      • 2015-01-03
      • 2013-10-01
      • 2018-01-14
      • 2020-06-01
      相关资源
      最近更新 更多