<%= render partial: 'form_errors', locals: { what: @order } %>

Confirm order

After confirming you will be provided with a <%=@order.payment_method.name %> address to make payment.

Please ensure your payment is confirmed on blockchain before Order Expiry time.

<%# Put this note in otherwise it can be confusing to see prices don't add up correctly. %>

Currency values are rounded to nearest cent.

<% if @order.fe_required %>

The vendor has disabled escrow on this product. This order will automatically finalize upon vendor acceptance. Any shipping problems or disputes will have to be resolved directly with the vendor and the market cannot mediate conditions of sale.

<%end%>

Product
<%= @order.title %>

Vendor
<%= link_to @order.vendor.displayname, profile_path(@order.vendor) %>

Order expiry
<%= (@order.created_at + Rails.configuration.expire_unpaid_order_duration).in_time_zone(current_user.timezone).to_s(:FHM) %>

UnitPrice <%= current_user.currency %>
Quantity (x <%= @order.quantity %>) <%= "%g" % @order.unitprice.unit %> <%= @order.product.unitdesc %> <%= currency_format(@order.convertCurrency(@order.unitprice.currency, session_user.currency, @order.unitprice.price), precision=2) %>
Total <%= @order.quantity * @order.unitprice.unit %> <%= @order.product.unitdesc %> <%= currency_format(@order.convertCurrency(@order.unitprice.currency, session_user.currency, @order.unitprice.price * @order.quantity), precision=2) %>

Shipping option
<%= @order.shippingoption.description %>

Shipping price
<%= currency_format(@order.convertCurrency(@order.shippingoption.currency, current_user.currency, @order.shippingoption.price), precision=2) %> <%= current_user.currency %>

Total price
<%= currency_format(@order.total_price_in_currency(current_user.currency), precision=2) %> <%= current_user.currency %>

<%=@order.payment_method.name %> price
<%= @order.btc_price %> ( @<%= currency_format(@order.get_exchange_rate(current_user.currency)) %> <%= current_user.currency %>/<%=@order.payment_method.code %> )

Vendors public key: to copy, click text box and press ctrl a ctrl c

<%= form_for(@order, method: 'patch', url: { action: 'confirm' }) do |f| %>
<%= f.label :address, 'Postage details (encrypt with vendors PGP key)' %> <%= f.text_area :address, rows: 5, class: 'form-control' %>
<%= f.submit 'Confirm order', class: 'btn btn-primary' %> <%= link_to 'Back', new_order_path(product: @order.product_id), class: 'btn btn-default' %> <% end %>