I am writing a stand alone Ruby script to generate an invoice as a PDF file. Everything is working well so far.
I’d like to know how do I connect to my PayPal account in this script and send a “Request Payment” to the purchaser?
Currently, after I generate the PDF invoice offline with my Ruby script, I need to log onto PayPal manually, and click on the “Request Money” tab in PayPal, type in the recipient’s email address, enter the amount, etc. and click “Request”.
I want to see if there is a way to automate the PayPal request money part.
This is a stand alone Ruby script, not Ruby on Rails or a web application.
Mechanize is a good gem for mimicking user actions on websites. You can use this to script any action you would otherwise perform as a user and get the results you need in your script.