<% if(order_status === "pending") { %>
<% } else if(order_status === "success") { %>

Order Successful

You will receive a confirmation
via email momentarily.
<% if(finalizedPayment && finalizedPayment.email && downloadable_items && downloadable_items.length > 0){ %> <% _.each(downloadable_items, function(item){ %>
<% }) %>

Download File(s)

<% } %>
<% } else if(order_status === "payment") { %>
Enter Payment Details
Pay <%= formatPriceForCurrency(order.amount, order.currency) %>
Back
<% } else if(order_status === "fail") { %>
Unable to complete the transaction.

Your card has not been charged. Please refresh the page and try again.
<% } else { %>
Order Summary
<% _.each(skuItems, function(item){ %>
<%= (item.quantity > 1) ? item.quantity + ' × ' : '' %><%= item.description %>
<%= formatPriceForCurrency(item.amount, item.currency) %>
<% }); %> <% if(totalTax > 0) { %>
Tax: <%= formatPriceForCurrency(totalTax, order.currency) %>
<% } %> <% if(order.shipping !== null) { %>
<% if(totalShipping > 0) { %>
Shipping: <%= formatPriceForCurrency(totalShipping, order.currency) %>
<% } else { %>
Shipping: Free
<% } %>
<% } %>
Grand Total: <%= formatPriceForCurrency(order.amount, order.currency) %>
<% if(order.shipping !== null) { %>
Shipping Address:
<%= order.shipping.name %>
<%= order.shipping.address.line1 %>
<% if(order.shipping.address.line2) { %> <%= order.shipping.address.line2 %>
<% } %> <%= order.shipping.address.city %>, <%= order.shipping.address.state %>, <%= order.shipping.address.postal_code %>
<%= order.shipping.address.country %>
Edit
<% if(order.shipping_methods.length > 1) { %>
Shipping Methods
<% _.each(order.shipping_methods, function(item){ var checked = item.id == order.selected_shipping_method; %>
style="visibility: hidden; display: none;">
<% }); %>
<% } %>
<% } %>
Order ID: <%= order.id %>
Payment
Back
<% } %>