-2

Firstly this is my first question so I apologize if it not up to standards.

TL:DR -

I need to be able to get a notification of a Paypal transaction with the amount, and message, if any to an IRC bot. I am thinking about a webpage to take the transaction and notify the bot. I was hoping to use PHP for the webpage and this for the IRC bot: willie.dftba.net - An open source Python IRC Bot.

Long Format -

Context:

I am attempting to create a webpage that will take a Paypal transaction, then send a notification containing the amount and the message the user left(if any) to the IRC Bot.

The reasoning behind using a webpage over having the bot query the Paypal API directly is to avoid spamming Paypal while at the same time reducing the communication to a notification only when an event occurs.

The webpage will likely be running on a hosted webserver that I have little control over. I am familiar with PHP, my Javascript is not so great though.

The IRC bot has not yet been created, I was hoping to utilize willie.dftba.net for the bot, it's Open source and in Python. The bot will be running on a Windows machine most likely. Other options for IRC bots should probably be left to the comments. The bot will be doing other things outside the scope of this question. Though this is a critical function for the bot.

Answers I'm looking for:

What sort of technologies or libraries for the languages I am trying to use can help me achieve this as simply as possible? Please state why.

Suggestions that are within the scope of this question:

Using different technologies, languages, or APIs than I mentioned if it will make the job easier/faster. Please state why.

Why am I asking?

I am asking this question because there seems to many possible technologies or APIs I could utilize but I am not experienced enough to ascertain which route I should head down. I am honestly at a loss right now.

Background on my Knowledge & Experience:

For web technologies, I am familiar with HTML, PHP CSS, & a little Javascript. For programming languages I have taken a few classes covering basic C++, Visual Basic .NET, and some Java.

I have messed around with Python a little over a decade ago when modding a game.

I have created, or helped to create a dozen or so smaller websites. I have used things like Jquery before but in an extremely limited fashion, my PHP is much stronger than my Javascript.

I have made a few simple command line C++ & Java programs as learning exercises.

I have made many simple VB.NET applications and 3 practical use, but small applications.

Research I have conducted:

I have searched Google, and here for possibilities, and have several links that I have looked through. While I must admit I have not read every single word on every single link, I have read a fair portion and skimmed a lot of the rest. And clicked on many links within the pages I am about to reference here. For the sake of not posting the entire internet, I am only posting the starting links.

After typing this all up, I discovered it will not let me post more than two links so I have had to alter these links.

  • willie.dftba.net

  • php.net/manual/en/book.sockets.php

  • socket.io

  • www.npmjs.com/package/socket.io

  • stackoverflow.com/questions/6398887/using-php-with-socket-io

  • www.htmlgoodies.com/html5/other/create-a-bi-directional-connection-to-a-php-server-using-html5-websockets.html#fbid=XmAMX7ESMm7

  • stackoverflow.com/questions/14418950/broadcast-notification-to-multiple-users-at-the-same-time-php-mysql-ajax

  • cometdaily.com/maturity.html

  • stackoverflow.com/questions/12284565/how-to-communicate-between-a-php-and-a-c-application-through-a-socket

  • davidwalsh.name/nodejs-irc

  • sourceforge.net/projects/phpsmartirc/

Final Thoughts:

Thank for reading this question and devoting some of your time and energy to this question, it is highly appreciated! I really hope I have been thorough & specific enough.

Raletia
  • 1
  • 2
  • "What sort of technologies or libraries for the languages I am trying to use can help me achieve this as simply as possible? Please state why." This is an off topic request. If you are having problem with specific code, we'd be happy to help, but we are not going to continue your research for you. – Andy Feb 07 '15 at 14:14
  • I apologize, I don't intend that, I just want to know where to look. The intent behind stating why was to help others who may read this question in the future. What suggestions would you have to improve this question? – Raletia Feb 07 '15 at 14:23
  • Pick a language and a library and try something. If you get stuck come back here with a specific question and code that you've tried. – Andy Feb 07 '15 at 14:25
  • Alright, thank you. What should I do with this question now? – Raletia Feb 07 '15 at 14:28
  • Leave it for the record. If some mod thinks it should be closed, it will be closed for you. Your "problem" is not bad at all, it just leaves too much room to be answered. As the others said: start off, try things. Come back with more specific problems. You can then edit this question, maybe. – Dr. Jan-Philip Gehrcke Feb 07 '15 at 16:13
  • Alright will do, thank you Jan, I appreciate your advice. I'll try some things out and come back when I get stuck or have a more specific question. I really did try to make a proper question, I spent over an hour on it double checking things and editing to make it more specific and thoroughly add details etc. etc. – Raletia Feb 08 '15 at 10:50

1 Answers1

0

You've been pretty broad with your questions, so I'll be broad with my answer.

I would recommend sticking with PHP and setting up an Instant Payment Notification (IPN) solution for your PayPal account.

That will send POST data about any transaction that hits in your PayPal account in real-time. You can use it to automate tasks based on payments, refunds, disputes, cleared payments when they're pending, etc.

There are lots of good IPN packages for PHP available on GitHub/Packagist. If you happen to be working with WordPress, take a look at my PayPal IPN for WordPress plugin, and on that note, if you are using WordPress I'll assume you're using WooCommerce, so I'd also take a look at my PayPal for WooCommerce plugin.

For API calls, I would recommend taking a look at my class library for PayPal. It will make any API call you need to make with PayPal very quick and easy, and it is also available on GitHub and Packagist.

Those tools should give you everything you need to get any PayPal task you need done.

Drew Angell
  • 25,968
  • 5
  • 32
  • 51
  • Won't let me vote it up one, but thank you very much! This will be helpful for the Paypal stuff. I can already tell though that one mistake in my question is it doesn't seem to make it clear enough that the primary issue is getting messages from the PHP form interacting with Paypal to the IRC bot running on another machine, over the internet. I really appreciate you taking the time to answer and I apologize for the question being overly broad. I have bookmarked your library. – Raletia Feb 08 '15 at 10:55
  • Well, I did grasp your goal, and that's what I outlined here. To sum it up, your PHP form could utilize Express Checkout (which you can integrate with my class library very easily) to process a payment. That payment would then trigger an IPN, which automatically sends data about the transaction to your IPN solution, and within that you can push data to your IRC bot, or save to a database or XML feed and pull from the bot, or however that part would work. – Drew Angell Feb 08 '15 at 11:56
  • Ah right! Ok, I get it now. So that means I can just keep the payment part and the notification part separate then and not even have to fuss with it in payment page. Thank you again. – Raletia Feb 09 '15 at 00:03