Because you think the idea of an open source PHP project supporting many payment gateways with one API is sexy as hell. Because you're not a douche. Because you like writing code and want to sharpen your teeth with payment APIs. These, and many others, are all excellent reasons to contribute to PHP-Payments.
PHP-Payments relies heavily on __call magic methods and matching methods and keys via arrays. Taking this approach allowed us to eliminate duplicate code and keep an extremely clear detail of what methods and parameters were supported by each method within each gateway, within the driver itself. When you instantiate PHP-Payments, the library first autoloads some helper classes such as a utility class, a response class, a request class, the payment driver abstract class. When you call a method, PHP-Payments make sure the driver and method you're using exists, and via the method_map() function which is implemented in each driver, ensures you've submitted the required keys for that method. If all checks out, the request can be made.
This stuff takes a lot of hard work. To date, we've logged hundreds of hours on this project, and sadly free code doesn't pay bills.Contribute Code