hello i would like to charge a user using paypal or any other way you think that is better but i want when i charge the user i want to update my database. the application is in jsf any suggestion how i implement the solution? that you very much

by writing the code?

what do you mean? how i can implement the solution?

the first thing you'll need is a decent analysis: what are your requirements, what security do you have, ....

next, if you want to use paypal (for instance), no doubt there is already stuff that exists and you can use:

This, for instance, is a Java library written to access paypal, but if you use it, you are restricted to the functionalities it offers.

if you would need something 'more', or something completely different, there are always the Paypal SDK's, which allow you to write your own implementation. once you've done that, implementing it is the same as implementing any other library.

I do not want to keep credit card information in my web site database so i want an easy way to charge the user and inserting the information at the database. It is a website for excursions and i want the user to pay for an excursion and when he had paid all the required information to be register at the database. I tried to do it with paypal apn but cause i am in localhost i can not try and fix it. I have spend more than a week without finding a solution. Could you give me some guidance how i can implement this?
Thank you very much for your help

who is talking about keeping that data? all you need to do is provide some way for the user to either be linked to the paypal page, with the information about the transaction (what amount to be transferred, to which account) and the necessary paypal information (user account/password).
nobody says you need to store any information, though it would be advised to keep some kind of record of "a transaction for ... $ has been executed"
but all the vital information that has to be "stored", as the payers account information and such, is all in the paypal db's. you don't need to be concerned about that.

I know what you mean but i would like to update my application database information so i can see the reservations the user has done. Only for this reason i want to keep the information on the database. Like for the date ... X adults, Y children, Z infants for the excursion type ..... Something like this i want to do is it possible?

sure, why not?

input : paypalInformation, date, nrAdults, excursionType
insert in DB : date, nrAdults, excursionType

So you mean after the reservation has been done the administrator of the site will go and insert these informations manual at the database of the site? Or i missunderstand? Lets say the user click on pay. Going to the paypal site to pay. Log in and pay. The user receive the payment and the invoice. But the owner of the site should log in to the site and insert all the informations to the site? Or there is a more automatic way to update the database?
Thank you very much for your help

no administrator in the world would go through all that fuss. if you want to store that information, you need to implement it in your code.

read information to process{
  perform transaction
  store data in db
  re-direct user to screen informing of success/failure
}

Ok the problem is that i read the information i want. I redirect to the paypal page so the user can pay. But the problem is that i want my database to be updated with the required information when the user actual pay. The ipn paypal is the only solution i found but i can not find the way to do it.
Can you suggest me a way to fix it?
Thank you very much

I have never used a paypal library, so I won't be able to provide the details, no.
I'm also not sure on whether or not there is a thread or listener that returns a flag when the payment is actually executed, or whether it is possible to write an own implementation for that functionality.

the best way to start is to research the paypal api's in existence: what are their possibilities, and also: how well are they documented.

if they don't offer what you need, go for the sdk's and see if you can come up with your own implementation to serve your needs.

Do you have in mind any other implementation that i can do it? I am trying with the listener but i have problem with testing it cause the ipn listener can not play at localhost:8084 only at localhost:80. So i have to change all my net to check it
Thank you very much

I must say I'm not a big fan of paypal, I'm using GPN DATA maybe you would like to read about this, I think it's much better payment service provider :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.