timebox: (my sh*tty macbook just died) Nope, I'll take a look at it, thanks again! :)
Clueless has quit
kaylined
wait - is this an ionic app lupos?
you need this on cordova/ionic -> <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
@kaylined just a heads up - ading contentType: false to the ajax request results in this server error: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
timebox
hugo_: That looks like it's just stubbing out your stripePayment method, rather than stubbing out Stripe though, right?
hugo_: But cool nonetheless - thanks! :)
kaylined
brian___, interesting.
brian___, I'd have thought it the other way around - I don't really use jQuery/AJAX
brian___
yeah me neither, thanks again ^.^
kaylined
luposlip_, hmm well open it all up and then restrict it piece by piece and see where the breaking occurs!
hugo_
@timebox if you are able to mock stripe.charges.create then you can do almost everything else like customers blabla, as long as the behaviour is known you can simulate many cases
bwn has quit
timebox
hugo_: Right, but you're doing it by wrapping the Stripe API call in another function - so you're really just mocking the wrapping function. That's all I meant. But if it works, it works. :)
luposlip_
kaylined: opened it all up with this: <meta http-equiv="Content-Security-Policy" content="default-src * data: gap: * 'unsafe-eval' 'unsafe-inline';">
Still doesn't work. Same error. It must be on Stripe's side.
aphelion_: That's pulling something from your account as an example that happens to be negative, I think.
(From your test account, I mean)
aphelion_
ah, yeah, i see i was logged in
that's weird it's a negative lol
timebox
¯\_(ツ)_/¯
aphelion_
my test account is mostly just a spam of a bunch of stripe test payments to get my thingy working
well now i'm curious why it's negative
oh wow, switching to my stripe test account almost made me forget it's a test account
looking at the balance... i almost bought a one way ticket to hawaii or something
timebox
:)
aphelion_
net_income works like a charm, thanks timebox :)
i say net_income, i mean net, net_income is what i save it as in my db
luposlip_ has quit
brian___ has quit
spacecadetbrown joined the channel
timebox
aphelion_: Awesome! You're welcome! :)
spacecadetbrown has quit
leo-unglaub joined the channel
leo-unglaub
good evening, are some people of the support stuff around?
timebox
leo-unglaub: Hi! Do you have a question?
leo-unglaub
timebox: yes, i have a problem. i integrated stripe into one online shop for one of our customers and for me it works great
nickers
Would it be fine to store the pk_ key in an ap
android app
leo-unglaub
but the customers complains that he gets a lot of calls from customers unable to pay
timebox
nickers: Absolutely - that's what the `pk_*` keys are for.
leo-unglaub
every time i test stuff it works fine, but people keep complaining to my customer
timebox
leo-unglaub: What errors are they seeing?
leo-unglaub
timebox: i don't see errors at all, thats my problem :)
timebox: as far as i am concerned stripe works perfectly, but they really started to hate you guys and i would love to debug that because i like your service
timebox
leo-unglaub: Ok, well, you could have your customer write into Support (https://support.stripe.com/email) and have them look into it, but without error information, it's impossible for us to help diagnose unfortunately. Are you able to access their server logs to see if there are any errors there?
leo-unglaub: ...but ultimately, this sounds like something Support will have to help with, as it may require digging into details that we can't see here.
leo-unglaub
timebox: yes i see the server logs, no errors there. the only differenct i notices is that in some "parsed request post bodys" the fields guid, muid and sid are empty
in the payments that worked the log shows that they are always set
thats the only difference i could find
timebox
leo-unglaub: I think the best bet here is for your customer to write into Support and have them look into it.
koopajah has quit
leo-unglaub
okay, i will
thanks dude!
timebox
leo-unglaub: You're welcome - and sorry I couldn't be of more help here!
When I run a test transaction, customer@example.com is what shows up in the customer column on my payments dashboard. If I replace that email address with $_POST['stripeEmail'] in the PHP script and run a test transaction, I see a customer ID on the payments dashboard instead of the email address. Am I doing something wrong?
timebox
rainer_: Can you share the code you're using in a Gist or Pastebin?
rainer_: Have you tried logging the output to $_POST['stripeEmail'] to make sure it contains something? Are you using Checkout or Elements to create the Token?
anotherguy joined the channel
anotherguy
I'm using Stripe Checkout to capture charges automatically, but it's not sending receipts. I thought I followed the documentation correctly, but I still have to manually send the receipt from the dashboard. Is there a way to automate this? I read through this but didn't see anything new. https://stripe.com/docs/dashboard/receipts
rainer_
@timebox looks like $_POST['stripeEmail'] doesn't contain anything. I'm using Checkout to create the token.
timebox
anotherguy: Live or test mode? How are you creating the Charges server side?
rainer_
is there a way to grab the email address from Checkout?
timebox
rainer_: I'd try logging the whole of $_POST and see what it says. Are you using a basic or custom Checkout implementation?
anotherguy: And just to be clear, Checkout itself won't capture charges; it only converts card details into a Token, which you then use server-side with one of our libraries (https://stripe.com/docs/libraries) to create a Customer or Charge.
anotherguy: Receipts are never sent automatically in test mode; only in live mode. You can manually send the receipt from the Charge details page though.
anotherguy
Yes, I'm grabbing the email address and added it into the Charge call using ""receipt_email" => "example-email-here"
oh, ok!
So not in test mode
timebox
anotherguy: Yup - but it will work in live mode. :)
anotherguy
I'll put it into Live mode and try a real charge just to be sur
Great tip. Thank you!
timebox
anotherguy: That's generally not a good idea - you shouldn't test in live mode as the banks tend to frown upon that.
anotherguy: But I can assure you that if you put a valid email address in `receipt_email`, it will be sent. :)
anotherguy
Oh. Didn't realize that. OK. I'll just hope for the best. If it doesn't work, I can manually send the first few through and try to find a solution later.
Stripe has come through on everything else so far, so I'm not worried, just like to test everything. Thanks again!