saas-ecom icon indicating copy to clipboard operation
saas-ecom copied to clipboard

Method not found: 'Void Stripe.StripeCustomerCreateOptions.set_Card

Open whatsdis opened this issue 8 years ago • 5 comments

So I updated Stripe.net to the latest version because I was getting the "Stripe doesn't support TLS 1.0" error.

However, now I'm getting

Method not found: 'Void Stripe.StripeCustomerCreateOptions.set_Card(Stripe.StripeCreditCardOptions)'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MissingMethodException: Method not found: 'Void Stripe.StripeCustomerCreateOptions.set_Card(Stripe.StripeCreditCardOptions)'.

Source Error:

Line 200: : model.SubscriptionPlan; Line 201: Line 202: await SubscriptionsFacade.SubscribeUserAsync(user, planId, taxPercent: taxPercent); Line 203: await UserManager.UpdateAsync(user); Line 204:

Source File: C:\Users\bob\Documents\Visual Studio 2015\Projects\saas-ecom-my-notes-sample-master\saas-ecom-my-notes-sample-master\MyNotes\Controllers\AccountController.cs Line: 202

Stack Trace:

[MissingMethodException: Method not found: 'Void Stripe.StripeCustomerCreateOptions.set_Card(Stripe.StripeCreditCardOptions)'.] SaasEcom.Core.Infrastructure.PaymentProcessor.Stripe.<CreateCustomerAsync>d__5.MoveNext() +0 System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.Start(TStateMachine& stateMachine) +60 SaasEcom.Core.Infrastructure.PaymentProcessor.Stripe.CustomerProvider.CreateCustomerAsync(SaasEcomUser user, String planId, Nullable1 trialEnd, String cardToken) +121 SaasEcom.Core.Infrastructure.Facades.<SubscribeUserAsync>d__0.MoveNext() +347 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58 System.Runtime.CompilerServices.TaskAwaiter1.GetResult() +28 MyNotes.Controllers.<Register>d__18.MoveNext() in C:\Users\bob\Documents\Visual Studio 2015\Projects\saas-ecom-my-notes-sample-master\saas-ecom-my-notes-sample-master\MyNotes\Controllers\AccountController.cs:202 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58 System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26 System.Threading.Tasks.TaskHelpersExtensions.ThrowIfFaulted(Task task) +42 System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult) +73 System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult asyncResult) +37 System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +27 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +58 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +68 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +34 System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +69 System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +230 System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +27 System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +27 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +58 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +68 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34 System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +42 System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +124 System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +27 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +58 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +30 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +29 System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +27 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +48 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +58 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +30 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +21 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +32 System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +26 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +40 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +58 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +30 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +21 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +24 System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +27 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +48 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +58 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +30 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +21 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +29 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +23 System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +129

whatsdis avatar Aug 05 '16 02:08 whatsdis

You need to add a credit card before creating a user if you are not using a free trail.

corymcm avatar Sep 26 '16 00:09 corymcm

What I did was edit the user to have a creditcard and when they go to register just display a editor for that creditcard. This will pull up the shared\editortemplates\Creditcard.cshtml. I had to edit this template to remove the save\cancel button and have the register post the card-form id.

@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form", id = "card-form" }))

corymcm avatar Sep 26 '16 00:09 corymcm

Registered the user not using the SubscriptionsFacade.SubscribeUserAsync to prevent the error posted initially on this issue. Used StripeCustomerCreateOptions() to create the user and then went to the Account section to add the Credit Card, to try to proof that the problem is not related to the Trial subscription.

Adding the Credit Card alone after the user register still gives the same error:

Method not found: 'Void Stripe.StripeCardCreateOptions.set_Card(Stripe.StripeCreditCardOptions)'. 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.MissingMethodException: Method not found: 'Void Stripe.StripeCardCreateOptions.set_Card(Stripe.StripeCreditCardOptions)'.

Source Error: 



Line 217:            var user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
Line 218:
Line 219:            await CardService.AddAsync(user, model.CreditCard);
Line 220:
Line 221:            TempData.Add("flash", new FlashSuccessViewModel("Your credit card has been saved successfully."));


 Source File:  C:\TestWebsite\Project\Controllers\BillingController.cs    Line:  219 

whatdis2 avatar Oct 04 '16 03:10 whatdis2

I am also experiencing this issue. In my case, I do want to use the free trial. What is the best workaround for this error?

myutzy avatar Dec 16 '16 22:12 myutzy

Has anyone figured this out? I'm having the same issue.

kdotmdot avatar Feb 11 '17 19:02 kdotmdot