Commits

Bertrand Le Roy  committed d27cca6

A better checkout button for Stripe, removed unused template.

  • Participants
  • Parent commits 4a1b5cb

Comments (0)

Files changed (4)

File Content/accepted-cards.png

Added
New image

File Nwazet.Commerce.csproj

     <Reference Include="System.Xml.Linq" />
   </ItemGroup>
   <ItemGroup>
+    <Content Include="Content\accepted-cards.png" />
     <Content Include="Content\checkout-with-stripe.png" />
     <Content Include="Content\menu.nwazet-commerce.png" />
     <Content Include="LICENSE.txt" />
     <Content Include="Views\OrderAdmin\List.cshtml" />
     <Content Include="Views\Order_CheckPassword.cshtml" />
     <Content Include="Views\Order_Confirmation.cshtml" />
-    <Content Include="Views\Stripe\Confirmation.cshtml" />
   </ItemGroup>
   <ItemGroup />
   <PropertyGroup>

File Views/Stripe.cshtml

     <form method="POST" action="@sslService.SecureActionUrl("Checkout", "Stripe", new {area = "Nwazet.Commerce"})" class="stripe-checkout">
         @Html.AntiForgeryTokenOrchard()
         <input type="hidden" name="checkoutData" value="@Model.EncryptedData"/>
-        <input type="image" name="StripeCheckout" src="@Url.Content("~/Modules/Nwazet.Commerce/Content/checkout-with-stripe.png")" alt="@T("Checkout with Stripe")" class="checkout-button"/>
+        <input type="submit" value="@T("Checkout")" class="submit-button"/>
+        @T("with")
+        <input type="image" name="StripeCheckout" src="@Url.Content("~/Modules/Nwazet.Commerce/Content/accepted-cards.png")"
+               alt="@T("Secure Checkout with VISA, Mastercard, American Express, Discover, Diners, or JCB (payment handled by Stripe)")"
+               title="@T("Secure Checkout with VISA, Mastercard, American Express, Discover, Diners, or JCB (payment handled by Stripe)")"
+               class="checkout-button" />
     </form>
 }

File Views/Stripe/Confirmation.cshtml

-@model Nwazet.Commerce.ViewModels.StripeCheckoutViewModel
-@{
-    var title = Layout.Title = T("Checkout with Stripe - 3: Confirmation");
-}
-<h1>@title</h1>
-
-@using (Html.BeginFormAntiForgeryPost(Url.Action("Confirmation", "Stripe", new {area = "Nwazet.Commerce"}), FormMethod.Post, new {@id="address-form"})) {
-    <fieldset>
-        <legend>@T("Shipping Address")</legend>
-        @Display.CommerceAddress(Prefix: "shippingAddress", Address: Model.ShippingAddress)
-    </fieldset>
-    <fieldset class="toggle-billing">
-        <input id="toggle-billing-address" type="checkbox" checked="checked"/>
-        <label for="toggle-billing-address" class="for-checkbox">@T("Bill me at the shipping address.")</label>
-    </fieldset>
-    <fieldset class="billing-address">
-        <legend>@T("Billing Address")</legend>
-        @Display.CommerceAddress(Prefix: "billingAddress", Address: Model.BillingAddress)
-    </fieldset>
-
-    <label for="@Html.Id("Email")">@T("e-mail")</label>
-    <input id="@Html.Id("Email")" type="text" name="@Html.Name("Email")" value="@Model.Email" class="input-large"/>
-    <div class="hint">@T("Please provide an e-mail address for us to give you updates on your order.")</div>
-    
-    <label for="@Html.Id("Phone")">@T("Phone")</label>
-    <input id="@Html.Id("Phone")" type="text" name="@Html.Name("Phone")" value="@Model.Phone" class="input-large"/>
-    <div class="hint">@T("Please provide a phone number where we can reach you in case we need additional information. This is also required when shipping to some countries.")</div>
-    
-    <label for="@Html.Id("specialInstructions")">@T("Special Instructions")</label>
-    <textarea id="@Html.Id("specialInstructions")" name="@Html.Name("shippingAddress.Country")" rows="6" cols="80" class="input-xxlarge"></textarea>
-    <input type="hidden" name="stripeToken" value="@Model.Token"/>
-    <div class="actions">
-        <input type="submit" name="next" class="submit-button" value="@T("Next >")"/>
-        <input type="submit" name="back" class="back-button" value="@T("< Back")"/>
-    </div>
-}