sara
sara

Reputation: 55

Using Stripe Checkout in ASP.NET Core application

I use the stripe for payment in my application but after i have error in my controller
Errors:
1."The type or namespace name 'StripeCustomerService' could not be found (are you issing a using "
2."The type or namespace name 'StripeChargeService' could not be found (are you issing a using "

enter image description here

Upvotes: 0

Views: 2008

Answers (2)

shage_in_excelsior
shage_in_excelsior

Reputation: 193

using Stripe.Checkout;

You are missing an assembly reference. In Visual Studio there is a helper icon to the left in the code window on the line of code that is missing the assembly. Right click it and it will show you which assembly you are missing and it will add it for you.

I commented on the Stripe.com API reference page where you acquired your code sample and informed them of the missing above.

Upvotes: 2

Matt Evans
Matt Evans

Reputation: 7585

Based on this https://www.fuget.org/packages/Stripe.net/37.14.0/lib/netstandard2.0/Stripe.net.dll/Stripe/CustomerService

There doesn't seem to be StripeCustomerService class exposed by the Stripe.Net library.

There is a CustomerService class in the Stripe Namespace, which you would instantiate like this:

 var cs = new Stripe.CustomerService();

Upvotes: 2

Related Questions