CodeIgniter Forums
Create Custom Paypal LIbrary - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: Create Custom Paypal LIbrary (/showthread.php?tid=62445)



Create Custom Paypal LIbrary - Codin2015 - 07-15-2015

I have a snippet of code in plain PHP I want to convert to Codeigniter  the code allows a person to connect to paypal. So should I put this in a custom library file since it is included and used to connect to paypal. Thanks in advance for all help.


RE: Create Custom Paypal LIbrary - mwhitney - 07-16-2015

This depends primarily on the structure of the code you are converting. For example, if the code was originally written to work with Composer, your best bet would probably be to enable Composer and use it as you would on any other site.

If the code is a set of classes (or a single class), a library would probably be a good solution.

If the code is just a set of functions that you want to be available as global functions, a helper would take care of that (though it might be a good idea to put them into a library and access them through the library, rather than dumping more global functions into the application).