24.4. 允许通过开发人员门户支付被拒绝的发票

作为 3scale API 供应商,允许通过开发人员门户支付被拒绝的发票。要启用这些付款,请在管理门户中更新 Invoice s 模板。请注意,这个步骤适用于 Developer Portal 的现有实例。

先决条件

  • 您必须具有 3scale 的管理员权限。
  • 您必须有一个带有 stripe 或 Brain tree 的帐户。

步骤

要允许通过开发人员门户支付被拒绝的发票,请按照以下步骤操作:

  1. 在 3scale 管理门户中,转至 Audience > Developer Portal > Content
  2. 编辑 Root > Invoices > Show template
  3. 替换这些代码行:

    <a href="{{ urls.invoices }}">
      <i class="fa fa-chevron-left"></i>
        Cancel
        </a>
        {{ invoice.period_begin | date: '%B, %Y' }} Invoice

    在这个片段中:

    <div class="clearfix">
      <a href="{{ urls.invoices }}">
        <i class="fa fa-chevron-left"></i>
          Cancel
        </a>
        {{ invoice.period_begin | date: '%B, %Y' }} Invoice
        {% if invoice.pay_now? %}
          <a href="{{invoice.url}}/payment" class="pull-right btn btn-success pay-invoice-btn">Pay invoice</a>
        {% endif %}
    </div>