0

i am trying to use Blocktrail api in my codeigniter project for payment integeration

in documentation it is written to load the library

use Blocktrail\SDK\BlocktrailSDK;

I wanted to know how to autoload this in my codeigniter project. I have already installed this sdk using composer

The screen shot of my project

Amina Rahman
  • 139
  • 1
  • 1
  • 6
  • Just a note your controllers names should be like this http://www.codeigniter.com/user_guide/general/styleguide.html#file-naming –  Oct 16 '16 at 23:06
  • Put `use Blocktrail\SDK\BlocktrailSDK;` line before class introduction, you can put it just after opening PHP tag. [Docs](http://php.net/manual/en/language.namespaces.importing.php). Check in APPPATH . 'config/config.php' if composer autoload is enabled. [Docs](https://github.com/bcit-ci/CodeIgniter/blob/3.1-stable/application/config/config.php#L121). You can follow this [step by step guide](http://stackoverflow.com/questions/38813987/integrating-mailjet-api-v3-wrapper-as-codeigniter-library/38815612#38815612) I made for some other repository, but you should get it. – Tpojka Oct 17 '16 at 00:08
  • 1
    @Tpojka thanks a lot it helped me and work fine thanks once again – Amina Rahman Oct 17 '16 at 19:03

0 Answers0