Hello, I recently had to write an application which handled payments to PayPal and PagSeguro (a Brazilian company). Not only to submit payments, but also to query and automatically change status when users payed, etc.
As there were many different modules for PayPal and only one for PagSeguro, but with completely different interfaces, I decided to write a kind of proxy for payments, just like PSGI does with servers. I wasn't aware that Business::OnlinePayments existed. But anyway, it doesn't have a way to query past payments (e.g. SearchTransactions in PayPal), and it doesn't have a PagSeguro driver. So what I'm trying to ask here is whether I should really make a new module (and namespace for more gateways), or just patch Business::OnlinePayments. I know that rewriting the wheel is a bad thing, but sometimes it brings improvements. I also contacted the author, to see what he thinks about this. I named my module CPI (Common Payment Interface). IMHO, a short name is good in this case, as it's a wrapper and a namespace for a potentially big set of modules. But I realise that it would pollute a little more CPAN's namespace, so that's why I'm asking here first. In case I do publish it on CPAN instead of patching BOP, I'd be open about changing the name. I would then register the namespace for it in PAUSE. The code is being developed in GitHub: https://github.com/andrewalker/perl-cpi And there are two gateways (the ones I used in my application): https://github.com/andrewalker/perl-cpi-gateway-paypal https://github.com/andrewalker/perl-cpi-gateway-pagseguro Cheers, André