<commit_before><% if mixpanel? %>
  <script type="text/javascript">
    mixpanel.track_forms("form", "Paypal Payment Started")
  </script>
<% end %>

<h1>Payment Summary</h1>
<%= render :partial => "summary", :locals => {:payment => @payment } %>


<% unless @payment.completed %>
  Please proceed with your payment:
  <div>
    <%= form_tag @payment.paypal_post_url do %>
      <%= hidden_field_tag :business, ENV["PAYPAL_ACCOUNT"] %>
      <%= hidden_field_tag :cancel_return, payments_url %>
      <%= hidden_field_tag :cmd, "_cart" %>
      <%= hidden_field_tag :currency_code, "USD" %>
      <%= hidden_field_tag :invoice, @payment.id.to_s %>
      <%= hidden_field_tag :no_shipping, "1" %>
      <%= hidden_field_tag :notify_url, notification_payments_url %>
      <%= hidden_field_tag :return, success_payments_url %>
      <%= hidden_field_tag :upload, "1" %>
      <% @payment.payment_details.each_with_index do |pd, index| %>
        <%= hidden_field_tag "amount_#{index + 1}", pd.amount.to_s %>
        <%= hidden_field_tag "item_name_#{index + 1}", pd.expense_item.to_s %>
        <%= hidden_field_tag "quantity_#{index + 1}", "1" %>
      <% end %>
      <%= submit_tag "Pay with Paypal", :class => "registration_button" %>
    <% end %>
  </div>

  <% if @config.test_mode %>
    <div class="test_mode">
      <%= link_to 'Pretend to pay by credit card', fake_complete_payment_path(@payment), :method => :post %>
    </div>
  <% end %>
<% end %>


<%= link_to 'Back', payments_path %><commit_msg>Pretty Paypal button<commit_after><% if mixpanel? %>
  <script type="text/javascript">
    mixpanel.track_forms("form", "Paypal Payment Started")
  </script>
<% end %>

<h1>Payment Summary</h1>
<%= render :partial => "summary", :locals => {:payment => @payment } %>


<% unless @payment.completed %>
  Please proceed with your payment:
  <div>
    <%= form_tag @payment.paypal_post_url do %>
      <%= hidden_field_tag :business, ENV["PAYPAL_ACCOUNT"] %>
      <%= hidden_field_tag :cancel_return, payments_url %>
      <%= hidden_field_tag :cmd, "_cart" %>
      <%= hidden_field_tag :currency_code, "USD" %>
      <%= hidden_field_tag :invoice, @payment.id.to_s %>
      <%= hidden_field_tag :no_shipping, "1" %>
      <%= hidden_field_tag :notify_url, notification_payments_url %>
      <%= hidden_field_tag :return, success_payments_url %>
      <%= hidden_field_tag :upload, "1" %>
      <% @payment.payment_details.each_with_index do |pd, index| %>
        <%= hidden_field_tag "amount_#{index + 1}", pd.amount.to_s %>
        <%= hidden_field_tag "item_name_#{index + 1}", pd.expense_item.to_s %>
        <%= hidden_field_tag "quantity_#{index + 1}", "1" %>
      <% end %>
      <%= submit_tag "Pay with Paypal", :class => "payment_link registration_button" %>
    <% end %>
  </div>

  <% if @config.test_mode %>
    <div class="test_mode">
      <%= link_to 'Pretend to pay by credit card', fake_complete_payment_path(@payment), :method => :post %>
    </div>
  <% end %>
<% end %>


<%= link_to 'Back', payments_path %>
{'fraction_non_alphanumeric': 0.17763157894736842, 'fraction_numerical': 0.005263157894736842, 'mean_word_length': 3.722049689440994, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4018023', 'n_tokens_mistral': 1158, 'n_tokens_neox': 1036, 'n_words': 207}