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.
| 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+ |
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_passwordOption 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.
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.shREM Windows (Command Prompt)
cd dotNET
run-sample.batPass vb / -VB to run the Visual Basic sample instead of the C# one.
cd dotNET/PFProSDK
dotnet buildThis produces Payflow_dotNET.dll under bin/Debug/net8.0/, bin/Debug/net10.0/, and bin/Debug/net48/. Use -c Release for release binaries.
Package metadata is embedded directly in PFProSDK.csproj — no separate .nuspec or nuget.exe is needed.
cd dotNET/PFProSDK
dotnet pack -c ReleaseOutput: bin/Release/PayPal.Payflow.5.0.3.nupkg — a single multi-targeted package containing net8.0, net10.0, and net48 assemblies.
Open dotNET/Payflow dotNET SDK.sln in Visual Studio 2022 or later. The SDK-style project loads directly with no migration wizard.
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.
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=ReleaseOutput 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.
See CONTRIBUTING.md. PRs are welcome; open an issue first for major changes.
The last v4 SDK binaries are in the SDK Binaries directory.