My business uses Invoice Ninja ([url removed, login to view]) as a billing and invoicing solution, and it is a nice fit as my business do a lot of freelancing work, both one-off and recurring.
We have set up payments via Paypal and they do work seamlessly, but now we need to integrate a brazilian payment gateway called Paghiper ([url removed, login to view]). Paghiper allows us to send 'boletos' (payment slips) which are rather common in Brazil, and especially needed for recurring invoices.
So what we need is an integration between these two. Whenever a client receives an invoice from Invoice Ninja, he or she can view that invoice online and then click PAY, which will show all available payment options. Whenever he or she chooses Paghiper, this will trigger the integration, pass some data to Paghiper which in turn will generate the 'boleto' and send it back to Invoice Ninja, which will need to display that 'boleto' to the client, so he can view or print it ('boletos' are printed and then paid in cash at participating locations, or via internet banking by reading or pasting the barcode).
Additionally, Paghiper will post a notification to a custom URL when that payment is approved (which happens 1-2 days later). This integration must also process this notification and update invoices and balances accordingly.
Invoice Ninja seems to use a library called Omnipay ([url removed, login to view]) to implement its payment integrations, so you might want to check this out first.
If you have any questions about this, just let me know. I will also gladly provide any documentations and explanations translated to english if you need to.