<% provide(:title, "The credit card charge for your lesson today with #{@teacher.first_name} failed") %>
<% provide(:photo_url, @teacher.resolved_photo_url) %>

<% content_for :note do %>
  <p>
    Hello <%= @student.name %>,
  </p>

  <p>
    
    <% if @card_declined %>
      When we tried to charge your credit card for your lesson on <%= @bill_date %> with <%= @teacher.name %>, the charge was declined. Can you please call your credit card company to clear up the issue, or if you need to update some of your credit card information, please use the button below to go to a page where you can change your card info. Thank you!
      <% elsif @card_expired %>
      When we tried to charge your credit card for your lesson on <%= @bill_date %> with <%= @teacher.name %>, the charge failed because the card is expired. To update your credit card information, please use the button below to go to a page where you can change your card info. Thank you!
      <% else %>
      For some reason, when we tried to charge your credit card for your lesson on <%= @bill_date %> with <%= @teacher.name %>, the charge failed. Can you please call your credit card company to clear up the issue, or if you need to update some of your credit card information, please use the button below to go to a page where you can change your card info. Thank you!
      <% end %>
   
  </p>
  <p>
    <a href="<%= @lesson_session.update_payment_url %>" style="margin: 8px 0 0 0;background-color: #ed3618;border: solid 1px #F27861;padding: 3px 10px;font-size: 12px;font-weight: 300;cursor: pointer;color: #FC9;text-decoration: none;line-height: 12px;text-align: center;">UPDATE PAYMENT INFO</a>
  </p>
  <p>
    Best Regards,<br>Team JamKazam
  </p>
<% end %>


