Ejemplo n.º 1
0
        public async Task<ActionResult> Create(SubscriptionRequestModel subscriptionRequestModel) {
            if (this.ModelState.IsValid) {
                SubscriptionRequest subscriptionRequest = new SubscriptionRequest();
                subscriptionRequest.Amount = subscriptionRequestModel.Amount;
                subscriptionRequest.Description = subscriptionRequestModel.Description;
                subscriptionRequest.Interval = "14 days";
                await this._mollieClient.CreateSubscriptionAsync(subscriptionRequestModel.CustomerId, subscriptionRequest);

                return this.RedirectToAction("Index", new { customerId = subscriptionRequestModel.CustomerId });
            }

            return this.View(subscriptionRequestModel);
        }
Ejemplo n.º 2
0
 public ActionResult Create(string customerId) {
     SubscriptionRequestModel subscriptionRequest = new SubscriptionRequestModel();
     subscriptionRequest.CustomerId = customerId;
     return this.View("Create", subscriptionRequest);
 }