GithubHelp home page GithubHelp logo

carloserodriguez2000 / sdk-core-dotnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from israelgoldstein/sdk-core-dotnet

0.0 2.0 0.0 31.48 MB

Core Library for .NET SDK

License: Other

Batchfile 0.27% C# 98.91% PowerShell 0.82%

sdk-core-dotnet's Introduction

TLSv1.2 Update

The Payment Card Industry (PCI) Council has mandated that early versions of TLS be retired from service. All organizations that handle credit card information are required to comply with this standard. As part of this obligation, PayPal is updating its services to require TLS 1.2 for all HTTPS connections. At this time, PayPal will also require HTTP/1.1 for all connections. Click here for more information

A new mode has been created to test if your server/machine handles TLSv1.2 connections. Please use security-test-sandbox mode instead of sandbox to verify. You can return back to sandbox mode once you have verified.


PayPal Core SDK for .NET

The PayPal Core SDK is a foundational library used by all of PayPal's C# SDKs. This SDK provides functionality such as configuration, credential management, connection management, logging, etc. that are used by the other SDKs. This SDK is developed using .NET Framework 3.5 and should compile on later versions of the .NET Framework. The SDK is also distributed via NuGet.

Prerequisites

  • Visual Studio 2005 or higher

Repository

This repository contains

  • PayPal Core SDK Class Libraries for Visual Studio 2005, 2008, 2010, 2012, and 2013
  • Visual Studio Test project for Visual Studio 2005, 2008, 2010, 2012, and 2013

OpenId Connect Integration

  • Redirect your buyer to obtain authorization
  • Capture the authorization code that is available as a query parameter ("code") in the redirect url
  • Exchange the authorization code for an access token, refresh token, id token combo
    Dictionary<string, string> configurationMap = new Dictionary<string, string>();
    configurationMap.Add("clientId", "...");
    configurationMap.Add("clientSecret", "...");
    configurationMap.Add("mode", "live");

    APIContext apiContext = new APIContext();
    apiContext.Config = configurationMap;

    ...
    
    CreateFromAuthorizationCodeParameters codeParams = new CreateFromAuthorizationCodeParameters();
    codeParams.SetCode("code");
    CreateFromAuthorizationCode token = TokenInfo.CreateFromAuthorizationCode(apiContext, codeParams);
    string accessToken = token.access_token;
  • The access token is valid for a predefined duration and can be used for seamless XO or for retrieving user information
    ...

    TokenInfo tokenInfo = new TokenInfo();
    tokenInfo.refresh_token = "refreshToken";
    UserInfoParameters userInfoParams = new UserInfoParameters();
    userInfoParams.SetAccessToken(tokenInfo.access_token);
    UserInfo userInfo = UserInfo.GetUserInfo(apiContext, userInfoParams);
  • If the access token has expired, you can obtain a new access token using the refresh token from the 3'rd step
    ...
    
    CreateFromRefreshTokenParameters refreshTokenParams = new CreateFromRefreshTokenParameters();
    refreshTokenParams.SetScope("openid"); // Optional
    TokenInfo tokenInfo = new TokenInfo(); // Create TokenInfo object; setting the refresh token
    tokenInfo.refresh_token = "refreshToken";
    
    tokenInfo.CreateFromRefreshToken(apiContext, refreshTokenParams);

Unit Tests

  • Visual Studio Test C#.NET Project 2013, 2012, 2010, and 2008

  • Visual Studio Agents 2010 - ISO: http://www.microsoft.com/en-us/download/details.aspx?id=1334

    • Visual Studio Agents 2010 includes Test Controller 2010, Test Agent 2010 and Lab Agent 2010. Test Controller 2010 and Test Agent 2010 collectively enable scale-out load generation, distributed data collection, and distributed test execution. Lab Agent 2010 manages testing, workflow and network isolation for virtual machines used with Visual Studio Lab Management 2010.

Or

Build Output Path

Visual Studio Output Path
2013 Build\bin\[Configuration]\net451
2012 Build\bin\[Configuration]\net45
2010 Build\bin\[Configuration]\net40
2008 Build\bin\[Configuration]\net35
2005 Build\bin\[Configuration]\net20

License

  • PayPal, Inc. SDK License - LICENSE.txt

sdk-core-dotnet's People

Contributors

aganzha avatar aydiv avatar braebot avatar buntyjoshi avatar freeboarder avatar ganeshx avatar jziaja avatar kumaravel-jayakumar avatar lathavairamani avatar lvairamani avatar prannamalai avatar sankarbhavanib avatar siddick avatar sychevigor avatar taylorc avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.