Commits

Bertrand Le Roy  committed d6af43f

Added feature attribute to stripe controller

  • Participants
  • Parent commits 8ec2bc9

Comments (0)

Files changed (1)

File Controllers/StripeController.cs

 using Nwazet.Commerce.Services;
 using Nwazet.Commerce.ViewModels;
 using Orchard;
+using Orchard.Environment.Extensions;
 using Orchard.Localization;
 using Orchard.Logging;
 using Orchard.Themes;
 namespace Nwazet.Commerce.Controllers {
     [Themed]
     [RequireHttps]
+    [OrchardFeature("Stripe")]
     public class StripeController : Controller {
         private const string NwazetStripeCheckout = "nwazet.stripe.checkout";
         private readonly IStripeService _stripeService;
                 Logger.Error(stripeCharge.Error.Type + ": " + stripeCharge.Error.Message);
                 _workflowManager.TriggerEvent("OrderError", null,
                     () => new Dictionary<string, object> {
-                    {"CheckoutError", stripeCharge.Error}
-                });
+                        {"CheckoutError", stripeCharge.Error}
+                    });
                 if (stripeCharge.Error.Type == "card_error") {
                     return Pay(stripeCharge.Error.Message);
                 }
             return strings.Any(String.IsNullOrWhiteSpace);
         }
     }
-}
+}