so, I have my client app, that integrate with connect, use platform keys
nemothekid joined the channel
when user buy a product, the payment process will generate a token
for charge
markin
you'd generate a token using their publishable key and then you'd pass the stripe-account header when you create a charge
nerdfiles has quit
shinichi
mmm, so, if charge through platform, is fund will goto platform bank account
and platform need do manual transfer to connecter account?
markin
if you set the destination on the charge, Stripe will automatically make a transfer from your account to the connected account
shinichi
yes, seem more clear
thanks you so much
markin
you're welcome
shinichi has quit
bkrausz joined the channel
nerdfiles joined the channel
pl3bs has quit
stripe joined the channel
stripe
Hello
I've asked this question multiple times before, both on here and SO but I still don't have an answer
markin
stripe: whats the question?
stripe
If you refresh the page after you're charged you get this error '\Stripe\Error\InvalidRequest' however you cannot catch it
markin
stripe: what does your php code for that page look like?
stripe
So if a user refreshes the page once they purchase a product, how am I supposed to give them a user-friendly error
markin
it should be catchable, my guess is you're just not catching the right stripe call
stripe
It's a try/catch charge
markin
do you also create a customer?
stripe
Yeah, I've tried heaps of different phrases such as removing the \ at the start, and it still doesn't work
Yeah I've made a customer, everything works fine except for this
markin
so you should have a try/catch around the customer creation
stripe
I will see if that works
Are the catch errors the same for the customer?
markin
yeah
stripe
okay thanks
Are all of them necessary though?
markin
it depends, you could just catch the base Stripe error or if you want more specific handling you could handle them individually
stripe
That fixed the problem, awesome
thanks for the help
kies joined the channel
markin
you're welcome
stripe
If you're not saving the customer's details, what's the point of creating one?
markin
stripe: there wouldn't really be one, you could create charges against their card in the future, but if you're only doing one time charges and making the customer enter card details each time, no real purpose