I am using the code from the example templates to integrate a simple stripe pay button on a commerce site:
<form method="POST">
<input type="hidden" name="action" value="commerce/payments/pay"/>
<input type="hidden" name="redirect" value="/orders/order?number={number}"/>
<input type="hidden" name="cancelUrl" value="/checkout/payment"/>
{{ getCsrfInput() }}
{% if cart.paymentMethod.class == 'Stripe' %}
<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">
</script>
{% endif %}
</form>
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).