PayPal.Payflow
5.0.4
dotnet add package PayPal.Payflow --version 5.0.4
NuGet\Install-Package PayPal.Payflow -Version 5.0.4
<PackageReference Include="PayPal.Payflow" Version="5.0.4" />
<PackageVersion Include="PayPal.Payflow" Version="5.0.4" />
<PackageReference Include="PayPal.Payflow" />
paket add PayPal.Payflow --version 5.0.4
#r "nuget: PayPal.Payflow, 5.0.4"
#:package PayPal.Payflow@5.0.4
#addin nuget:?package=PayPal.Payflow&version=5.0.4
#tool nuget:?package=PayPal.Payflow&version=5.0.4
Payflow .NET SDK
A .NET SDK for easy integration with the PayPal Payflow Gateway. Supports .NET 8.0 (LTS), .NET 10.0 (LTS), and .NET Framework 4.8.
Note: v5 contains breaking changes from v4. Review the CHANGELOG before upgrading an existing integration.
Requirements
| Target | Minimum Tooling |
|---|---|
| .NET 10.0 (LTS) | .NET 10 SDK or Visual Studio 2022 17.12+ |
| .NET 8.0 (LTS) | .NET 8 SDK or Visual Studio 2022 17.8+ |
| .NET Framework 4.8 | .NET Framework 4.8 Developer Pack + Visual Studio 2019+ |
Quick Start
Step 1 — Configure credentials
Credentials are read at runtime — never hardcoded. You have two options:
Option A — Environment variables (recommended for CI/CD and shared machines):
# Windows (PowerShell)
$env:PAYFLOW_USER = "your_user"
$env:PAYFLOW_VENDOR = "your_vendor"
$env:PAYFLOW_PARTNER = "PayPal"
$env:PAYFLOW_PASSWORD = "your_password"
# Linux / macOS / Git Bash
export PAYFLOW_USER=your_user
export PAYFLOW_VENDOR=your_vendor
export PAYFLOW_PARTNER=PayPal
export PAYFLOW_PASSWORD=your_password
Option B — App.config (simple local use):
Open dotNET/SamplesCS/App.config (or SamplesVB/App.config for VB) and fill in your account details:
<add key="PayflowUser" value="your_user" />
<add key="PayflowVendor" value="your_vendor" />
<add key="PayflowPartner" value="PayPal" />
<add key="PayflowPassword" value="your_password" />
Git is pre-configured (--skip-worktree) to ignore local changes to both App.config files so your credentials are never staged or committed.
Priority: Environment variables take precedence over
App.config. If any env var is missing the file is used as a fallback.
Step 2 — Run the sample
The fastest way to verify connectivity is the DOSaleComplete sample. Once credentials are set in App.config, run:
# Windows (PowerShell)
cd dotNET
.\run-sample.ps1
# Linux / macOS / Git Bash
cd dotNET
./run-sample.sh
REM Windows (Command Prompt)
cd dotNET
run-sample.bat
Pass vb / -VB to run the Visual Basic sample instead of the C# one.
Building the SDK
cd dotNET/PFProSDK
dotnet build
This produces Payflow_dotNET.dll under bin/Debug/net8.0/, bin/Debug/net10.0/, and bin/Debug/net48/. Use -c Release for release binaries.
Building a NuGet Package
Package metadata is embedded directly in PFProSDK.csproj — no separate .nuspec or nuget.exe is needed.
cd dotNET/PFProSDK
dotnet pack -c Release
Output: bin/Release/PayPal.Payflow.5.0.3.nupkg — a single multi-targeted package containing net8.0, net10.0, and net48 assemblies.
Building with Visual Studio
Open dotNET/Payflow dotNET SDK.sln in Visual Studio 2022 or later. The SDK-style project loads directly with no migration wizard.
Running the Samples
All sample projects target net8.0, net10.0, and net48.
Before running: fill in your credentials in App.config as described in the Quick Start section above.
To run from Visual Studio:
- Open the solution in Visual Studio.
- Set
SamplesCS(C#) orSamplesVB(VB.NET) as the startup project. - Update
<StartupObject>in the project file if you want a different entry point thanDOSaleComplete. - Press F5 or use
dotnet run --project SamplesCS -f net8.0.
API Documentation
The Payflow SDK Docs project generates a full API reference website using Sandcastle Help File Builder (SHFB) v2026.3.29.0 or later.
Requirements: Install SHFB from its GitHub releases page. Opening the docs project in Visual Studio also requires the .NET Framework 4.8 targeting pack — install it via VS Installer → Modify → Individual components → ".NET Framework 4.8 targeting pack". This is a VS IDE requirement only; the SHFB command-line build does not need it.
$env:SHFBROOT = "C:\Program Files (x86)\EWSoftware\Sandcastle Help File Builder\"
cd "dotNET/Payflow SDK Docs"
dotnet msbuild PayflowSDKDocs.shfbproj /p:Configuration=Release
Output is written to Payflow SDK Docs/Help/.
Important: Do not open
Help/index.htmldirectly in a browser. The SHFB website output requires a local HTTP server — browsers block its JavaScript when loaded viafile://. Use the provided scripts to serve it:cd "dotNET/Payflow SDK Docs" .\view-docs.ps1 # Windows PowerShell./view-docs.sh # Linux / macOS / Git Bashview-docs.bat # Windows Command PromptEach script installs
dotnet-serveautomatically (one time) and opens the browser. SeePayflow SDK Docs/README.mdfor additional viewing options.
See also the Payflow Gateway Developer Guide.
Contributing
See CONTRIBUTING.md. PRs are welcome; open an issue first for major changes.
Older Versions
The last v4 SDK binaries are in the SDK Binaries directory.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- No dependencies.
-
net10.0
- System.Configuration.ConfigurationManager (>= 9.0.0)
-
net8.0
- System.Configuration.ConfigurationManager (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.