#vpellicano
1 messages · Page 1 of 1 (latest)
Hi, can you share the request id with me? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
That is the weird thing. No error gets logged
But I get a return of this:
struct
Charset [empty string]
Errordetail I/O Exception: peer not authenticated
Filecontent Connection Failure
Header [empty string]
Mimetype Unable to determine MIME type of file.
Responseheader
struct [empty]
Statuscode Connection Failure. Status code unavailable.
Text YES
then I refresh and it is fine
What does "reload the page" mean exactly? This call can only be made server-side in your code
Using Coldfusion, when the page loads it checks to see if the user has a customer created.
<cfhttp method="GET"
result="httpResp"
url='https://api.stripe.com/v1/customers/search'>
<cfhttpparam type="HEADER" name="Accept" value="*/*">
<cfhttpparam type="HEADER" name="Content-Type" value="application/json; charset=utf-8">
<cfhttpparam type="HEADER" name="Authorization" value="Bearer #stripe_apiSecret#" />
<cfhttpparam type="FORMFIELD" name="query" value="email~'#lcase(getCompanyInfo.ar_email)#'"/>
</cfhttp>
if it does not return any results, I do a POST to create one.
but you really should never be making that call client-side in a browser
https://www.bennadel.com/blog/3732-fixing-connection-failure-unable-to-determine-mime-type-errors-with-sslcertificateinstall-in-lucee-cfml-5-3-3-62.htm seems to be something local with your Coldfusion config maybe?
oh, ok
Sorry I've never used Coldfusion but I assume that if you catch that error and immediately retry (no reload, just 2 sequential calls) it works and it's some weird caching?
yeah. Thank you for your help. I will read this article and try another approach at it.