Jump to content

does wireHttp implement CURLOPT_USERPWD


benbyf
 Share

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...