Example #1
0
 public function __construct(MerchantProvider $merchantProvider)
 {
     $client = new Client('magento2', ['external' => ['hosts' => ['default' => 'localhost:8080/api/v2', 'admin' => 'localhost:8080/api/admin']]]);
     $app = $client->getApp();
     $app['merchant.provider'] = $merchantProvider;
     $this->app = $app;
 }
Example #2
0
 public function __construct()
 {
     require_once __DIR__ . '/../vendor/autoload.php';
     require_once __DIR__ . '/../controllers/AbstractController.php';
     $client = new Client(MerchantType::MAGENTO);
     $app = $client->getApp();
     $app['merchant.provider'] = function () use($app) {
         return new MerchantProvider($app);
     };
     $this->app = $app;
 }