|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/10/2003 Posts: 2 Location: ,
|
Hi
Has somebody PayPal used inside Struts ?
Thanks for hints and examples
Regards Munot
|
|
|
|
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/2/2004 Posts: 2 Location: ,
|
Hi Munot --
I'm actually beginning to build a site using struts and paypal to accept payment.
I'll keep you update as I work on it.
Regards,
Corey Leong OpenMLS
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by munot [br]Hi
Has somebody PayPal used inside Struts ? Thanks for hints and examples
Regards Munot <hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/24/2004 Posts: 10 Location: ,
|
and here's another struts developer!
Hi. Thanx for the link to here Corey. :)
I guess what I want to do is hook up my site to paypal so that my site can tell *in real-time* whether the customer purchased or not.
paypal doesn't look like it can interact like that very easily.
paypal handles the payment transaction on their own site and the only feedback returned is (1) customer forwarded to either my own success-page or cancel-page and (2) paypal email to me
I'm thinking of using my success-page, to which paypal forwards the user after a successful transaction. Apart from the security issues and people attempting to fake it, is this technically realistic?
Munot, what are planning?
I want to feel your sweet embrace But don't take that paper bag off of your face
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/24/2004 Posts: 10 Location: ,
|
Sorry for being not looking first. I guess I'll spend some time reading up about IPN :O
Adam
I want to feel your sweet embrace But don't take that paper bag off of your face
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 2/26/2004 Posts: 7 Location: ,
|
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by TreeHugger [br] I guess what I want to do is hook up my site to paypal so that my site can tell *in real-time* whether the customer purchased or not.
paypal doesn't look like it can interact like that very easily.
paypal handles the payment transaction on their own site and the only feedback returned is (1) customer forwarded to either my own success-page or cancel-page and (2) paypal email to me
I'm thinking of using my success-page, to which paypal forwards the user after a successful transaction. Apart from the security issues and people attempting to fake it, is this technically realistic? <hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
One of my websites is Struts-based, and uses PayPal IPN to process payments in real-time, plus it's secure (uses SSL to call back to PayPal to confirm the payment details). It's been up and running since late last year, and no problems yet (except when the verisign certs bundled with the JVM expired... that was a pain; luckily my code reverted to http when https failed).
Basically, my payments page is a jsp that builds the form fields for the buttons, and fills in customer id, email, etc. into relevant fields (or passthrough). Then I have an IpnAction class (mapped to the URL that I configured IPN to use), and an IpnForm to go along with it (with a field for each of the IPN params). The action uses another class (IpnUtils.java) to confirm the transaction with paypal via https and validate the details, and it sends email to me if the details look funny in any way (i.e., settle_amt is not as expected, etc.). If the validation comes back with any serious error, I send back a HttpServletResponse.SC_UNAUTHORIZED. If it's fine (or has only warnings), I credit the customer in the database and redirect to a small text file (probably could be empty, actually; mine has "success!" in it.
From the customer's point of view, they make the payment (bing, in the background IPN is running), and they are redirected to my paymentSuccess.jsp, which tells them their payment has been processed and they can click here to sign in. They sign in, and since the database has been updated, it all works seamlessly. The paymentSuccess.jsp actually gets all of the IPN info posted to it again, but I don't use it there.
So... I could make the code available, but it would take time to make it generic enough to meet most people's needs, plus there's something wrong about giving something away for free that people will use to *collect money*. I do occasional open source work, but mostly I'm a freelance developer -- I'd be happy to develop a Java IPN library (including an Action superclass for easy Struts development) for PayPal to give away if they want to pay for it (anyone listening?) but it's just not the greatest candidate for open source or freeware.
(That said, I guess I did describe my code pretty thoroughly above... oh well).
~ jtheory
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/11/2004 Posts: 4 Location: ,
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 2/26/2004 Posts: 7 Location: ,
|
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> Originally posted by richard.2008[br]You can try this: http://www.softwarebasic.com/products.html#demo
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote"> Pricing for the above (it's only free for fewer than 5 PayPal transactions per day): http://www.softwarebasic.com/purchase.html
Also note that source code doesn't seem to be available. This could be worth it if you don't do too many transactions per day, or don't have the experience necessary to code your own -- but seriously, folks, if you're a reasonably experienced Java developer, IPN support is pretty straightforward to implement.
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 8/10/2007 Posts: 2 Location: ,
|
What do you mean you wouldn't help with something that people could profit from? Do hosting companies not profit from tomcat or apache? Are you not charging for services as a freelancer to develop with free open source products? It isn't your 'payment solution' they will be making money off of, it is there service or product they are selling.
Integrating IPN with struts is cake. Download the basic java tutorial and get to know the interaction. Once you understand that it is just another step in your application flow. Add products to a cart, total the cart, get user info, persist pre-transaction, send to paypal, wait for response from paypal, persist post-transaction, forward to success page.
I'd be happy to publish a generic struts example application. I'll put it on sourceforge.
|
|
|
|
Guest
|
YAFVision Theme by Jaben Cargman (Tiny Gecko)Powered by YAF 1.9.3 |
YAF © 2003-2009, Yet Another Forum.NETThis page was generated in 0.634 seconds.