#stripe

/

      • ywain
        Hi kempo, there's a basic Checkout + Flask tutorial on our site: https://stripe.com/docs/checkout/flask
      • Amarna joined the channel
      • Amarna
        I would like use Stripe in C# with Visual Studio 2010. Can you help me ... ?
      • manwithgills joined the channel
      • ftknox has quit
      • kempo
        ywain: yes i found that but i think that one is not detailed enough and there is no example for recurring payment and so on
      • manwithgills
        I am having issues with my stripe integration. I am getting the following error "Stripe::InvalidRequestError (This customer has no attached payment source):" Just need some pointers on where to start. My gut tells me to look at the stripe_card_token variable but from what I can see it looks correct.
      • ywain
        Hey Amarna, I don't have any experience with it myself but you should checkout the Stripe.net library: https://github.com/jaymedavis/stripe.net
      • Amarna has quit
      • kempo: okay. Our documentation has Python sample for everything, but nothing Flask specific. Stripe's API is unopinionated, so how you design your webapp is up to you
      • manwithgills: how are you creating the customer object? Are you passing a token ID in the `source` parameter?
      • VJ joined the channel
      • VJ has quit
      • manwithgills
        @ywain Here is what I have "customer = Stripe::Customer.create(description: email, plan: plan_id, card: stripe_card_token) self.stripe_customer_token = customer.id"
      • ywain
        manwithgills: okay. Can you check that `stripe_card_token` does contain a valid token ID?
      • stripe490
        @ywain :). Do you know if it's in the roadmap to handle subscription as the destination charges ?
      • ywain
        stripe490: yes, I replied earlier but you must have missed :) it is on the roadmap, but I don't have any ETA to provide at this time
      • saurabhjha has quit
      • manwithgills
        @ywain So I am looking at my users.js file and this is the code snippet I have for the stripe_card_token. "var token = response.id; //Inject the card token in a hidden field. theForm.append( $('<input type="hidden" name="user[stripe_card_token]">').val(token) ); //Submit form to our Rails app."
      • saurabhjha joined the channel
      • umpc joined the channel
      • ywain
        manwithgills: I'd recommend adding traces in both the client-side JS code and the server-side Ruby code to make sure that the token ID is provided as expected
      • codefresh
        hello @yawin
      • i am using node.js library in order to do the validation of the requests
      • for some reasons it always fails.
      • i have also debugged through the entire process of the internals of the node.js stripe module and i completely understand the process
      • but it is always generating a different hmac than what is passed from stripe
      • manwithgills
        thank you. I will do this and come back if I need help.
      • ywain
        Hi codefresh. Are you referring to webhook validation?
      • codefresh
        i am currently testing this using the test mode (i have also tried to run it in live mode, because i thought it might relate to the test mode, but it is not working in live too)
      • yes, webhook validation
      • manwithgills has quit
      • ywain
        codefresh: what's the exact error you're seeing?
      • codefresh
        No signatures found matching the expected signature for payload
      • this happens because the calculated hmac is different than what is passed
      • i am debugging the npm module it-self
      • ywain
        codefresh: can you share your code for invoking `constructEvent`? You can use gist.github.com or pastebin.com. Make sure to redact your API key and webhook signing secret
      • codefresh
        i made sure i am using the correct signing secret
      • ofcourse. it's basically just copy paste of the documentation code
      • saurabhjha has quit
      • let sig = request.headers["stripe-signature"]; eventObject = stripe.webhooks.constructEvent(request.body, sig, config.stripe.webhookSignSecret);
      • and i made sure to run the bodyParser middleware just like it says
      • and when i debug the flow it self, i see the exact body that was sent in the test webhook
      • so i know that the payload that i have, matches the same payload that was actually sent
      • ywain
        codefresh: okay. Can you double-check that `config.stripe.webhookSignSecret` contains your webhook signing secret? "whsec_..."
      • codefresh
        yes. it is
      • i can even give you all the data i have just before computing the hmac it self
      • will that help?
      • inside the npm module, there is this line: var expectedSignature = this._computeSignature(details.timestamp + '.' + payload, secret);
      • i can give you all the data i have at that point
      • ywain
        codefresh: can you PM me the email address for your Stripe account? To PM me: /msg ywain your message