How to integrate PayPal with .Net Core

In this article I am going to explain how you can integrate PayPal express checkout with Asp .Net Core using REST API to process payments.

1- Download the sample project

I have created an Asp.net core project using VS 2017 for you. You can download it from Github https://github.com/rizksobhi/PaypalExpressCheckout

2- Create a PayPal App

Go to PayPal developer , and under REST API apps click Create App

CreateApp

3- Update ClientID and Client Secret

Copy the ClientID and Secret from Sandbox and update appsettings.json in the PayPalExpressCheckout.Web application

AppSecret

appsettings

4- Update Payee and Payer information

Go to PayPalServices and update the Payee email and merchant_id

PayeeInfo

For testing purposes, PayPal provides testing accounts that you can create under your PayPal account. You can create test buyer and seller accounts from Sandbox environment for testing

To create test accounts, go to Sandbox -> Accounts and click on Create Account and follow the instructions

TestPaymentAccounts

6- Build and Run the solution. YOU ARE ALL SET.

5 thoughts on “How to integrate PayPal with .Net Core

  1. I am having some trouble getting the app to start. The Index view fails to show at all.
    Could you please provide some insight as to why this may be happening.
    I am using VS 2017. I have followed your instructions exactly.
    All changes with respect to payee and merchant have been completed.

    Like

Leave a comment