这个函数在 Recurly JS 中更新订阅和帐户信息的等价物是什么?
What's the equivalent of this function to update a subscription and account info in Recurly JS?
我联系了 Recurly,他们不想为此提供任何支持。
我需要知道对象的特定格式,否则如果发送任何额外数据或者如果您没有查询的确切参数(每个函数都不同),Recurly 将被退回。
Ruby:
subscription = Recurly::Subscription.find('uuid')
subscription.update_attributes(
:plan_code => 'silver',...
PHP,Pyton,XML =(也在文档中)
NodeJS = ???????????? (我们不知道)
非常感谢!!!
PS. 这是我从 Recurly 得到的回复,
Hi Turk, Thank you for your note. Understanding of the question is
whether there is a Javascript equivalent for updating billing
information. The only supported options we can offer are as follows:
- using the Recurly.js V3 form (https://docs.recurly.com/js/), to create new accounts, add billing info, and create a subscription
- update billing info through the API's. (https://dev.recurly.com/docs/lookup-an-accounts-billing-info)
I hope this is helpful. Thank you again. Regards,
Ian Recurly Support
PSS。我还尝试通过 IRC - irc://chat.freenode.net:+6697/recurly 联系他们的技术人员,但再次失败。
Recurly.js 是 Recurly 前端 Web 技术的名称,该技术使商家能够轻松构建订阅结账和接受付款。使用此库,商家可以标记支付信息、显示 price/tax 预览并验证客户输入。因为它是客户端,所以不能用于创建或修改帐户、订阅、交易等。
为了在 Recurly 中执行 CRUD 操作,您必须使用其 RESTful Web Services API, either directly or through one of the provided wrappers (in PHP, Ruby, Python, and C#.NET). Recurly itself does not provide a supported API wrapper for NodeJS, although a 3rd-party one exists and has been used successfully. This library contains functions to update an existing account and update an existing subscription。
要更新帐户“1234”,您将使用:
recurly.accounts.update('1234', {email: 'fake@test.com'}, function(res){
console.log(res['data']);
})
此函数的第二个参数是正在变化的值的 JSON 表示。列出了可用参数 here。
要更新订阅“32d7e59b0def37ddfabbd54d1296145b”,您将使用:
recurly.subscriptions.update('32d7e59b0def37ddfabbd54d1296145b', { quantity: 5 }, function(res){
console.log(res['data']);
})
此函数的第二个参数是正在变化的值的 JSON 表示。列出了可用参数 here。
-Charlie(销售工程师@Recurly)
我联系了 Recurly,他们不想为此提供任何支持。
我需要知道对象的特定格式,否则如果发送任何额外数据或者如果您没有查询的确切参数(每个函数都不同),Recurly 将被退回。
Ruby:
subscription = Recurly::Subscription.find('uuid')
subscription.update_attributes(
:plan_code => 'silver',...
PHP,Pyton,XML =(也在文档中)
NodeJS = ???????????? (我们不知道)
非常感谢!!!
PS. 这是我从 Recurly 得到的回复,
Hi Turk, Thank you for your note. Understanding of the question is whether there is a Javascript equivalent for updating billing information. The only supported options we can offer are as follows: - using the Recurly.js V3 form (https://docs.recurly.com/js/), to create new accounts, add billing info, and create a subscription - update billing info through the API's. (https://dev.recurly.com/docs/lookup-an-accounts-billing-info)
I hope this is helpful. Thank you again. Regards,
Ian Recurly Support
PSS。我还尝试通过 IRC - irc://chat.freenode.net:+6697/recurly 联系他们的技术人员,但再次失败。
Recurly.js 是 Recurly 前端 Web 技术的名称,该技术使商家能够轻松构建订阅结账和接受付款。使用此库,商家可以标记支付信息、显示 price/tax 预览并验证客户输入。因为它是客户端,所以不能用于创建或修改帐户、订阅、交易等。
为了在 Recurly 中执行 CRUD 操作,您必须使用其 RESTful Web Services API, either directly or through one of the provided wrappers (in PHP, Ruby, Python, and C#.NET). Recurly itself does not provide a supported API wrapper for NodeJS, although a 3rd-party one exists and has been used successfully. This library contains functions to update an existing account and update an existing subscription。
要更新帐户“1234”,您将使用:
recurly.accounts.update('1234', {email: 'fake@test.com'}, function(res){
console.log(res['data']);
})
此函数的第二个参数是正在变化的值的 JSON 表示。列出了可用参数 here。
要更新订阅“32d7e59b0def37ddfabbd54d1296145b”,您将使用:
recurly.subscriptions.update('32d7e59b0def37ddfabbd54d1296145b', { quantity: 5 }, function(res){
console.log(res['data']);
})
此函数的第二个参数是正在变化的值的 JSON 表示。列出了可用参数 here。
-Charlie(销售工程师@Recurly)