简体   繁体   English

在Recurly JS中更新订阅和帐户信息的功能等效于什么?

[英]What's the equivalent of this function to update a subscription and account info in Recurly JS?

I contacted Recurly and they don't want to offer any support on this. 我联系了Recurly,他们不想为此提供任何支持。

I need to know the objects specific format otherwise Recurly will bounce if any extra data is sent or if you don't have the exact arguments for the query (which are different for each function). 我需要知道对象的特定格式,否则,如果发送了额外的数据,或者您没有确切的查询参数(每个函数都不同),则递归会反弹。

Ruby: 红宝石:

subscription = Recurly::Subscription.find('uuid')
subscription.update_attributes(
  :plan_code => 'silver',...

PHP, Pyton, XML = (also in the docs) PHP,Pyton,XML =(也在文档中)

NodeJS = ?????????? NodeJS = ?????????? (we have no clue) (我们不知道)

Much thanks!!! 非常感谢!!!

PS. PS。 This is the response I got from Recurly, 这是我从递归得到的回应,

Hi Turk, Thank you for your note. 嗨,特克,谢谢您的来信。 Understanding of the question is whether there is a Javascript equivalent for updating billing information. 对问题的理解是是否存在等效的Javascript用于更新帐单信息。 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. 我们可以提供的唯一受支持的选项如下:-使用Recurly.js V3表单( https://docs.recurly.com/js/ ),创建新帐户,添加账单信息并创建订阅-更新账单通过API的信息。 ( https://dev.recurly.com/docs/lookup-an-accounts-billing-info ) https://dev.recurly.com/docs/lookup-an-accounts-billing-info

I hope this is helpful. 我希望这是有帮助的。 Thank you again. 再次感谢你。 Regards, 问候,

Ian Recurly Support Ian递归支持

PSS . PSS I also tried to contact their technicians via IRC - irc://chat.freenode.net:+6697/recurly but no luck again. 我还尝试通过IRC与他们的技术人员联系-irc://chat.freenode.net:+ 6697 / recurly,但是再没有运气了。

Recurly.js is Recurly's name for a front-end web technology that enables the merchant to easily build their subscription checkout and accept payments. Recurly.js是Recurly的前端Web技术的名称,该技术使商户可以轻松地建立其订阅结帐并接受付款。 Using this library, merchants can tokenize payment information, display price/tax previews, and validate customer inputs. 使用此库,商人可以标记付款信息,显示价格/税款预览并验证客户输入。 Because it is client-side, it can NOT be used to create or modify accounts, subscriptions, transactions, etc. 由于它是客户端,因此不能用于创建或修改帐户,订阅,交易等。

In order to perfrom CRUD operations in Recurly, you must use its RESTful Web Services API , either directly or through one of the provided wrappers (in PHP, Ruby, Python, and C#.NET). 为了在Recurly中执行CRUD操作,必须直接或通过提供的包装器之一(在PHP,Ruby,Python和C#.NET中)使用其RESTful Web服务API Recurly itself does not provide a supported API wrapper for NodeJS, although a 3rd-party one exists and has been used successfully. 尽管存在第三方并且成功使用了第三方 ,但是Recurly本身并未为NodeJS提供受支持的API包装器。 This library contains functions to update an existing account and update an existing subscription . 该库包含用于更新现有帐户更新现有订阅的功能

To update account '1234', you would use: 要更新帐户“ 1234”,您可以使用:

recurly.accounts.update('1234', {email: 'fake@test.com'}, function(res){
 console.log(res['data']);
})

The second argument to this function is a JSON representation of the values that are changing. 此函数的第二个参数是更改值的JSON表示形式。 Available parameters are listed here . 可用参数在此处列出。

To update subscription '32d7e59b0def37ddfabbd54d1296145b', you would use: 要更新订阅“ 32d7e59b0def37ddfabbd54d1296145b”,您可以使用:

recurly.subscriptions.update('32d7e59b0def37ddfabbd54d1296145b', { quantity: 5 }, function(res){
 console.log(res['data']);
})

The second argument to this function is a JSON representation of the values that are changing. 此函数的第二个参数是更改值的JSON表示形式。 Available parameters are listed here . 可用参数在此处列出。

-Charlie (Sales Engineer @ Recurly) -Charlie(销售工程师@ Recurly)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM