简体   繁体   中英

How to integrate paypal api in .net core

I have searched a good tutorial for integrating paypal api in .net core, but I can't find anything that is well explained with the details.

If someone can provide me with one, or has any idea where I can search for, it will be perfect.

Firstly, install the SDK via Nugget. You will also need to create an account on Paypal to grab the client ID, and the secret ID.

As you are using .Net Core, you'll have to fill the Paypal config settings. Example below; 在此处输入图片说明

Next, you will need to create the endpoint (API methods) which creates the payment itself. Best practise is to create it asynchronously as shown below;

在此处输入图片说明

As you can see, there will be many situations that will have to be handled, such as cancelling payments, executing payments, creating payments, taking care of results and so forth... Above is just an example on how it would work with a HTTPGET request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM