@model Nop.Web.Models.Checkout.CheckoutPaymentMethodModel
@using Nop.Core.Domain.Orders
@using Nop.Web.Models.Checkout
@using Nop.Web.Models.Common
@using Nop.Web.Framework.UI
@{
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.Checkout").Text);
}
<div class="checkout-page">
    @Html.Partial("~/Views/Checkout/CheckoutProgress.cshtml", new CheckoutProgressModel() { CheckoutProgressStep = CheckoutProgressStep.Payment }, new ViewDataDictionary())
    <div class="clear">
    </div>
    <div class="page-title">
        <h1>@T("Checkout.SelectPaymentMethod")</h1>
    </div>
    <div class="clear">
    </div>
    <div class="checkout-data">
        @using (Html.BeginRouteForm("CheckoutPaymentMethod", FormMethod.Post))
        {
            if (Model.DisplayRewardPoints && Model.PaymentMethods.Count > 0)
            {
            <div class="userewardpoints">
                @Html.EditorFor(model => model.UseRewardPoints)
                @string.Format(T("Checkout.UseRewardPoints").Text, Model.RewardPointsBalance, Model.RewardPointsAmount)
            </div>
            <div class="clear">
            </div>
            <br />
            }
            <div class="payment-methods">
                @if (Model.PaymentMethods.Count > 0)
                {
                    <div>
                        @for (int i = 0; i < Model.PaymentMethods.Count; i++)
                        {
                            var paymentMethod = Model.PaymentMethods[i];
                            <div class="payment-method-item">
                                <div class="option-name">
                                    <input id="paymentmethod_@(i)" type="radio" name="paymentmethod" value="@(paymentMethod.PaymentMethodSystemName)"  @(i == 0 ? " checked=\"checked\"" : null) />
                                    <label for="paymentmethod_@(i)">@paymentMethod.Name</label>
                                    @if (!String.IsNullOrEmpty(paymentMethod.Fee))
                                    {
                                        <text>(</text>
                                        @paymentMethod.Fee
                                        <text>)</text>
                                    }
                                </div>
                            </div>
                        }
                        <div class="clear">
                        </div>
                        <div class="select-button">
                            <input type="submit" name="nextstep" value="@T("Checkout.NextButton")" id="nextstep" class="paymentmethodnextstepbutton" />
                        </div>
                    </div>
                }
                else
                {
                    <div class="clear">
                    </div>
                    <div class="error-block">
                        <div class="message-error">
                            @T("Checkout.NoPaymentMethods")
                        </div>
                    </div>
                }
            </div>
        }
        <div class="clear">
        </div>
        <div class="order-summary-title">
            @T("Checkout.OrderSummary")
        </div>
        <div class="clear">
        </div>
        <div class="order-summary-body">
            @Html.Action("OrderSummary", "ShoppingCart", new { isEditable = false })
        </div>
    </div>
</div>
