PayPal-NET-SDK | .NET SDK for PayPal 's RESTful APIs | REST library
kandi X-RAY | PayPal-NET-SDK Summary
kandi X-RAY | PayPal-NET-SDK Summary
The PayPal .NET SDK makes it easy to add PayPal support to your .NET web application and is built on PayPal's REST APIs.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of PayPal-NET-SDK
PayPal-NET-SDK Key Features
PayPal-NET-SDK Examples and Code Snippets
Community Discussions
Trending Discussions on PayPal-NET-SDK
QUESTION
I'm using the PayPal SDK nuget package to process online orders on my website. The issue is all products are set as "physical" by default.
In this link PayPal shows how to set the type of an order/product https://developer.paypal.com/docs/api/catalog-products/v1/
But in the PayPal asp.net sdk, there's nothing like that. https://paypal.github.io/PayPal-NET-SDK/Samples/PaymentWithPayPal.aspx.html
Has anyone had any experience with this or is able to find out how to set products/orders as "Service" or "Digital" through the sdk?
...ANSWER
Answered 2020-Sep-27 at 19:54First of all the v1/payments PayPal-NET-SDK is deprecated, use the v2/checkout/orders Checkout-NET-SDK instead
Secondly the catalog-products API only applies to things like subscription payments. If you aren't creating products for subscription plans, this API is not relevant to you.
With the v2 items API, if your purchase_units includes an items
array (and the required separate amount_breakdown
, in cases of passing an items array) , there is a category
field for each item: https://developer.paypal.com/docs/api/orders/v2/#definition-item
The above is getting a little in to the weeds though, when you probably should first take a step back and review the basics of implementing a v2 checkout.
Create two routes on your server, one for 'Set Up Transaction' and another for 'Capture Transaction', documented here: https://developer.paypal.com/docs/checkout/reference/server-integration/
Then connect to them with this front-end for the payer approval: https://developer.paypal.com/demo/checkout/#/pattern/server
QUESTION
does anyone know the state of the Paypal .NET SDK? I just wonder, according to https://github.com/paypal/PayPal-NET-SDK/releases, the latest version is a V2.0 Release Candidate, but it is already 2 years old, and it seems like there was never an actual V2.0 release. Has this project died? Should I rather use the Paypal REST API directly?
...ANSWER
Answered 2020-Mar-18 at 17:10Don't use any version of the v1 PayPal-NET-SDK (neither 1.x nor 2.0 rc2)
Use the new v2 Checkout-NET-SDK
If it does not (yet) support the API you want to integrate (e.g. the new Subscriptions API would be one example), then use direct HTTPS calls for that REST API
QUESTION
I am trying to run payments through PayPal in sandbox mode with my .NET CORE 3 project. The idea is to give the customer ability to choose whether to pay using his/her PayPal account or Credit Card. I am using the PayPal-NET-SDK v2.0.0-rc2
I am trying to understand whether this is the right order to run things:
- Create Payment using
PaymentCreateRequest
- At this point, I get the approval_url. I redirect the customer and approve the payment/order using Credit Card
- Execute payment using
PaymentExecuteRequest
, using the PAYID and PAYERID I get from the redirect URL. Here I get an order object - Authorize order using
OrderAuthorizeRequest
with the order id (setting body to aPayPal.v1.Orders.Capture
object) - Capture order using
OrderCaptureRequest
with the order id (setting body to aPayPal.v1.Payments.Capture
object)
Is that a correct execution order?
...ANSWER
Answered 2020-Feb-02 at 21:45Rather than the old v1/payments, you should use v2/orders; the v2 SDK can be downloaded here
Rather than an old-style full page redirect to an approval_url , it's much nicer to use the new checkout's in-context UI that keeps your site loaded in the background. Here is a demo pattern. Another benefit is that it gives an embedded/in-line credit card form.
- As a finishing touch once you have everything working, don't neglect to gracefully handle/propagate funding failures back from your server, so the buyer can choose something else when declined.
If you start out with intent=capture(v2) or sale(v1), the capture(v2)/execution(v1) call will be final and complete the transaction, there will be no authorize step, so (4) on your list is skipable. (You should only bother with implementing something other than intent=capture/sale if you find you have a specific business need for delaying captures, as it adds complexity)
More general information on implementing the server-side portion of the integration: https://developer.paypal.com/docs/checkout/reference/server-integration/set-up-transaction/
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PayPal-NET-SDK
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page