【问题标题】:Chargify Product Price update via api or codeChargify 通过 api 或代码更新产品价格
【发布时间】:2012-09-06 10:01:37
【问题描述】:

我正在使用 Chargify API 进行付款。我在那里创建了一些产品供订阅。现在我想通过我的站点管理面板管理这些产品价格和其他设置。但我在 Chargify API 中找不到任何功能或任何方式。如果有人知道通过 api 或代码更新此内容的任何方法,请告诉我。

提前感谢大家,

【问题讨论】:

    标签: php drupal chargify


    【解决方案1】:

    您似乎无法更改现有产品的价格(这似乎很奇怪),只能创建新产品。 Source.

    不过你可以make adjustments to existing subscriptions

    【讨论】:

      【解决方案2】:

      我很抱歉把它带回来,但我遇到了同样的问题,在我的测试中(目前)我能够更新发出 PUT 请求的产品。

      PUT 请求必须发送到以下网址:

      http://<site>.chargify.com/products/<product_id>
      

      并且只在正文中发送需要更新的字段。

      例子:

      PUT https://mysite.chargify.com/products/7358179 HTTP/1.1
      User-Agent: Fiddler
      Authorization: <your authorization token>
      Accept: application/xml
      Content-Type: application/xml
      Host: mysite.chargify.com
      Content-Length: 106
      
      <?xml version="1.0" encoding="utf-8"?>
      <product>
          <price_in_cents>2100</price_in_cents>
      </product>
      

      希望这可以帮助其他像我一样使用搜索引擎找到此页面的用户。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-10-29
        • 2018-04-22
        • 2018-01-30
        • 1970-01-01
        • 2020-08-21
        • 2014-04-20
        相关资源
        最近更新 更多