benbyf Posted June 24, 2019 Share Posted June 24, 2019 Trying to rework my Stripe implementation to get up-to-date with the latest regulation changes and wanted to use wireHttp instead of simply curl, but couldnt work out at all how to add a user password along with the request. Link to comment Share on other sites More sharing options...
elabx Posted June 24, 2019 Share Posted June 24, 2019 Hi! Doesn't seem to be ready, I see it commented here : https://github.com/processwire/processwire/blob/master/wire/core/WireHttp.php#L545 Link to comment Share on other sites More sharing options...
dragan Posted June 24, 2019 Share Posted June 24, 2019 Do you really mean user:pass, as described in the docs, or do you simply have a field named username and another named pass? If the latter, you can just do regular post fields. Or try setting an Authorization: Basic header as shown here. Link to comment Share on other sites More sharing options...
benbyf Posted June 24, 2019 Author Share Posted June 24, 2019 Think i'm miss understanding the conversion between curl in the terminal and curl in php. Looking at the below and wondered how to set the -u. Is it setting a CURLOPT_USERPWD header? Or more complex than that? https://stripe.com/docs/payments/checkout/migration#client-products-server-code curl https://api.stripe.com/v1/customers \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d email="{{STRIPE_EMAIL}}" \ -d source="{{STRIPE_TOKEN}}" Link to comment Share on other sites More sharing options...
elabx Posted June 24, 2019 Share Posted June 24, 2019 According to here: https://www.php.net/manual/en/function.curl-setopt.php It does look like it's the same, those two dots at the end seem to indicate the password is coming, though stripe doesn't seem to need it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now