-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsubscription.html
54 lines (49 loc) · 2.07 KB
/
subscription.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
layout: single
title: Pour soutenir ADD
image: /assets/img/handshake.jpg
description: Soutenez ADD en adhérant si vous êtes un particulier ou en devenant sponsors si vous êtes une entreprise.
---
<h2>
Vous êtes un particulier
</h2>
<p>
Pour aider l'association Ardèch'Drôm Dev à organiser des événements, vous pouvez prendre votre adhésion en ligne directement.
</p>
<p>
Un petit clic ci-dessous vous offrira 1 an de plaisir et vous serez également informés par e-mail de tous nos événements (newsletter) !
</p>
<!-- Load Stripe.js on your website. -->
<script src="https://js.stripe.com/v3"></script>
<!-- Create a button that your customers click to complete their purchase. -->
<button id="checkout-button" class="btn btn-primary" role="link">Adhérer 1 an pour 10 €</button>
<div id="error-message"></div>
<h2 class="mt-4">
Vous êtes une entreprise ? Pourquoi ne pas devenir sponsor ?
</h2>
<p>
Vous avez envie de soutenir l'association en devenant sponsor ? Contactez nous en cliquant sur le bouton ci-dessous afin
que nous puissions trouver ensemble, autour d'un café, une solution adaptée à vos besoins.
</p>
<a class="btn btn-primary" href="contact.html">Contactez-nous</a>
<script>
var stripe = Stripe('pk_live_K4eY1FxdwufKtlKQLChTTLtA00F8Ej6MSl');
var checkoutButton = document.getElementById('checkout-button');
checkoutButton.addEventListener('click', function () {
// When the customer clicks on the button, redirect
// them to Checkout.
stripe.redirectToCheckout({
items: [{sku: 'sku_EpteK6YAb7jdOH', quantity: 1}],
successUrl: 'https://www.ardechdromdev.org/subscription-success.html',
cancelUrl: 'https://www.ardechdromdev.org/subscription-canceled.html',
})
.then(function (result) {
if (result.error) {
// If `redirectToCheckout` fails due to a browser or network
// error, display the localized error message to your customer.
var displayError = document.getElementById('error-message');
displayError.textContent = result.error.message;
}
});
});
</script>