<p>This is an issue with your local install of OpenSSL <code>curl</code>/PHP or some other system level component. </p>

CC BY-SA 3.0
2017-10-30T22:11:17.890Z
This is the answer but I have no idea how to update Valet to work using TLS 1.2 or later.
Gareth
CC BY-SA 3.0
2017-10-30T20:55:09.923Z
2017-10-30T20:55:09.923Z
andrew.welch
<p>If you are using macOS then your cURL is most likely linked against SecureTransport rather than OpenSSL.</p>

<p>To verify you can issue the following command: <code>php -i | grep "SSL Version"</code></p>

<p>If affected, it should return: <code>SSL Version =&gt; SecureTransport</code></p>

<p>To fix the issue you need to recompile cURL and PHP linked with OpenSSL.</p>

<p>For PHP 7.1 do this:</p>

<pre><code>brew uninstall php71-mcrypt
brew uninstall --ignore-dependencies --force php71
brew install --with-openssl curl
brew install --with-homebrew-curl php71
brew install php71-mcrypt
</code></pre>

<p>Replace 71 with 70 if you're using PHP 7.0</p>

CC BY-SA 3.0
2017-11-14T22:32:30.077Z
2017-11-14T22:57:06.140Z
2017-11-14T22:57:06.140Z
Erik Weber
<p>I am using the code from the example templates to integrate a simple stripe pay button on a commerce site:</p>

<pre><code>&lt;form method="POST"&gt;
  &lt;input type="hidden" name="action" value="commerce/payments/pay"/&gt;
  &lt;input type="hidden" name="redirect" value="/orders/order?number={number}"/&gt;
  &lt;input type="hidden" name="cancelUrl" value="/checkout/payment"/&gt;
  {{ getCsrfInput() }}
  {% if cart.paymentMethod.class == 'Stripe' %}
  &lt;script
    src="https://checkout.stripe.com/checkout.js"
    class="stripe-button"
    data-label="Pay Now"
    data-key="{{ cart.paymentMethod.settings.publishableKey ?? '' }}"
    data-name="{{ siteName }}"
    data-image="/assets/img/tfa-logo-128.png"
    data-description="Membership" {# This is not used for order description in stripe - see Craft Commerce general settings #}
    data-email="{{ cart.email }}"
    data-currency="{{ cart.paymentCurrency }}"
    data-amount="{{ cart.totalPrice|commerceCurrency(cart.paymentCurrency,convert=true,format=false) * 100 }}"
    data-locale="auto"&gt;
  &lt;/script&gt;
  {% endif %}
&lt;/form&gt;
</code></pre>

<p>When the form submits I get back the following error:</p>

<blockquote>
  <p>Stripe no longer supports API requests made with TLS 1.0. Please
  initiate HTTPS connections with TLS 1.2 or later. You can learn more
  about this at <a href="https://stripe.com/blog/upgrading-tls" rel="nofollow noreferrer">https://stripe.com/blog/upgrading-tls</a>.</p>
</blockquote>

<p>Is this something that needs updating in the commerce plugin? I am running my local site using HTTPS using Valet. I found <a href="https://packagist.org/packages/stripe/stripe-php#user-content-ssl--tls-compatibility-issues" rel="nofollow noreferrer">this link</a> which suggests it might be the plugin that needs updating (I am using the latest version of craft commerce).</p>

CC BY-SA 3.0
2017-10-30T20:23:52.580Z
Which browser and browser version are you using?
Erik Weber
CC BY-SA 3.0
2017-10-30T20:27:21.507Z
I’m on the latest version of chrome. I don’t think it’s a browser issue, but I could be wrong.
Gareth
<plugin-craftcommerce>
Error with Craft Commerce & Stripe no longer supports API requests made with TLS 1.0
# Error with Craft Commerce & Stripe no longer supports API requests made with TLS 1.0

(Asked by: username_0 on 2017-10-30)

I am using the code from the example templates to integrate a simple stripe pay button on a commerce site:

  
  
  
  {{ getCsrfInput() }}
  {% if cart.paymentMethod.class == 'Stripe' %}
  
  {% endif %}


When the form submits I get back the following error:

Stripe no longer supports API requests made with TLS 1.0. Please
  initiate HTTPS connections with TLS 1.2 or later. You can learn more
  about this at https://stripe.com/blog/upgrading-tls.

Is this something that needs updating in the commerce plugin? I am running my local site using HTTPS using Valet. I found this link which suggests it might be the plugin that needs updating (I am using the latest version of craft commerce).

**Tags:** plugin-craftcommerce
> **Comments:**
> **username_1**: Which browser and browser version are you using?  
> **username_0**: I’m on the latest version of chrome. I don’t think it’s a browser issue, but I could be wrong.  

---

## 2 answers

### Answer by username_2 on 2017-10-30. Score: 2 | Accepted answer

This is an issue with your local install of OpenSSL `curl`/PHP or some other system level component.

> **Comments:**
> **username_0**: This is the answer but I have no idea how to update Valet to work using TLS 1.2 or later.  

---

### Answer by username_1 on 2017-11-14. Score: 1

If you are using macOS then your cURL is most likely linked against SecureTransport rather than OpenSSL.
To verify you can issue the following command: php -i | grep "SSL Version"
If affected, it should return: SSL Version => SecureTransport
To fix the issue you need to recompile cURL and PHP linked with OpenSSL.
For PHP 7.1 do this:
brew uninstall php71-mcrypt
brew uninstall --ignore-dependencies --force php71
brew install --with-openssl curl
brew install --with-homebrew-curl php71
brew install php71-mcrypt

Replace 71 with 70 if you're using PHP 7.0


---

