Style Stripe payment page

For Firmhouse projects that use Stripe as a Payment Provider it’s possible to update the styling a little bit.

For instance in the below example, the text in the button needs to be updated to say “Zahlungspfligtig bestellen”, instead of just “Zahlen Sie” :

  window.addEventListener("turbo:load", function() {
    const payButton = document.querySelector('[data-stripe-target="submitButton"]');

    switch (document.documentElement.lang) {
      case "en":
        payButton.value = payButton.value.replace("Pay", "Order now");
      case "de":
        payButton.value = payButton.value.replace("Zahlen Sie", "Zahlungspflichtig bestellen");