If there is an API on Paypal where you can retrieve the information, I would create a desktop app (or an administrative method in the web app, that users cannot access), and use a timer to trigger a scan of Paypal registration info with the method. New accounts would be added to the database. A scan every 5 minutes or so seems appropriate, but I would probably check with Paypal docs to see whether that frequency is allowed.
Guys . . . I could really use some help here, please.
I’m using a php ipn listener for payments through PayPal. Right now it just sends me and the new users emails with php generated username and password.
I need the php ipn listener to open my SQLite users database and insert the new user with his username and password.
Seems like this is something you smart folks have probably done time and again. I’ll take any help available.
Please note that the users database is on a different server than the listener.
[quote=121128:@John Scanlan]Guys . . . I could really use some help here, please.
I’m using a php ipn listener for payments through PayPal. Right now it just sends me and the new users emails with php generated username and password.
I need the php ipn listener to open my SQLite users database and insert the new user with his username and password.
Seems like this is something you smart folks have probably done time and again. I’ll take any help available.
Please note that the users database is on a different server than the listener.[/quote]
I use a php listener to send customers download instructions, and a copy of that to me. The same script saves a log of all operations that the download interface which is a Xojo Web app uses to verify the credential of the user before initiating the download. All are on the same server.
Since your database is on another server, the best way would be to use a web service on your database application which uses the /special directory and HandleSpecialURL to receive the new user username and password. You will have to hash the information in your php and decrypt it on arrival in the Web app, but it seems relatively simple to create. Of course the password must be stored encrypted in the database.
Really what I’m doing than is your first suggestion, the database. The problem I’m having is understanding php well enough to open the database and write to it. remember . . . amateur here.
No problem. I was talking general principles and not nitty gritty.
It would be a lot simpler if you could install the PHP on the same server as your app. That would allow you to keep a log of transactions in a text file that your app will read. For my customers, I use the Paypal transaction number and their email address as credential. You could do the same for the first access to your app and then the user can change.
If the PHP must reside on another site, then it will be necessary to have it contact your app through specialurl, so your app can add the credentials.
In both cases, you will need to learn a bit of PHP.
I’ve been able to rebuild a paypal listener to my purposes. I generate a username and password for the clients and they can change them upon going to the app. The problem is that they have to wait for me to enter them in the users database. I’d like to allow them to sign up and get to work right away.
btw, the program is a gymnastics routine evaluator.
What I’ve tried so far is to open the database and print an opened successfully notice to my notice email.
Can I just send data to and automatically start an app that will add the user to the database?
Then in you webapp, use the HandleSpecialURL to get the query string with request.QueryString and act accordingly. Since you will be dealing with sensitive information, you want to make sure nobody but you can use specialurl, so you need to encrypt mydata and include a way to verify the request really came from your listener.
See /Xojo 2014 Release 2.1/Example Projects/Web/QuoteService-SpecialURL.xojo_binary_project
Then in you webapp, use the HandleSpecialURL to get the query string with request.QueryString and act accordingly. Since you will be dealing with sensitive information, you want to make sure nobody but you can use specialurl, so you need to encrypt mydata and include a way to verify the request really came from your listener.
See /Xojo 2014 Release 2.1/Example Projects/Web/QuoteService-SpecialURL.xojo_binary_project[/quote]
If you’re using usernames and passwords, please use an ssl certificate with your app and only use hashed passwords. That way its less likely that any one users account will be stolen (https) and if the database is taken, you’re not giving away everyone’s passwords as well. Come to think of it, if you’re using sqlite, you should add an encryption key as well.
turns out I can put my ipn listener on the server (one of phillips’). I’m getting the IPN successfully sent message, but can’t get an email. I’ve cut out everything out of my listener except this:
// read the post from PayPal system and add ‘cmd’
$req = ‘cmd=_notify-validate’;
// post back to PayPal system to validate
$header = "POST /cgi-bin/webscr HTTP/1.0\r
";
I did not want to say anything when you wrote Phillip was blocking email, but I have been on 1701 for a while and my php script for online delivery has been faithfully sending email to my customer all along