doujing6436 2014-05-23 14:21
浏览 14

基本的recurly.js测试

Trying to work out the basic recurly.js demo here: https://github.com/recurly/recurly-js-examples

Only things I'm changing in the demo code are recurly public key on the form page, and my apiKey, subdomain, and plan_code on the new subscription page. I can tell the form is hitting my recurly account correctly because if I change my billing requirements in Recurly to require a billing field (like City/State/etc.) without actually passing that form field it throws an error.

However, I'm not seeing any of these new test subscriptions/transactions/etc. in my Recurly dashboard.

I'm a js novice at best, so I feel like I'm just missing something really obvious in my test environment here.

  • 写回答

1条回答 默认 最新

  • dongyuan1983 2014-09-12 00:28
    关注

    I know this reply is a bit late. But, here is my understanding of the process:

    1. At the time you submit your checkout form, recurly.js intercepts, encrypts, and sends any credit card (and other form) details directly to recurly, from your client-side js code.
    2. recurly.js then receives a unique token back (still entirely client side on your end).
    3. Pass the recurly-generated token to your own server's backend code (PHP, Ruby, etc). You would not actually send any cc details along with the form at this point.
    4. From your backend code, issue a 'Create Subscription' call to the Recurly API, providing the token.

    At that point, I believe Recurly makes a definite association between the CC and subscription, by using the token.

    If you never complete the server-side part of this (steps 3 & 4), then Recurly would have no way to associate the CC details with any API entity/object (ie. Subscription, Customer, etc). There would be no way of displaying these CC details on a dashboard of transactions, since the CC details alone are not a transaction.

    评论

报告相同问题?

悬赏问题

  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line