<commit_before><%- if(RAILS_ENV == 'development')
      submit_url = Spree::Paypal::Config[:sandbox_url]
    else
      submit_url = Spree::Paypal::Config[:paypal_url]
    end
%>
<%= form_tag submit_url do %> 

  <!-- display payment summary here -->
  <input id="business" name="business" type="hidden" value="<%= Spree::Paypal::Config[:account] %>" />
  <input id="invoice" name="invoice" type="hidden" value="<%= @order.number %>" />
  
  <% @order.line_items.each_with_index do |item, index| %>
    <input id="item_name_<%= index + 1 %>" name="item_name_<%= index + 1 %>" type="hidden" value="<%= item.variant.product.name %>" />
    <input id="amount_<%= index + 1 %>" name="amount_<%= index + 1 %>" type="hidden" value="<%= item.price %>" />
    <input id="quantity_<%= index + 1 %>" name="quantity_<%= index + 1 %>" type="hidden" value="<%= item.quantity %>" />
  <% end %>
  
  <!-- input id="amount" name="amount" type="hidden" value="58.97" /-->
  
  <input id="currency_code" name="currency_code" type="hidden" value="<%= Spree::Paypal::Config[:currency_code] %>" />
  <input id="handling_cart" name="handling_cart" type="hidden" value="<%= @order.shipment_cost %>" /> 
  
  <!-- <input name="no_shipping" type="hidden" value="1" /> -->
  
  
  <input id="cmd" name="cmd" type="hidden" value="_cart" />
  <input type="hidden" name="upload" value="1" />
  <input id="notify_url" name="notify_url" type="hidden" value="<%= Spree::Paypal::Config[:ipn_notify_host] + order_paypal_payments_path(@order) %>" />
  <input type="hidden" name="rm" value ="2"> <!-- tells paypal that the return should be POST instead of GET -->
  <input id="return" name="return" type="hidden" value="<%= Spree::Paypal::Config[:success_url] %>" />
  
  <!-- input id="address_override" name="address_override" type="hidden" value="0" />
  <input id="charset" name="charset" type="hidden" value="utf-8" />
  <input id="no_note" name="no_note" type="hidden" value="1" />
  <input id="no_shipping" name="no_shipping" type="hidden" value="1" />
  <input id="item_name" name="item_name" type="hidden" value="Store purchase" />
  <input id="return" name="return" type="hidden" value="http://localhost:3000/account/show" />
  <input id="currency_code" name="currency_code" type="hidden" value="USD" />
  <input id="cancel_return" name="cancel_return" type="hidden" value="http://localhost:3000/account/show" />
  <input id="custom" name="custom" type="hidden" value="11" />
  <input id="item_number" name="item_number" type="hidden" value="11" / -->
  <!-- input id="bn" name="bn" type="hidden" value="ActiveMerchant" /-->
  
  <%= image_submit_tag "pp_checkout.gif" %>

<% end -%>
<commit_msg>use proper _total methods of Order model, include tax_total as tax_cart<commit_after><%- if(RAILS_ENV == 'development')
      submit_url = Spree::Paypal::Config[:sandbox_url]
    else
      submit_url = Spree::Paypal::Config[:paypal_url]
    end
%>
<%= form_tag submit_url do %> 

  <!-- display payment summary here -->
  <input id="business" name="business" type="hidden" value="<%= Spree::Paypal::Config[:account] %>" />
  <input id="invoice" name="invoice" type="hidden" value="<%= @order.number %>" />
  
  <% @order.line_items.each_with_index do |item, index| %>
    <input id="item_name_<%= index + 1 %>" name="item_name_<%= index + 1 %>" type="hidden" value="<%= item.variant.product.name %>" />
    <input id="amount_<%= index + 1 %>" name="amount_<%= index + 1 %>" type="hidden" value="<%= item.price %>" />
    <input id="quantity_<%= index + 1 %>" name="quantity_<%= index + 1 %>" type="hidden" value="<%= item.quantity %>" />
  <% end %>
  
  <!-- input id="amount" name="amount" type="hidden" value="58.97" /-->
  
  <input id="currency_code" name="currency_code" type="hidden" value="<%= Spree::Paypal::Config[:currency_code] %>" />
  <input id="handling_cart" name="handling_cart" type="hidden" value="<%= @order.ship_total %>" /> 
  <input id="tax_cart"      name="tax_cart"      type="hidden" value="<%= @order.tax_total %>" />
  
  <!-- <input name="no_shipping" type="hidden" value="1" /> -->
  
  
  <input id="cmd" name="cmd" type="hidden" value="_cart" />
  <input type="hidden" name="upload" value="1" />
  <input id="notify_url" name="notify_url" type="hidden" value="<%= Spree::Paypal::Config[:ipn_notify_host] + order_paypal_payments_path(@order) %>" />
  <input type="hidden" name="rm" value ="2"> <!-- tells paypal that the return should be POST instead of GET -->
  <input id="return" name="return" type="hidden" value="<%= Spree::Paypal::Config[:success_url] %>" />
  
  <!-- input id="address_override" name="address_override" type="hidden" value="0" />
  <input id="charset" name="charset" type="hidden" value="utf-8" />
  <input id="no_note" name="no_note" type="hidden" value="1" />
  <input id="no_shipping" name="no_shipping" type="hidden" value="1" />
  <input id="item_name" name="item_name" type="hidden" value="Store purchase" />
  <input id="return" name="return" type="hidden" value="http://localhost:3000/account/show" />
  <input id="currency_code" name="currency_code" type="hidden" value="USD" />
  <input id="cancel_return" name="cancel_return" type="hidden" value="http://localhost:3000/account/show" />
  <input id="custom" name="custom" type="hidden" value="11" />
  <input id="item_number" name="item_number" type="hidden" value="11" / -->
  <!-- input id="bn" name="bn" type="hidden" value="ActiveMerchant" /-->
  
  <%= image_submit_tag "pp_checkout.gif" %>

<% end -%>

{'fraction_non_alphanumeric': 0.2222020018198362, 'fraction_numerical': 0.010555050045495906, 'mean_word_length': 5.113459399332592, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, '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': '6261334', 'n_tokens_mistral': 1976, 'n_tokens_neox': 1864, 'n_words': 378}