The detailed research introduces how to use “PayPal payment transaction without navigation” using C# code. Today, PayPal is taken as most popular payment mode for online shopping. With this wonderful framework, money can be received or paid within seconds. This is the reason why online merchants are looking for suitable ways to integrate PayPal payment option with their online stores.
We have compiled this technical solution during one of our projects and it is working successfully with it. We are sure the solution will be helpful for programmers seeking for best possible ways to integrate PayPal payment option with their projects.
We are introducing how to use Paypal transaction API without navigation UI. We will simply get everything done by request/response using C# code. In this example, we will call DoDirectPayment method to do Direct Paypal payment Transaction using the API.
But before we are going to develop C# side code, we require some stuff on Paypal application too. So let's start with that first.
If you don't have a Paypal developer account then you need to create a new developers PayPal account by visiting https://developer.paypal.com and click the Sign Up Now button as shown below:
- Fill up your profile details and click on Agree and Continue button to register in Paypal Developer Account.
- After Successfully registration of a paypal developer Account you will be redirect on below page. Click on Application menu as on below page.
- Click on SandBox (Testing) Account as on below page. You will be redirect to your paypal sandbox profile page. Note that Sandbox account is for testing purpose for developers only. While dealing with real environment we need live accounts.
- Click on Profile Link to see your Profile details. You will get your profile details in Popup.
- Click on Upgrade to Pro Link as below to upgrade your paypal Sandbox Account from normal to Pro.
- Go to API credential tab in your in your Account details to see your API credential. You can see you API credential as below and you can use it in your DoDirectPayment method for transaction.
- Now go to your Asp.net Application where you want use Payapal payment Integration to Do payment. - Download and Add two DLL given below in your application. Give a reference of it in references. log4net.dll and paypal_base.dll - Add a Class file with name PaypalTransaction.cs and Add below libraries.
You will get success or error code and message at the end to do further process. PaypalTransaction class can be your custom class to return required values. So you can customize it anyway you want.
Note : Payment will be deducted from your (testing) credit card not from Paypal Account in this case. For Paypal account deduction you need to use other method. It will be credited in your other Paypal account which credential you have used in method if transaction is successfull.
Same way you can use other methods like GetBalance, DoExpressCheckoutPayment, ... given in this API Explorer.
For the successful transaction, money will be deducted from your credit card not from your PayPal account and it will be added to other PayPal account as per given credentials. If you want that money should get deducted from your PayPal account then you have to make some changes in coding section. For more powerful solutions and practical approaches, stay tuned with us. We believe in sharing quality information that is useful for modern world and highly in demand.
For further information, mail us at email@example.com