#stripe

/

      • kies has quit
      • kevinkolz
        yea I wanna nuke all test data
      • tr12
      • ganesh_
        Hi tr12
      • curl -v -H "Content-Type: application/json" -X POST -d '{"username":"xyz","password":"xyz"}' url
      • I tried this and I am getting json data in my log
      • flippyhead joined the channel
      • tr12
        ganesh_: hmm - that's weird, since stripe also sends the right content type
      • ganesh_
        Sending json file in curl request also working and i am getting json data in my log
      • tr12
        actually, can you try with "Content-Type: application/json; charset=utf-8"
      • sh__
        I've downloaded the stripe library from GipHub. Which file should I require in my php file to make charges?
      • tr12
        sh__: require_once('/path/to/stripe-php/init.php'); https://github.com/stripe/stripe-php#manual-ins...
      • ganesh_
        yes I did that..I copied the request from stripe in a file and I passed that file in curl request. I got the json in my log
      • curl -v -H 'Accept: application/json' -H "Content-Type: application/json; charset=utf-8" -X POST --data-binary @/json file url
      • This is working
      • tr12
        ganesh_: are you using https or http?
      • flippyhead has quit
      • (for the url you give to stripe, I mean)
      • ganesh_
        Yes
      • Dorf has quit
      • I am using http
      • Jerry_
        Hello. I have tried deleting a subscription manually through the Stripe dashboard (and set the end to immediately). I see the customer.subscription.deleted webhook being sent, however, I don't see where the webhook specifies whether or not the subscription was ended immediately or at the period end?
      • ymmor joined the channel
      • Dorf joined the channel
      • ymmor
        How can I change the status of a rejected account ?
      • tr12
        ganesh_: can you try setting up an ngrok tunnel, and giving stripe the url from that? https://ngrok.com
      • ymmor: you can't, pretty much. you'd need to talk to support about that
      • flippyhead joined the channel
      • ganesh_
        tr12: I am using ngrok tunnel only.
      • tr12
        Jerry_: the customer.subscription.deleted event describes a customer, so the subscription.cancel_at_period_end would be the correct property here
      • poacher2k joined the channel
      • ganesh_: hmm, that's really weird
      • ganesh_: do you have wireshark or tcpdump on that machine?
      • Jerry_
        tr12: So if the cancel_at_period_end is true, then the subscription is still valid till the period end (in which case I will receive a subscription updated event) and if false, the subscription is no longer working as of this moment?
      • Dorf has quit
      • tr12
        Jerry_: err, sorry, I'm being stupid
      • Jerry_
        tr12: huh?
      • tr12
        if you cancel a subscription with cancel_at_period_end, you won't get a deleted event until the subscription is actually deleted
      • ie: at period end
      • ganesh_
        You mean the machine which i am working now?
      • tr12
        Jerry_: so the value of subscription.cancel_at_period_end is kind of academic
      • ganesh_: the one you're running ngrok on
      • koopajah
        ganesh_ : sorry I'm following from afar, can you give me an example event id (evt_XXX) that we sent you where you didn't get any data? That would help track things down
      • tr12
        koopajah: they're using the "send test webhook" thing
      • Jerry_
        ahh, so I will only receive the customer.subscription.deleted event when the subscription is effectively deleted (eg. it's no longer a subscription the moment I receive the event) ?
      • tr12
        Jerry_: essentially
      • Jerry_
        Alrighty I see, thank you
      • tr12
        Jerry_: you'll still be able to retrieve the subscription, but it'll just be a stub object with deleted=true at that point
      • T1m0thy joined the channel
      • Jerry_
        alright
      • ganesh_
        evt_18HYpRCBqo5km0LpaVX5YnJQ
      • tr12
        ganesh_: it may be useful to look at the actual traffic being sent by ngrok to your local server, and see if that contains a body, or if it's just blank
      • wireshark is probably the more user-friendly option (though you do have to say user-friendly fast)
      • ta_ has quit
      • ganesh_
        ngrok traffic - 227.
      • In Http requests it shows 200 OK status for the api call
      • log comes blank only
      • koopajah
        ganesh_ : I don't see anything specific in our logs here beyond the fact that it was delivered successfully to your endpoint
      • I'm going to try and send some data manually, let me know if you get it in the next few minutes
      • ganesh_
        ok
      • sh__
        In the charging tutorial what is $_POST['stripeToken'] ? and I've checked my post parameters and I don't have something like this.
      • koopajah
        sh__ : that comes from Stripe Checkout posting to your server. If you don't have it it means something is wrong with your code (or you're not using Stripe Checkout)
      • ganesh_
        @Koopajah - Actually send test webhook from stripe is working fine..In my api only i am not getting the request. file_get_contents("php://input"); it returns blank.
      • Just want to explain issue to you clearly again
      • koopajah
        ganesh_ : well that's what we're trying to debug right? I just sent an event mentioning my name, do you see it?
      • sure, but my understanding is that it works if you send the curl yourself and not from Stripe, no?
      • ganesh_
        yes. if I sent from curl it works fine..
      • koopajah
        so again, I just sent you data directly through our systems, manually. Can you confirm you got this message please?
      • bmarty joined the channel
      • ganesh_
        Yes I got the message
      • koopajah
        okay, and do you see it in your *php code* ?
      • ganesh_
        You mean the message. I saw the message in log
      • koopajah
        hum
      • bmarty has left the channel
      • You said "If I send data via curl, I see it and the PHP script is able to retrieve it and log it. Separately, events from Stripe, I see them in ngrok but in PHP I get an empty message". Is that correct? If so, what I just did, did it work in the PHP code itself?
      • jon_x joined the channel
      • ganesh_
        Yes..It is correct
      • And your message is working in PHP code itself
      • edrocks has quit
      • koopajah
        okay, now let me try a new message
      • ganesh_
        ok
      • koopajah
        done, did this work?
      • ganesh_
        Got the message
      • koopajah
        well, then I don't understand because what I did is exactly what the code does here really
      • let me try one last thing
      • T1m0thy has quit
      • ganesh_
        ok
      • koopajah
        okay did you see that real event this time?
      • ganesh_
        Yes
      • koopajah
        well then it works as expected? I just created a normal customer in your dashboard, you got the event, so it's all working no?
      • sh__
        could be my problem because of my location? I'm in Albania
      • koopajah
        sh__ : no, it's a bug in your *code*
      • sh__
        I did exactly what was in the descriptions and tutorials
      • koopajah
        sh__ : Okay, so there's a bug, this happens, we can fix it, but I need a lot more details from your first if you want me to help. First off, did you integrate with Stripe Checkout or Stripe.js?
      • sh__
        Checkout
      • koopajah
        Okay, can you share your code on gist https://gist.github.com/ for me to have a look?
      • sh__
        Yes of course
      • mcwendy joined the channel
      • ganesh_
        Thanks Koopajah and tr12. It is working fine
      • ftj joined the channel
      • koopajah
        woot!
      • sh__
        did you see it?
      • poacher2k has quit
      • andy____
        tr12: I am now able to create new orders with charges that contain the right description in test. I guess the question will be whether the email gets sent before or after the charge.success event :) If it's before I am already sending other emails I could hook invoices up to, but it's a bunch more work :-(
      • tr12: Thanks for the help.
      • koopajah
        sh__ : yes! So the issue here is that you use Custom Checkout. Your code is not submitting *anything*. https://gist.github.com/anonymous/c097b325bae93... you just alert the token and do nothing with it. What you want is something like this: https://gist.github.com/anonymous/78626a38c4b4c...
      • andy____
        tr12: BTW there was a timing problem with my initial attempt to save the charge description.
      • bmarty1 joined the channel
      • edrocks joined the channel
      • ymmor has quit
      • dangwal joined the channel
      • kevinkolz has quit
      • ganesh_ has quit
      • dangwal
        hello
      • anyone there?
      • hpar
        hey dangwal
      • dangwal
        need help regarding stripe managed account
      • suppose connected user has pending balance $100 and manual transfer is active,
      • and after 10 days I have transferred money to user's bank account
      • now on 11th day there was dispute for $100
      • now how will we handle thi situation
      • nilsmunch has quit
      • ???
      • ashd has quit
      • bmarty1 has quit
      • kevinkolz joined the channel
      • hpar
        dangwal: in that case, depending on the result of the dispute, the user could end up with a negative balance
      • irctc077 joined the channel
      • which would either be taken out of their next transfer(s), or "pulled back" from their bank account
      • atombler joined the channel
      • irctc077
        Hi! i sent an email yesterday, and a few days later. i stil hasnt got an answer?
      • bostonmacosx joined the channel
      • dangwal
        how can we pull back money from the account?
      • kevinkolz has quit
      • and what special conditions do we have to implement in next transfer so that this could be handled
      • atombler_ has quit
      • Dorf joined the channel
      • koopajah
        dangwal : https://stripe.com/docs/api#update_account-debi... that's what you need. The rest is handled automatically
      • kevinkolz joined the channel
      • zrail
        koopajah: how does 'Coupon#duration_in_months' interact with 'Subscription#interval_count'? does a 3 calendar month coupon apply correctly to a quarterly billing plan?
      • i.e. duration = 3, interval = month, interval_count = 3
      • koopajah
        zrail : it's unrelated. The coupon apply for its duration, independently of the subscription itself. If you have a coupon with duration_in_months set to 3 it applies to any invoice on that subscription for the next 3 months (up to the second)
      • qar has quit
      • kevinkolz has quit
      • zrail
        wonderful, that's exactly what i want
      • rjgrazioli joined the channel
      • ta_ joined the channel
      • yoyoyo joined the channel
      • koopajah: thank you!