Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
# see: https://docs.stripe.com/sdks/versioning?server=dotnet#stripe-sdk-language-version-support-policy
# even numbers are LTS
# TODO: add 9.0.x; https://go/j/RUN_DEVSDK-1957
dotnet-version: |
2.1.x
3.1.x
5.0.x
6.0.x
7.0.404
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Build Status](https://github.com/stripe/stripe-dotnet/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-dotnet/actions?query=branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-dotnet/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-dotnet?branch=master)

The official [Stripe][stripe] .NET library, supporting .NET Standard 2.0+, .NET Core 3.1+, and .NET Framework 4.6.1+.
The official [Stripe][stripe] .NET library, supporting .NET Standard 2.0+, .NET Core 5+, and .NET Framework 4.6.2+.

## Installation

Expand Down Expand Up @@ -35,6 +35,12 @@ From within Visual Studio:
5. Click on the Stripe.net package, select the appropriate version in the
right-tab and click _Install_.

### Requirements

Per our [Language Version Support Policy](https://docs.stripe.com/sdks/versioning?server=dotnet#stripe-sdk-language-version-support-policy), we currently support **.NET Standard 2.0+, .NET Core 5+, and .NET Framework 4.6.2+.**.

Support for .NET Core versions 5 & 7 are deprecated and will be removed in the next major version. Support for version 6 will be removed in a future version. Read more and see the full schedule in the docs: https://docs.stripe.com/sdks/versioning?server=dotnet#stripe-sdk-language-version-support-policy

## Documentation

For a comprehensive list of examples, check out the [API
Expand Down
6 changes: 3 additions & 3 deletions src/Stripe.net/Infrastructure/Public/SystemNetHttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public class SystemNetHttpClient : IHttpClient
"netcoreapp3.1"
#elif NETSTANDARD2_0
"netstandard2.0"
#elif NET461
"net461"
#elif NET462
"net462"
#else
#error "Unknown target framework"
#warning "Unknown target framework"
#endif
;

Expand Down
8 changes: 4 additions & 4 deletions src/Stripe.net/Services/_base/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ internal IEnumerable<T> ListRequestAutoPaging<T>(
where T : IStripeEntity
{
var apiMode = ApiModeUtils.GetApiMode(url);
#if NET461
#if NETFRAMEWORK
if (apiMode == ApiMode.V2)
{
return
Expand All @@ -153,7 +153,7 @@ internal IEnumerable<T> ListRequestAutoPaging<T>(
#endif
}

#if NET461
#if NETFRAMEWORK
internal IEnumerable<T> V1ListRequestAutoPagingSync<T>(
string url,
ListOptions options,
Expand Down Expand Up @@ -427,7 +427,7 @@ internal IEnumerable<T> SearchRequestAutoPaging<T>(
RequestOptions requestOptions)
where T : IStripeEntity
{
#if NET461
#if NETFRAMEWORK
return
this.SearchRequestAutoPagingSync<T>(url, options, requestOptions);
#else
Expand All @@ -436,7 +436,7 @@ internal IEnumerable<T> SearchRequestAutoPaging<T>(
#endif
}

#if NET461
#if NETFRAMEWORK
private IEnumerable<T> SearchRequestAutoPagingSync<T>(
string url,
SearchOptions options,
Expand Down
10 changes: 3 additions & 7 deletions src/Stripe.net/Stripe.net.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Stripe.net is a sync/async client and portable class library for the Stripe API, supporting .NET Standard 2.0+, .NET Core 3.1+, and .NET Framework 4.6.1+. (Official Library)</Description>
<Description>Stripe.net is a sync/async client and portable class library for the Stripe API, supporting .NET Standard 2.0+, .NET Core 5+, and .NET Framework 4.6.2+. (Official Library)</Description>
<Version>48.5.0</Version>
<LangVersion>8</LangVersion>
<Authors>Stripe, Jayme Davis</Authors>
<TargetFrameworks>net5.0;net6.0;net7.0;net8.0;netcoreapp3.1;netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0;net8.0;netstandard2.0;net462</TargetFrameworks>
<PackageTags>stripe;payment;credit;cards;money;gateway;paypal;braintree</PackageTags>
<PackageIcon>icon.png</PackageIcon>
<PackageProjectUrl>https://github.com/stripe/stripe-dotnet</PackageProjectUrl>
Expand Down Expand Up @@ -56,16 +56,12 @@
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<Reference Include="System.Configuration" />
Expand Down
4 changes: 2 additions & 2 deletions src/StripeTests/StripeTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;net6.0;net7.0;net8.0;netcoreapp3.1;netcoreapp2.1;net461</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0;net8.0;net462</TargetFrameworks>
<LangVersion>8</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
Expand All @@ -28,7 +28,7 @@
<PackageReference Include="System.Linq.Async" Version="4.1.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

Expand Down
Loading