Java paypal integration Tutorial

Paypal is the one of the famous payment gateway within the world.It is commonly used by multiple website in web world.I am just sharing my idea about the Paypal with java integration.

Paypal is providing the developer guideline and url where we can test our local application.wewill use the express checkout method for payment in this example. 1. Open the paypal developer link
2. We need to create two different email address , One for Merchant and other for buyer respectively.
3. Click on “Sign Up Now” button.
4. Enter the your information to access the sandbox environment.
5. Click on “Agree and Submit” button.
6. Now login with given username/password.
7. Click on “Test Account” link
8. Create a new test account and provide the details in textfields also.
9. Select the “Account Type” as you want either “Merchant”  or “buyer”
10.It will generate the default email id for us.
11.Set Credit card information as “NONE” .
12.Set the balance amount for your account.

As per my acknowledgement ,you have created both merchant and buyer account within your account. 13.Now click on the “API Credentials” link
14.Copy the your API username, API password and Singature.

Now Our paypal configuration has been done. Now we will create the web project in eciplse.

1. Create the following JSP files in WEBROOT path paypalpay.jsp

2. Put the following code in paypalpay.jsp 1. Set your generated API username,API password and API Singature at their place.
2. You can also set the following value like item name,amount ,custom charge and rm
3. You can also set return and cancel return URL for your application.

<html><head><title>Pay through PayPal:</title></head><bodyonload="document.forms['paypalForm'].submit();"><formname="paypalForm"action=""method="post"> <inputtype="hidden"name="cmd"value="_xclick"/> <inputtype="hidden"name="business"value="API username"/> <inputtype="hidden"name="password"value="API password"/> <inputtype="hidden"name="custom"value="1123"/> <inputtype="hidden"name="item_name"value="Computer-Laptop"/> <inputtype="hidden"name="amount"value="30"/> <inputtype="hidden"name="rm"value="1"/> <inputtype="hidden"name="return"value="http://localhost:8080/PaypalGS/paypalResponse.jsp"/> <inputtype="hidden"name="cancel_return"value="http://localhost:8080/PaypalGS/paypalResponseCancel.jsp"/> <inputtype="hidden"name="cert_id"value="API Singature"/></form></body></html>

Review Date
Reviewed Item
Java paypal integration Tutorial
Author Rating

4 thoughts on “Java paypal integration Tutorial”

Leave a Reply

Your email address will not be published. Required fields are marked *