Jump to content
Sign in to follow this  
benbyf

does wireHttp implement CURLOPT_USERPWD

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.

Share this post


Link to post
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.

Share this post


Link to post
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}}"

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...