PayPal.Payflow 5.0.4

dotnet add package PayPal.Payflow --version 5.0.4
                    
NuGet\Install-Package PayPal.Payflow -Version 5.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PayPal.Payflow" Version="5.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PayPal.Payflow" Version="5.0.4" />
                    
Directory.Packages.props
<PackageReference Include="PayPal.Payflow" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PayPal.Payflow --version 5.0.4
                    
#r "nuget: PayPal.Payflow, 5.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PayPal.Payflow@5.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PayPal.Payflow&version=5.0.4
                    
Install as a Cake Addin
#tool nuget:?package=PayPal.Payflow&version=5.0.4
                    
Install as a Cake Tool

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:

  1. Open the solution in Visual Studio.
  2. Set SamplesCS (C#) or SamplesVB (VB.NET) as the startup project.
  3. Update <StartupObject> in the project file if you want a different entry point than DOSaleComplete.
  4. 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.html directly in a browser. The SHFB website output requires a local HTTP server — browsers block its JavaScript when loaded via file://. Use the provided scripts to serve it:

cd "dotNET/Payflow SDK Docs"
.\view-docs.ps1        # Windows PowerShell
./view-docs.sh         # Linux / macOS / Git Bash
view-docs.bat          # Windows Command Prompt

Each script installs dotnet-serve automatically (one time) and opens the browser. See Payflow SDK Docs/README.md for 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

SDK LICENSE

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.4 75 6/29/2026
5.0.3 84 6/28/2026