Exemplo n.º 1
0
 private function getAlert()
 {
     // Test alert
     $alert = array();
     if (!Configuration::get('EBAY_API_TOKEN')) {
         $alert['registration'] = 1;
     }
     if (!ini_get('allow_url_fopen')) {
         $alert['allowurlfopen'] = 1;
     }
     if (!extension_loaded('curl')) {
         $alert['curl'] = 1;
     }
     //Search if user is a store owner
     $ebay = new eBayRequest();
     $ebay->username = Configuration::get('EBAY_API_USERNAME');
     //$this->context->cookie->eBayUsername;
     $userProfile = $ebay->getUserProfile();
     if ($userProfile[0]['SellerBusinessType'][0] != 'Commercial') {
         $alert['SellerBusinessType'] = 1;
     }
     if ($userProfile[0]['StoreName'][0] == '' && $userProfile[0]['StoreUrl'][0] == '') {
         $alert['StoreOwner'] = 1;
     }
     return $alert;
 }