Click here to Skip to main content
15,892,575 members
Articles / Web Development / ASP.NET

Introduction to PayPal for C# - ASP.NET developers

Rate me:
Please Sign up or sign in to vote.
4.93/5 (246 votes)
3 Feb 2017CPOL24 min read 1.3M   40.3K   655  
An overview that presents all PayPal integration options, targeted especially at C# developers.
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{76DC9771-6C14-46ED-A76A-AD9A58C910FC}</ProjectGuid>
    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>LepiPele.PayPal</RootNamespace>
    <AssemblyName>LepiPele.PayPal</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.DataSetExtensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Web.Extensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Drawing" />
    <Reference Include="System.Web" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Configuration" />
    <Reference Include="System.Web.Services" />
    <Reference Include="System.EnterpriseServices" />
    <Reference Include="System.Web.Mobile" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="API\ExpressCheckoutCancel.aspx" />
    <Content Include="API\ExpressCheckoutStart.aspx" />
    <Content Include="API\ExpressCheckoutSuccess.aspx" />
    <Content Include="Default.aspx" />
    <Content Include="IPN\IPNHandler.aspx" />
    <Content Include="PDT\PDTSuccess.aspx" />
    <Content Include="PDT\PDTStart.aspx" />
    <Content Include="Web.config" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="API\ExpressCheckoutCancel.aspx.cs">
      <DependentUpon>ExpressCheckoutCancel.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
    </Compile>
    <Compile Include="API\ExpressCheckoutCancel.aspx.designer.cs">
      <DependentUpon>ExpressCheckoutCancel.aspx</DependentUpon>
    </Compile>
    <Compile Include="API\ExpressCheckoutStart.aspx.cs">
      <DependentUpon>ExpressCheckoutStart.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
    </Compile>
    <Compile Include="API\ExpressCheckoutStart.aspx.designer.cs">
      <DependentUpon>ExpressCheckoutStart.aspx</DependentUpon>
    </Compile>
    <Compile Include="API\ExpressCheckoutSuccess.aspx.cs">
      <DependentUpon>ExpressCheckoutSuccess.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
    </Compile>
    <Compile Include="API\ExpressCheckoutSuccess.aspx.designer.cs">
      <DependentUpon>ExpressCheckoutSuccess.aspx</DependentUpon>
    </Compile>
    <Compile Include="API\PayPalAPIUtil.cs" />
    <Compile Include="Default.aspx.cs">
      <SubType>ASPXCodeBehind</SubType>
      <DependentUpon>Default.aspx</DependentUpon>
    </Compile>
    <Compile Include="Default.aspx.designer.cs">
      <DependentUpon>Default.aspx</DependentUpon>
    </Compile>
    <Compile Include="IPN\IPNHandler.aspx.cs">
      <DependentUpon>IPNHandler.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
    </Compile>
    <Compile Include="IPN\IPNHandler.aspx.designer.cs">
      <DependentUpon>IPNHandler.aspx</DependentUpon>
    </Compile>
    <Compile Include="PDT\PDTHolder.cs" />
    <Compile Include="PDT\PDTSuccess.aspx.cs">
      <DependentUpon>PDTSuccess.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
    </Compile>
    <Compile Include="PDT\PDTSuccess.aspx.designer.cs">
      <DependentUpon>PDTSuccess.aspx</DependentUpon>
    </Compile>
    <Compile Include="PDT\PDTStart.aspx.cs">
      <DependentUpon>PDTStart.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
    </Compile>
    <Compile Include="PDT\PDTStart.aspx.designer.cs">
      <DependentUpon>PDTStart.aspx</DependentUpon>
    </Compile>
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
      <DependentUpon>Settings.settings</DependentUpon>
    </Compile>
    <Compile Include="Web References\com.paypal.sandbox.www\Reference.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Reference.map</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <WebReferences Include="Web References\" />
  </ItemGroup>
  <ItemGroup>
    <WebReferenceUrl Include="https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl">
      <UrlBehavior>Dynamic</UrlBehavior>
      <RelPath>Web References\com.paypal.sandbox.www\</RelPath>
      <UpdateFromURL>https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl</UpdateFromURL>
      <ServiceLocationURL>
      </ServiceLocationURL>
      <CachedDynamicPropName>
      </CachedDynamicPropName>
      <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
      <CachedSettingsPropName>LepiPele_PayPal_com_paypal_sandbox_www_PayPalAPIInterfaceService</CachedSettingsPropName>
    </WebReferenceUrl>
  </ItemGroup>
  <ItemGroup>
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\AddressVerifyResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\BAUpdateResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\BillOutstandingAmountResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\BillUserResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\BMButtonSearchResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\BMCreateButtonResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\BMGetButtonDetailsResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\BMGetInventoryResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\BMManageButtonStatusResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\BMSetInventoryResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\BMUpdateButtonResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\CoreComponentTypes.xsd" />
    <None Include="Web References\com.paypal.sandbox.www\CreateBillingAgreementResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\CreateMobilePaymentResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\CreateRecurringPaymentsProfileResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\DoAuthorizationResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\DoCaptureResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\DoDirectPaymentResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\DoExpressCheckoutPaymentResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\DoMobileCheckoutPaymentResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\DoNonReferencedCreditResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\DoReauthorizationResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\DoReferenceTransactionResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\DoUATPAuthorizationResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\DoUATPExpressCheckoutPaymentResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\DoVoidResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\eBLBaseComponents.xsd" />
    <None Include="Web References\com.paypal.sandbox.www\EnterBoardingResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\GetAccessPermissionDetailsResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\GetAuthDetailsResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\GetBalanceResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\GetBillingAgreementCustomerDetailsResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\GetBoardingDetailsResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\GetExpressCheckoutDetailsResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\GetMobileStatusResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\GetPalDetailsResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\GetRecurringPaymentsProfileDetailsResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\GetTransactionDetailsResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\ManagePendingTransactionStatusResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\ManageRecurringPaymentsProfileStatusResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\MassPayResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\PayPalSvc.wsdl" />
    <None Include="Web References\com.paypal.sandbox.www\Reference.map">
      <Generator>MSDiscoCodeGenerator</Generator>
      <LastGenOutput>Reference.cs</LastGenOutput>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\RefundTransactionResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\SetAccessPermissionsResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\SetAuthFlowParamResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\SetCustomerBillingAgreementResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\SetExpressCheckoutResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\SetMobileCheckoutResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\TransactionSearchResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\UpdateAccessPermissionsResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\com.paypal.sandbox.www\UpdateRecurringPaymentsProfileResponseType.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
  </ItemGroup>
  <ItemGroup>
    <Folder Include="App_Data\" />
    <Folder Include="IPN\Messages\" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>False</UseIIS>
          <AutoAssignPort>False</AutoAssignPort>
          <DevelopmentServerPort>17911</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>
          </IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer
United States United States
If you liked this article, consider reading other articles by me. For republishing article on other websites, please contact me by leaving a comment.

Comments and Discussions