thanks!
I have been smashing my head against my desk whole day trying to figure out the reason that I can not add a sticker subscribe to a customer through pars.
Here's what my objective objective is:
NSDictionary * productInfo = @ {@ "TokenId": token. TokenId, @ "plan": @ "test plan", @ "email": currentUser.email};
I am calling this PFCloud function in the background:
Parse.Cloud.define ("createSubscription", function (request, response) {var Stripe = requires ('stripe') // test Stripe.initialize ('abcdefghijklmnopqrstuvwxyz'); Stripe.Customers.create ({Card: request.params.tokenId, email: request.params.email, plan: request .params. Plan} {Success: Function (HttpResponse) {response.success ("Success - Subscribed");}, Error: Function (HttpResponse) {response.error ("Error - Unsubscribe")}}) });
I have mentioned "card" as "card", as outlined in the document of strip:.
I have also tried to use the scheme ID instead of the name. Does anyone know what I am doing wrong?
Edit: I forgot to tell that I am receiving this error message, half I have written - [Error]: Error - Unsubscribe (Code: 141, Version: 1.6.3) .
For anyone interested in integrating pars and fir I talked to the good people on striking customer support and they told me two important things.
First of all, if you are using the latest Stripe API version (2015/02/18), you want the key going to use the "source", but if you have an older version If you are using the key "card" you want to use.
Second, be sure to use the ID of your plan. This key is the name of the "scheme".
No comments:
Post a Comment