protected function saveAccount()
 {
     // TODO: check nonce
     if (isset($_POST['wpla_account_id'])) {
         // create new account
         $account = new WPLA_AmazonAccount($_POST['wpla_account_id']);
         $account->title = stripslashes($_POST['wpla_title']);
         $account->market_id = trim($_POST['wpla_market_id']);
         // $account->market_code    = trim( $_POST['wpla_market_code'] );
         $account->merchant_id = trim($_POST['wpla_merchant_id']);
         $account->marketplace_id = trim($_POST['wpla_marketplace_id']);
         $account->access_key_id = trim($_POST['wpla_access_key_id']);
         // $account->secret_key     = trim( $_POST['wpla_secret_key'] );
         $account->active = trim($_POST['wpla_account_is_active']);
         $account->is_reg_brand = trim($_POST['wpla_account_is_reg_brand']);
         $account->update();
         // update allowed markets
         // $account->updateMarketplaceParticipations();
         $this->showMessage(__('Account was updated.', 'wpla'));
     }
 }