Sha256: 2ebebc2cefff4efe7d4038533ba04167dfeb2dd6bb3eb50f9cd6b90a69220230

Contents?: true

Size: 1.12 KB

Versions: 9

Compression:

Stored size: 1.12 KB

Contents

<form action="<%= PagSeguro.gateway_url %>" class="pagseguro" method="post">
	<div>
		<%= hidden_field_tag "encoding", "UTF-8"  %>
		<%= hidden_field_tag "email_cobranca", options.fetch(:email, PagSeguro.config["email"])  %>
		<%= hidden_field_tag "tipo", "CP" %>
		<%= hidden_field_tag "moeda", "BRL" %>
		<%= hidden_field_tag "ref_transacao", order.id %>
		<%= hidden_field_tag "tipo_frete", order.shipping_type if order.shipping_type %>

		<% order.products.each_with_index do |product, i| %>
			<% i += 1 %>
			<%= hidden_field_tag "item_quant_#{i}", product[:quantity] %>
			<%= hidden_field_tag "item_id_#{i}", product[:id] %>
			<%= hidden_field_tag "item_descr_#{i}", product[:description] %>
			<%= hidden_field_tag "item_valor_#{i}", product[:price] %>
			<%= hidden_field_tag "item_peso_#{i}", product[:weight].to_i if product[:weight] %>
			<%= hidden_field_tag "item_frete_#{i}", product[:shipping].to_i if product[:shipping] %>
		<% end %>

		<% order.billing.each do |name, value| %>
			<%= hidden_field_tag PagSeguro::Order::BILLING_MAPPING[name.to_sym], value %>
		<% end %>

		<%= submit_tag options[:submit] %>
	</div>
</form>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pagseguro-0.1.13 app/views/pagseguro/_pagseguro_form.html.erb
pagseguro-0.1.12 lib/pagseguro/views/_pagseguro_form.html.erb
pagseguro-0.1.11 lib/pagseguro/views/_pagseguro_form.html.erb
pagseguro-0.1.11.beta2 lib/pagseguro/views/_pagseguro_form.html.erb
pagseguro-0.1.11.beta1 lib/pagseguro/views/_pagseguro_form.html.erb
pagseguro-0.1.10 lib/pagseguro/views/_pagseguro_form.html.erb
pagseguro-0.1.10.beta.0 lib/pagseguro/views/_pagseguro_form.html.erb
pagseguro-0.1.9 lib/pagseguro/views/_form.html.erb
pagseguro-0.1.9.beta.0 lib/pagseguro/views/_form.html.erb