Just updated the NuGet package to v20.1.0 just to see compiler errors about undefined symbols for StripeChargeService
and StripeChargeCreateOptions
.
Are there migration paths available to whatever's hot now?
Hey @UweKeim! Sorry about the confusion here! The 20.0 release was a major release which introduced numerous breaking changes. The main one was removing the Stripe
prefix from most of the classes in stripe-dotnet. We wrote a detailed migration guide that you can find here: https://github.com/stripe/stripe-dotnet/wiki/Migration-guide-for-v20
Let me know if this doesn't help!
Hi @UweKeim. Something to keep in mind when upgrading stripe-dotnet: we use semantic versioning, meaning that we increment the major version number whenever breaking changes are introduced. This means that it's always safe to upgrade to a new a minor or patch version, but you should always check the changelog before upgrading to a new major version.
To answer your specific question, we've removed the Stripe
prefix from most classes (it was redundant since everything is already in the Stripe
namespace). So StripeChargeService
is now ChargeService
, StripeChargeCreateOptions
is now ChargeCreateOptions
, etc.
Closing the issue, but feel free to reply if you're having trouble or have any suggestions to improve the migration guide!
Thanks a lot guys!
Above migration guide's link is broken.
Working one: https://github.com/stripe/stripe-dotnet/wiki/Migration-guide-for-v20
@remi-stripe, fyi, may be worth updating your comment here.
I think this is old, but i have a question about the "StripeChargeService" i used
var service = new StripeChargeService("sk_test_xxxxxxxxxxxxx");
so, how can i use it with ChargeService. Thanks.
@Alexislml96 The change was mostly a rename from StripeChargeService
to ChargeService
without the Stripe prefix. You can read more about this in the wiki mentioned before: https://github.com/stripe/stripe-dotnet/wiki/Migration-guide-for-v20
Yes i understand that, my question is where can i put the "sk_test" key in the ChargeService method?
You would do something like this:
var service = new ChargeService(new StripeClient("sk_test_123"));
Wll finally i can resolve it, i just need to put the key like this at the beginning of the code in the server side.
StripeConfiguration.ApiKey = "sk_test_";
Thanks.