Sha256: 0d5fa1341cc57596d89ac835f1d6315124ec4d2cb6510c8752bf143e04fb8fa2
Contents?: true
Size: 778 Bytes
Versions: 8
Compression:
Stored size: 778 Bytes
Contents
<%= button_tag title, id: "checkout-#{session.id}", class: local_assigns[:class], style: (local_assigns[:class] || local_assigns[:style]) ? local_assigns[:style] : 'background-color:#6772E5;color:#FFF;padding:8px 12px;border:0;border-radius:4px;font-size:1em' %> <%= tag.div id: "error-for-#{session.id}" %> <script> (() => { const checkoutButton = document.getElementById("checkout-<%= session.id %>"); checkoutButton.addEventListener('click', function () { Stripe("<%= Pay::Stripe.public_key %>").redirectToCheckout({ sessionId: '<%= session.id %>' }).then(function (result) { if (result.error) { document.getElementById('error-message').innerText = result.error.message; } }); }); })() </script>
Version data entries
8 entries across 8 versions & 1 rubygems