简体   繁体   中英

Basic recurly.js testing

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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