Add Paypal Support
parent
a19d57f45b
commit
190b133a9c
|
|
@ -59,8 +59,8 @@ features:
|
||||||
button_class: "seattle-bg"
|
button_class: "seattle-bg"
|
||||||
class: "bg-transparent border border-orange-500 rounded-md cursor-pointer hover:bg-orange-500 hover:border-orange-500 hover:text-white focus-within:bg-orange-500 focus-within:border-orange-500 focus-within:text-white"
|
class: "bg-transparent border border-orange-500 rounded-md cursor-pointer hover:bg-orange-500 hover:border-orange-500 hover:text-white focus-within:bg-orange-500 focus-within:border-orange-500 focus-within:text-white"
|
||||||
url: "https://buy.stripe.com/9AQ8wG0P9a5fg0wfZr"
|
url: "https://buy.stripe.com/9AQ8wG0P9a5fg0wfZr"
|
||||||
alt_url: "https://google.com/"
|
|
||||||
alt_title: "PayPal"
|
alt_title: "PayPal"
|
||||||
|
alt_paypal_id: "paypal-physical-ticket"
|
||||||
alt_class: "text-sm hover:underline mt-4"
|
alt_class: "text-sm hover:underline mt-4"
|
||||||
features_class: "text-white text-center"
|
features_class: "text-white text-center"
|
||||||
features:
|
features:
|
||||||
|
|
@ -78,15 +78,15 @@ features:
|
||||||
title_class: "text-white text-center"
|
title_class: "text-white text-center"
|
||||||
name_class: "seattle-color"
|
name_class: "seattle-color"
|
||||||
price_class: "text-green-500"
|
price_class: "text-green-500"
|
||||||
price: "399"
|
price: "349"
|
||||||
original_price: ""
|
original_price: "399"
|
||||||
features_class: "text-white"
|
features_class: "text-white"
|
||||||
button:
|
button:
|
||||||
title: "Register"
|
title: "Register"
|
||||||
class: "bg-transparent border border-orange-500 rounded-md cursor-pointer hover:bg-green-500 hover:border-green-500 hover:text-white focus-within:bg-green-500 focus-within:border-green-500 focus-within:text-white"
|
class: "bg-transparent border border-orange-500 rounded-md cursor-pointer hover:bg-green-500 hover:border-green-500 hover:text-white focus-within:bg-green-500 focus-within:border-green-500 focus-within:text-white"
|
||||||
url: "https://buy.stripe.com/aEU3cmgO7dhr6pWeVp"
|
url: "https://buy.stripe.com/aEU3cmgO7dhr6pWeVp"
|
||||||
alt_url: "https://google.com/"
|
|
||||||
alt_title: "PayPal"
|
alt_title: "PayPal"
|
||||||
|
alt_paypal_id: "paypal-physical-ticket-premium"
|
||||||
alt_class: "text-sm hover:underline mt-4"
|
alt_class: "text-sm hover:underline mt-4"
|
||||||
features:
|
features:
|
||||||
- text: "If you want to support the conference"
|
- text: "If you want to support the conference"
|
||||||
|
|
@ -132,8 +132,8 @@ features:
|
||||||
title: "Register"
|
title: "Register"
|
||||||
class: "bg-transparent border border-orange-500 rounded-md cursor-pointer hover:bg-orange-500 hover:border-orange-500 hover:text-white focus-within:bg-orange-500 focus-within:border-orange-500 focus-within:text-white"
|
class: "bg-transparent border border-orange-500 rounded-md cursor-pointer hover:bg-orange-500 hover:border-orange-500 hover:text-white focus-within:bg-orange-500 focus-within:border-orange-500 focus-within:text-white"
|
||||||
url: "https://buy.stripe.com/6oE4gq69t7X75lSeVo"
|
url: "https://buy.stripe.com/6oE4gq69t7X75lSeVo"
|
||||||
alt_url: "https://google.com/"
|
|
||||||
alt_title: "PayPal"
|
alt_title: "PayPal"
|
||||||
|
alt_paypal_id: "paypal-online-ticket"
|
||||||
alt_class: "text-sm hover:underline mt-4"
|
alt_class: "text-sm hover:underline mt-4"
|
||||||
features_class: "text-black dark:text-white"
|
features_class: "text-black dark:text-white"
|
||||||
features:
|
features:
|
||||||
|
|
@ -156,8 +156,8 @@ features:
|
||||||
title: "Register"
|
title: "Register"
|
||||||
class: "bg-transparent border border-orange-500 rounded-md cursor-pointer hover:bg-green-500 hover:border-green-500 hover:text-white focus-within:bg-green-500 focus-within:border-green-500 focus-within:text-white"
|
class: "bg-transparent border border-orange-500 rounded-md cursor-pointer hover:bg-green-500 hover:border-green-500 hover:text-white focus-within:bg-green-500 focus-within:border-green-500 focus-within:text-white"
|
||||||
url: "https://buy.stripe.com/9AQ8wG0P9a5fg0wfZr"
|
url: "https://buy.stripe.com/9AQ8wG0P9a5fg0wfZr"
|
||||||
alt_url: "https://google.com/"
|
|
||||||
alt_title: "PayPal"
|
alt_title: "PayPal"
|
||||||
|
alt_paypal_id: "paypal-online-ticket-premium"
|
||||||
alt_class: "text-sm hover:underline mt-4"
|
alt_class: "text-sm hover:underline mt-4"
|
||||||
features_class: "text-black dark:text-white"
|
features_class: "text-black dark:text-white"
|
||||||
features:
|
features:
|
||||||
|
|
@ -248,4 +248,4 @@ features:
|
||||||
avatar: "/images/people/alasdair.jpg"
|
avatar: "/images/people/alasdair.jpg"
|
||||||
content: |
|
content: |
|
||||||
Abner Coimbre is a fantastic host & organiser with an important vision for building better software that benefits all of us, in his words: "reclaiming user value"
|
Abner Coimbre is a fantastic host & organiser with an important vision for building better software that benefits all of us, in his words: "reclaiming user value"
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -79,10 +79,16 @@
|
||||||
class="inline-flex justify-center w-full px-4 py-3 mt-8 font-sans text-sm leading-none text-center no-underline sm:text-base md:text-lg {{ $option.button.class }}">
|
class="inline-flex justify-center w-full px-4 py-3 mt-8 font-sans text-sm leading-none text-center no-underline sm:text-base md:text-lg {{ $option.button.class }}">
|
||||||
{{ $option.button.title }}
|
{{ $option.button.title }}
|
||||||
</a>
|
</a>
|
||||||
{{ if $option.button.alt_url }}
|
{{ if $option.button.alt_paypal_id }}
|
||||||
<a href="{{ $option.button.alt_url }}" class="{{ $option.button.alt_class }}">
|
<!-- PayPal integration -->
|
||||||
{{ $option.button.alt_title }}
|
<div style="width:60%;margin:auto;">
|
||||||
</a>
|
<br>
|
||||||
|
<div id="smart-button-container">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<div id="{{ $option.button.alt_paypal_id }}"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -126,4 +132,144 @@
|
||||||
{{ end }} */}}
|
{{ end }} */}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
|
||||||
|
<!-- PayPal JS - Live ID (?) -->
|
||||||
|
<script src="https://www.paypal.com/sdk/js?client-id=AZc6g3jzPRR4Ahf6ZeFKzBUw-TWzSIPev386n8eRe4XBTJSqnL7OtXx4YbcTN5mcI_MtvT30Bo9dxXOb&disable-funding=credit,card¤cy=USD" data-sdk-integration-source="button-factory">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function physicalTicket() {
|
||||||
|
paypal.Buttons({
|
||||||
|
style: {
|
||||||
|
shape: 'pill',
|
||||||
|
color: 'gold',
|
||||||
|
layout: 'vertical',
|
||||||
|
label: 'pay',
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
createOrder: function(data, actions) {
|
||||||
|
return actions.order.create({
|
||||||
|
purchase_units: [{"description":"Physical Track (2024)","amount":{"currency_code":"USD","value":249}}],
|
||||||
|
application_context: { shipping_preference: 'NO_SHIPPING'}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onApprove: function(data, actions) {
|
||||||
|
return actions.order.capture().then(function(orderData) {
|
||||||
|
// Full available details
|
||||||
|
console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
|
||||||
|
// Redirect
|
||||||
|
actions.redirect('https://handmadecities.com/registered');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onError: function(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}).render('#paypal-physical-ticket');
|
||||||
|
}
|
||||||
|
|
||||||
|
function physicalTicketPremium() {
|
||||||
|
paypal.Buttons({
|
||||||
|
style: {
|
||||||
|
shape: 'pill',
|
||||||
|
color: 'gold',
|
||||||
|
layout: 'vertical',
|
||||||
|
label: 'pay',
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
createOrder: function(data, actions) {
|
||||||
|
return actions.order.create({
|
||||||
|
purchase_units: [{"description":"Physical Track Premium (2024)","amount":{"currency_code":"USD","value":349}}],
|
||||||
|
application_context: { shipping_preference: 'NO_SHIPPING'}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onApprove: function(data, actions) {
|
||||||
|
return actions.order.capture().then(function(orderData) {
|
||||||
|
// Full available details
|
||||||
|
console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
|
||||||
|
// Redirect
|
||||||
|
actions.redirect('https://handmadecities.com/registered');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onError: function(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}).render('#paypal-physical-ticket-premium');
|
||||||
|
}
|
||||||
|
|
||||||
|
function onlineTicket() {
|
||||||
|
paypal.Buttons({
|
||||||
|
style: {
|
||||||
|
shape: 'pill',
|
||||||
|
color: 'gold',
|
||||||
|
layout: 'vertical',
|
||||||
|
label: 'pay',
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
createOrder: function(data, actions) {
|
||||||
|
return actions.order.create({
|
||||||
|
purchase_units: [{"description":"Online Track (2024)","amount":{"currency_code":"USD","value":74}}],
|
||||||
|
application_context: { shipping_preference: 'NO_SHIPPING'}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onApprove: function(data, actions) {
|
||||||
|
return actions.order.capture().then(function(orderData) {
|
||||||
|
// Full available details
|
||||||
|
console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
|
||||||
|
// Redirect
|
||||||
|
actions.redirect('https://www.handmade-seattle.com/registered');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onError: function(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}).render('#paypal-online-ticket');
|
||||||
|
}
|
||||||
|
|
||||||
|
function onlineTicketPremium() {
|
||||||
|
paypal.Buttons({
|
||||||
|
style: {
|
||||||
|
shape: 'pill',
|
||||||
|
color: 'gold',
|
||||||
|
layout: 'vertical',
|
||||||
|
label: 'pay',
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
createOrder: function(data, actions) {
|
||||||
|
return actions.order.create({
|
||||||
|
purchase_units: [{"description":"Online Track Premium (2024)","amount":{"currency_code":"USD","value":99}}],
|
||||||
|
application_context: { shipping_preference: 'NO_SHIPPING'}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onApprove: function(data, actions) {
|
||||||
|
return actions.order.capture().then(function(orderData) {
|
||||||
|
// Full available details
|
||||||
|
console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
|
||||||
|
// Redirect
|
||||||
|
actions.redirect('https://www.handmade-seattle.com/registered');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onError: function(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}).render('#paypal-online-ticket-premium');
|
||||||
|
}
|
||||||
|
|
||||||
|
physicalTicket();
|
||||||
|
physicalTicketPremium();
|
||||||
|
|
||||||
|
onlineTicket();
|
||||||
|
onlineTicketPremium();
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue