<script language="JavaScript" type="text/javascript">
function fFun(vVal){
document.getElementById('bottom_payment_button').value='Processando.... Por favor, aguarde....';}
</script>
<script type="text/javascript" src="%%GLOBAL_ShopPath%%/javascript/jquery.js?%%GLOBAL_JSCacheToken%%"></script><!--esse implica nos termos-->
<form method="post" action="%%GLOBAL_ShopPath%%/checkout.php" id="OrderConfirmationForm" onsubmit="return ExpressCheckout.ConfirmPaymentProvider()">
	<div class="alert alert-danger" style="display: %%GLOBAL_HideCheckoutError%%">%%GLOBAL_CheckoutErrorMsg%%</div>
	<div class="alert alert-success" style="display: %%GLOBAL_HideCheckoutSuccess%%">%%GLOBAL_CheckoutSuccessMsg%%</div>

	<input type="hidden" name="action" value="pay_for_order" />
	<div class="alert alert-info">%%LNG_ReviewTheContentsOfYourOrder%%</div>

	<table class="table table-bordered table-striped">
		<thead>
			<tr>
				<th>Produto</th>
				<th>%%LNG_Qty%%</th>
				<th>Pre&ccedil;o</th>
				<th>Total</th>
			</tr>
		</thead>
		<tfoot>
			%%GLOBAL_totals%%
		</tfoot>
		<tbody>
			%%SNIPPET_CartItems%%
		</tbody>
	</table>
	<div  style="text-align: right;display:%%GLOBAL_HideSimulador%% ">				
		%%GLOBAL_CartBoleto%%
		%%GLOBAL_CartCartao%%
		<br>*Desconto aplicado somente sobre o valor dos produtos, não considera frete e outros serviços.
	</div>

	<div class="row">
		<div class="col-md-4">
			<div class="panel panel-default" style="border:1px solid #ddd; display: %%GLOBAL_HideUseCoupon%%">
				<div class="panel-heading" style="padding: 10px 15px;">%%GLOBAL_RedeemTitle%%</div>
				<div class="panel-body form-inline">
					<div class="input-group">
						<input type="text" class="form-control" placeholder="%%LNG_CouponCode1%%" value="" name="couponcode" id="couponcode">
						<span class="input-group-btn">
							<input type="button" class="btn btn-primary" name="apply_code" id="apply_code" value="%%LNG_Apply%%" onclick="return ExpressCheckout.ApplyCouponCode();">
						</span>
					</div>
				</div>
			</div>

			<div class="panel panel-default" style="border:1px solid #ddd;display: %%GLOBAL_HideOrderComments%%">
				<div class="panel-heading" style="padding: 10px 15px;">%%LNG_EnterOrderComments%%</div>
				<div class="panel-body">
					<textarea name="ordercomments" cols="40" rows="6" class="form-control">%%GLOBAL_OrderComments%%</textarea>
				</div>
			</div>

			<div style="%%GLOBAL_HideOrderTermsAndConditions%%" class="CheckoutHideOrderTermsAndConditions">
				<hr class="Clear" />
				<h3>%%LNG_TermsAndConditions%%</h3>
				<div class="PL20" style="%%GLOBAL_HideTermsAndConditionsTextarea%%">
					<textarea readonly="readonly" cols="53" rows="6" class="Field250">%%GLOBAL_OrderTermsAndConditions%%</textarea>
				</div>

				<div class="PL20 MT10">
					<input type="checkbox" name="AgreeTermsAndConditions" id="AgreeTermsAndConditions" /> <label for= "AgreeTermsAndConditions">%%GLOBAL_AgreeTermsAndConditions%%</label> %%GLOBAL_TermsAndConditionsLink%%
				</div>
			</div>
		</div>

		<div class="col-md-8">
			<div style="display: %%GLOBAL_HidePaymentOptions%%" class="PaymentOptions" id="payment_options">
				<div class="alert alert-info"><center>%%LNG_HowWouldYouLikeToPay%%</center></div>
				<div style="display: %%GLOBAL_HideUseStoreCredit%%;">
					<p class="MB10">
						<label><input type="radio" name="store_credit" id="store_credit" value="1" checked = 'checked'  onclick="update_order_credit_payment(true)" /> %%LNG_CheckoutUseStoreCredit%%</label>
					</p>
					<div id="use_store_credit" class="PL20" style="display: %%GLOBAL_HideUseStoreCredit%%">
						<p style="display: %%GLOBAL_HideLimitedCreditWarning%%" class="ErrorMessage">%%GLOBAL_CheckoutStoreCreditWarning%%</p>
						<div class="MB10">
							<table cellpadding="3">
								<tr>
									<td align="right"><strong>%%LNG_StoreCreditBalance%%</strong></td>
									<td align="right" width="100" >%%GLOBAL_StoreCredit%%</td>
								</tr>
								<tr>
									<td align="right"><strong>%%LNG_YourOrderTotal%%</strong></td>
									<td align="right" width="100" >%%GLOBAL_AdjustedTotalCost%%</td>
								</tr>
								<tr style="display: %%GLOBAL_HideLimitedCreditWarning%%">
									<td align="right"><strong>%%LNG_OutstandingOrderTotal%%</strong></td>
									<td align="right" width="100" class="ProductPrice">%%GLOBAL_Remaining%%</td>
								</tr>
								<tr style="display: %%GLOBAL_HideRemainingStoreCredit%%">
									<td align="right"><strong>%%LNG_RemainingStoreCredit%%</strong></td>
									<td align="right" width="100" style="color: green;">%%GLOBAL_RemainingCredit%%</td>
								</tr>
							</table>
						</div>

						<div class="MB10" style="display: %%GLOBAL_HideLimitedCreditPaymentOption%%">
							<p>%%LNG_CreditPaymentMethod%%</p>
							<div class="PL20" id="credit_provider_list" style="display: %%GLOBAL_HideLimitedCreditWarning%%">
								%%GLOBAL_StoreCreditPaymentProviders%%
								%%GLOBAL_CheckoutWith%%
							</div>
						</div>
					</div>
					<div class="MB10" style="display: %%GLOBAL_HideCreditAltOptionList%%">
						<label><input type="radio" name="store_credit" value="0"  onclick="update_order_credit_payment(false); checkout_provider_changed(this);" /> %%GLOBAL_CreditAlt%%</label>
					</div>
				</div>
			</div>

			<div class="PL20" id="provider_list" style="display:%%GLOBAL_HidePaymentProviderList%%">
				%%GLOBAL_PaymentProviders%%
			</div>
		</div>
	</div>
	<hr>
	<input id="bottom_payment_button" style="display:%%GLOBAL_HideButtomPaymentButton%%" class="btn btn-primary pull-right" type="submit" value="Selecione a forma de Pagamento Acima" onclick="fFun(this)"/>

	%%Panel.ChooseCheckoutProviderJavaScript%%
	<script type="text/javascript">
		%%GLOBAL_PaymentButtonSwitch%%
		%%GLOBAL_ExpressCheckoutLoadPaymentForm%%
		lang.TickArgeeTermsAndConditions = '%%LNG_TickArgeeTermsAndConditions%%';

		$('#provider_list input[type=radio], #credit_provider_list input[type=radio]').click(function() {
			if(!$(this).hasClass('ProviderHasPaymentForm')) {
				ExpressCheckout.HidePaymentForm();
			}
			else {
				$('#CheckoutStepPaymentDetails').show();
			}
		});
	</script>
</form>