• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Spring MVC Application with Paypal Integration

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Guys.

I'm using Payment gateway in our Spring Application.
let you know what I have done.
1: I created two account in https://developer.paypal.com/
2: and then we got two email id *[email protected] and *[email protected]
3: Now for Integration We added paypal configuration in Web.xml like below:
<context-param>
<param-name>posturl</param-name>
<param-value>https://www.sandbox.paypal.com/cgi-bin/webscr</param-value>;
</context-param>

<context-param>
<param-name>cmd</param-name>
<param-value>_donations</param-value>
</context-param>

<context-param>
<param-name>business</param-name>
<param-value>[email protected]</param-value>
</context-param>

<context-param>
<param-name>password</param-name>
<param-value>TL45FT5EQWYGLB</param-value>
</context-param>

<context-param>
<param-name>signature</param-name>
<param-value>AFcWxV21C7fd0v3bYasdadsadORY4DvFa</param-value>
</context-param>

<context-param>
<param-name>returnurl</param-name>
<param-value>http://localhost:8080/paypal/success</param-value>;
</context-param>

<context-param>
<param-name>cancelurl</param-name>
<param-value>http://localhost:8080/paypal/cancel</param-value>;
</context-param>


4: Now I made donation form in JSP page

<form action="${initParam['posturl']}" method="post">
<!-- Saved buttons use the "secure click" command -->
<input type="hidden" name="cmd" value="${initParam['cmd']}"/>
<input type="hidden" name="business" value="${initParam['business']}"/>
<input type="hidden" name="password" value="${initParam['password']}"/>
<input type="hidden" name="cert_id" value="${initParam['signature']}" />
<!-- Saved buttons are identified by their button IDs -->
<input type="hidden" name="amount" value="30"/>
<!-- Saved buttons display an appropriate button image. -->
<input type="hidden" name="cancel_return" value="${initParam['cancelurl']}" />
<input type="hidden" name="return" value="${initParam['returnurl']}" />
<input type="submit" name="Donate" value="Donation" />
</form>


5 : then When I'm donating money after login with palpay then we are getting receipt in Paypal page , but I want my page will directly redirect to my Success page with Transaction value.
but It's not happening like that. Please favour me.

Thanks
AJ

 
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I don't think you can disable paypal receipt page but you can definitely get the transaction values and the confirmation the payment was really made.

Here is the process:

When paypal redirect to your success page you read the following values:



-Before showing your success page to the user, you connect to paypal in the background and confirm the transaction with them and you will get even more details about the transaction.

-Then you can show the success page to the user.

You can also look at paypal IPN to get asynchronous notification but it is not needed. It just add another layer of robustness.

Just look at the documentation.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic