Using PayPal .NET SDK to replace legacy SOAP operations, advice - c#

This is more advice on how to go about upgrading to the PayPal .NET SDK. I've been playing with the SDK using the Nuget package and I'm able to stumble through most of the examples I can find. The issue is that some of the stuff we are already doing uses features from the other apis like merchant sdk dotnet
which is about to be deprecated. We are doing everything using the legacy stuff and i'm just not sure what the equivalent of those things are in the new API.
Here's what we are currently doing:
Accept PayPal Payment using Set/Get/Do Express Checkout
Accept credit cards using pay flow pro:
We get an authorized payment and then store the transaction id. This allows for saved payments without saving credit card numbers.
We do a sale payment by passing in a reference transaction id.
As an overview what we are trying to support is the ability to use paypal to checkout without a credit card, or allow the customer to pay with credit cards that can be saved and used again later. It would also be nice to add the lightbox or mini browser feature so the customer doesn't have to leave our site.
From what i understand so far, and please correct me if i'm wrong, is that to do the express checkout features we should start using the REST create payment function and pass paypal as the payment method. This returns a paymentId and a payerId that i can use later to execute a payment. I think i'm ok with all of that, but i am confused as to why the token that is returned doesnt work for getting the payment, i have to get a fresh token. I'm also not sure how to accomplish this inside a lightbox or mini browser.
I have also figured out how to do a REST payment with credit_card as the payment method, and i see that there is a way to save a payment to their vault. Am i correct in assuming that the REST api will not support payflow pro and that to accomplish what we were doing before with reference transactions and saved payments we need to move to the vault methods?

I can certainly help you with your Express Checkout requirement.
You can leverage PaySharp.NET in order to provide Express Checkout functionality. This SDK encapsulates the REST and HTML-parsing boilerplates necessary to fulfil an Express Checkout transaction. It also exposes async functionality.
This library removes the complexities of interfacing with PayPal, and provides PayPal metadata in comprehensible POCOs.

Related

How to charge pay pal customers manually

Is that possible to charge paypal customer manually. I can do it like user get redirected to paypal to confirm all the details but i do need that user allow my system to charge him every month without any confirmations from his side.
Currently i'm using the same approach as listed Paypal .Net Sdk example
But it doesn't have such a func to manually charge a user. If someone could chare links it'd be grateful.
Thanks in advance.
without any confirmations from his side.
That would require having a billing agreement on file. There are some reference transactions or "future payments" API solutions that use this, but the feature requires business approval from PayPal.
An alternative that does require confirmation from the buyer would be to send them a PayPal invoice, manually via https://www.paypal.com/invoice/create or programmatically via the Invoices API

Paypal Adaptive Payments as guest

I have some questions about Paypal adaptive payments as guest:
Do the users that want to do a purchase using their credit card information require a PayPal acount?, Is there any way to avoid this?. I'm considering to have many clients on my site thay may not have PayPal account.
Does guest payment supports the Parallel payment Schema or the Chained payment Schema?
If I'm using the guest payment default interface (the one provided by PayPal), should I still worry about having my site to be PCI compliant?. I'm not storing any credit card information about the users.
I've tried to find examples about how to invoke the adaptive payment api to get the Guest payment working without any success. Does anyone know where can I find an example for this?
Is Adaptive payment a feature of Paypal Standard?, or do I need to get the PayPal Pro subscription in order to get the Adaptive Payment Api working on my site.
Can anyone give me some assistance with all these?. Thanks a lot.
Well, here's what i found so far:
Do the users that want to do a purchase using their credit card information require a PayPal acount?, Is there any way to avoid this?. I'm considering to have many clients on my site thay may not have PayPal account.
Not required. You can use adaptive payments and pay as guest. Both Rest API and classic API support this payment schema. The Rest API relies on your site to handle security and PCI complience, on the second one is handled by paypal.
Does guest payment supports the Parallel payment Schema or the Chained
payment Schema?
Clasic API adaptive payments support to add multiple receivers and amounts when sendin payments, so yes, it is supported with this schema. Not sure about Rest API. The examples that I've found use just the Paypal to Paypal schema.
If I'm using the guest payment default interface (the one provided by
PayPal), should I still worry about having my site to be PCI
compliant?. I'm not storing any credit card information about the
users.
If you're using native Embedded payment flow with the dialogs and the javascript functions that paypal provides, no, it is not required. Paypal takes care of this for you. If you're using the Rest API, you have to use the payment with creditcard stored on paypal vault (however this force the buyer to have a paypal account). If you're using the Rest API to get credit card data, you have to design your site to be PCI Compliant.
I've tried to find examples about how to invoke the adaptive payment api to get the Guest payment working without any success. Does anyone know where can I find an example for this?
https://developer.paypal.com/webapps/developer/docs/classic/adaptive-payments/integration-guide/APIntro/ has Embedded flow example (however its really vague), http://paypal.github.io/ has examples for classic api implementation
Is Adaptive payment a feature of Paypal Standard?, or do I need to get the PayPal Pro subscription in order to get the Adaptive Payment Api working on my site.
Paypal pro is an account feature, not really related with the API for adaptive payments, or at least that is what I've found so far.

Paypal payment processing

I've checked out the resources on PayPal's site, but I'm having trouble figuring out how to setup recurring payments from a "create account" form I've created in C#.
My goals is to have a text field called "username" that's disabled and enables when the user processes their payment through Paypal by clicking on a link that opens the payment page in their browser. I want to then save some kind of ID associated with that transaction that my application can look up when the user logs in to make sure they still have an active subscription.
All that being said, I have two questions. One, is there a good walk though for someone who doesn't know much about SOAP or anything of the sort? Possibly geared toward Paypal? Second, does Paypal give some kind of static transaction ID that I can look up via Paypal when the user logs in?
I'm also open to other payment processing methods, but I want to stick with WinForms for a while.
You can use the CreateRecurringPaymentsProfile to create the subscription with PayPal. If you don't like working with SOAP you can use their basic NVP API, which is what that link points to.
When you make that call to create the profile you'll get back a PROFILEID. This profile ID can be passed into GetRecurringPaymentsProfileDetails to check the current status upon login.
Since you're using C# I'd recommend taking a look at this .NET SDK for PayPal. It makes the calls very simple for you.

Paypal Recurring Payment - Express Checkout APPID rejected

I am using Paypal Express Checkout to make recurring payment and deduct intial amount.
Here are my steps:
I redirect the user to paypal with agreement and get the token
Use this token to deduct initial amount
and then use the same token to create a recurring profile.
This worked well in the sandbox.
Now i need to get an app_id to make it live.
The problem is the paypal reject this saying:
"but i am still seeing the payment as a 'Standard' checkout, rather than a Preapproved Payment. Preapprovals would be used to create a Billing Agreement with your users which can be debited later "
Can you please advice something?
FINDINGS:
While getting token there is no way to show that we are creating recurring profile that might be the reason they rejected it.
But i am using the same code they provide
https://www.x.com/developers/paypal/documentation-tools/paypal-sdk-index
Express Checkout and Recurring Payments does not require an App ID. Those are only required when you're using the Adaptive Payments API. Express Checkout is not part of the Adaptive Payments API. That's what they're telling you...you simply don't need an App ID. If you're passing one in the sandbox it must be getting ignored.
If you have everything working as you want it in the sandbox just change your endpoints and your API credentials to the live values and it'll work for you.

How to use PayPal API to create checkout with items list and discoutn code?

I'm using the Web Standards Payment and I think it is not secure because the user can edit it anytime and add a discount code.
I'm planning on switching to use PayPal's API but I have no idea how to use it.
Do you guys have any sample codes on how to use it with ASP.NET C# which can support multiple items and discount codes.
All I want to accomplish is a simple checkout and nothing fancy.
Thank you very much in advance!
You should be using a secure SSL connection to prevent tampering. You should also be using PayPal's IPN to confirm that the amount sent to PayPal matches up with the original prices(s). You can use the freely available IPN class from XDev Software to assist with this.
I put out a series of three articles on integrating PayPal with ASP.NET, feel free to use the code:
http://www.codersbarn.com/?tag=/paypal

Categories