api-error:在接受PayPal付款之前,请在Recurly中配置一个包含参考交易的PayPal账户


api-error: Please configure a PayPal account with reference transactions in Recurly before accepting PayPal payments

我们使用Recurly.js。现在PayPal支付专业版可用于Recurly托管支付页面和Recurly.js.我集成PayPal按照给定的文档Recurly.js和PayPal支付专业版

现在面临错误>>>api-error:在接受PayPal付款之前,请在Recurly中配置一个包含参考交易的PayPal帐户

我整合paypal支付专业在我的经常性帐户和它的状态是在(绿色信号)。

但是运行时我得到这些错误。我该怎么办?

示例代码
<script>
      // Configure recurly.js
      recurly.configure({ publicKey: '***************', api: 'https://api.recurly.com/js/v1' });

      // On form submit, we stop submission to go get the token
      $('form').on('submit', function (event) {
        event.preventDefault();
        // Reset the errors display
        $('#errors').text('');
        $('input').removeClass('error');
        // Disable the submit button
        $('button').prop('disabled', true);
        var form = this;
        // Now we call recurly.paypal with an object containing a 'description' property. 
        // This will open a new window, beginning the PayPal billing agreement flow. 
        // to tokenize the credit card information, then injects the token into the
        // data-recurly="token" field above
        recurly.paypal({ description: 'test' }, function (err, token) {
          if (err) {
            // Let's handle any errors using the function below
            alert(err);
          } else {
            // set the hidden field above to the token we get back from Recurly
            $('#recurly-token').val(token.id);
            // Now we submit the form!
            form.submit();
          }
        });
      });
      // A simple error handling function to expose errors to the customer
      function error (err) {
        console && console.error(err);
        $('#errors').text('There was a problem intializing the PayPal transaction! Please try again in a few moments.');
        $('button').prop('disabled', false);
      }
    </script>

您是否在使用recurly的页面内传递了您的recurly.configure文件?

确保在页面的任何地方调用recurly.configure。例如:

recurly.configure('sc-ABCDEFGHI123456789');

如文件所述:

not-configured  This error appears when you try to perform an operation without first calling recurly.configure.
源:

https://docs.recurly.com/js/错误