Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Best pratics to integrate with API
  • I own an external api and would like to know a better practice to integrate it. Where do I start? Package, module, vendor? .....
  • With integrate, you want you need to call it from your app? If so, a package would be the best option, as it would make it easily reusable.

    It doesn't have to be a Fuel package, a standard PSR-4 composer package would do to, with the added benefit of being able to use it in non-fuel apps.
  • Yes, I need to create an ecommerce (app), and I would call a payment service (api) for my application. For the case of the ecommerce administrative panel, would I create a module? I was clear? tnks.
  • HarroHarro
    Accepted Answer
    If it is a common payment service API, chances are there is already a package for it. If not, and you need to create something yourself, I suggest you have a look at http://omnipay.thephpleague.com/ and make a custom driver for it. It will save you quite a bit of time. We've made a few over the years as well.

    In general, packages are core-extensions, and should be used for backend / server code, while modules are app-extensions, and should be used for user interaction. So yes, an admin panel should be a module.
  • Thanks for the help, man!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion