Telerik-Verified-Plugins/Stripe

Not an "issue", just a question

jmartignon opened this issue · 4 comments

First of all, thank you for your work on this. I'm still becoming familiar with Stripe so I have a basic question about the plugin. It's my understanding that Stripe has two "sides" to it. One is the client side js library that provides a rich API to interact with various Stripe elements (customers, plans, charges, etc). The other "side" is the server side. It is where Stripe actually commits the charge, etc. It's where the secret key is kept.

All of Stripe's examples are that you use the client side API to create customers, charges, etc. stubs that hand back keys. All of their examples then use server side code (with the secret key) to actually act on those stubs.

I'm following through your examples and see that you are able to create charges, etc. Would you help me with what I am missing? Is there a server side component to this? Is the code you are showing running somehow in Cloud Code? If not, are you sending the card info and everything in one api call via the client side Stripe api?

One last request...my app will actually not be doing one time charges but rather creating a Stripe Customer and assigning that Customer to Subscription Plan that will charge the Customer's card once a year. None of your examples show anything to do with Stripe subscriptions. I think it's just a different set of json options that get passed to associate a customer with a predefined Stripe Subscription Plan but would you confirm that or are there additional things that would need to be done to the Plugin to enable me to complete this scenario?

Thanks again for your help.

Sid31 commented

Hi jmartignon, this plugin require the secret stripe api code (i just try it), so obviously, i think that you have to send all cards number witch is a bad news for me. I m looking for an api which can use (like you described it) a client and a server side for stripe, because i dont want any trouble with any security lick.

Sid31 commented

Didn't see the age of your post, Did you find a solution?

I did resolve it. I ended up not using the Plug-In. If you download the stripe.js file from Stripe's site and follow their examples it works well. BUT....the only way (and the right way according to them) was that I had to have a server side component. I created a node.js Express server that had an endpoint that my client side app calls. The call is made with the public key and the server endpoint takes that call and makes a call to stripe itself with the private key.

Bottom line is that I had to bite the bullet and create a server side piece. It's actually pretty cool though in that the client side piece takes the credit card info and encrypts it with the public key. That way when the call to the server is made, the credit card info is protected. I followed the Stripe examples almost exactly as they have them and things are working well. Good luck!

Sid31 commented

You saved my week :)
Le 20 mai 2015 21:03, "jmartignon" notifications@github.com a écrit :

I did resolve it. I ended up not using the Plug-In. If you download the
stripe.js file from Stripe's site and follow their examples it works well.
BUT....the only way (and the right way according to them) was that I had to
have a server side component. I created a node.js Express server that had
an endpoint that my client side app calls. The call is made with the public
key and the server endpoint takes that call and makes a call to stripe
itself with the private key.

Bottom line is that I had to bite the bullet and create a server side
piece. It's actually pretty cool though in that the client side piece takes
the credit card info and encrypts it with the public key. That way when the
call to the server is made, the credit card info is protected. I followed
the Stripe examples almost exactly as they have them and things are working
well. Good luck!


Reply to this email directly or view it on GitHub
#1 (comment)
.