@param string $paymentGroupId

@return string
354592
protected static function getAvailableMethodsQuery($paymentGroupId)
    {
        $query = self::getBaseQuery();
        $activePortal = self::getPortalDomainService()->getActivePortal();
        if (null !== $activePortal) {
            $query .= self::getPortalQueryRestriction($activePortal->id);
            $query .= "\nAND ";
        } else {
            $query .= "\nWHERE ";
        }
        $query .= self::getPaymentGroupQueryRestriction($paymentGroupId);

        return $query;
    }
1116920
public static MozuUrl getAvailablePaymentActionsUrl(String orderId, String paymentId)
	{
		UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/payments/{paymentId}/actions");
		formatter.formatUrl("orderId", orderId);
		formatter.formatUrl("paymentId", paymentId);
		return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
	}
50106
public function deleteShopGroup($groupId)
    {
        $result = $this->httpRaw(self::WECHAT_SHOP_GROUP_DELETE_URL . 'access_token=' . $this->getAccessToken(), [
            'group_id' => $groupId
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success';
    }
25129
public function fetchGroupTags($groupId)
    {
        $result = $this->_get($this->_groupUrl($groupId, '/tags'));
        return Deserialize::tags($result);
    }
168749
@Override
	public List<CommerceWarehouse> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
577186
@Override
	public List<CommerceShipmentItem> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
95210
public function get($paymentId)
    {

        $this->debugData[] = __METHOD__;

        $method = 'GET';
        $uri = $this->config['apiQueryUri'] . \sprintf('/sales/%s', $paymentId);
        $options = [
            'headers' => $this->headers
        ];

        $this->debugData[][__LINE__]['method'] = $method;
        $this->debugData[][__LINE__]['uri'] = $uri;
        $this->debugData[][__LINE__]['options'] = $uri;

        try {

            $response = $this->http()->request($method, $uri, $options);

            $this->debugData[][__LINE__]['response'] = $response;

            $result = \json_decode($response->getBody()->getContents(), true);            

            if ($response->getStatusCode() === HttpStatus::Ok) {
                return $result;
            } elseif ($response->getStatusCode() == HttpStatus::BadRequest) {
                return 'status_codex';
            }

        } catch (\Exception $e) {

            $result = array(
                'code'=>$e->getCode(),
                'message'=>$e->getMessage()
                );

            $this->debugData[][__LINE__]['exception'] = $e->getMessage();

        }

        return $result;
    }
201324
public function findAllByGroupId( $userGroupId )
    {
        $platform = $this->getDbAdapter()
                         ->getPlatform();

        /* @var $from \Zork\Db\Sql\TableIdentifier */
        $from = $this->getTableInSchema( 'user_right_x_user_group' );

        if ( $from instanceof TableIdentifier )
        {
            $from = $from->getIdentifierChain();
        }
        else
        {
            $from = (array) (string) $from;
        }

        return $this->findAll( array(
            new Expression( $platform->quoteIdentifier( 'id' ) . ' IN (
                SELECT ' . $platform->quoteIdentifier( 'rightId' ) . '
                  FROM ' . $platform->quoteIdentifierChain( $from ) . '
                 WHERE ' . $platform->quoteIdentifier( 'groupId' ) . ' = ?
            )', $userGroupId ),
        ) );
    }
370028
@Override
	public List<CommerceDiscount> filterFindByGroupId(long groupId) {
		return filterFindByGroupId(groupId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
175080
public function capture($paymentId, CaptureRequest $captureRequest){        
        $uri = Braspag::$apiBase . "sales/{$paymentId}/capture"; 
        
        if($captureRequest != null){
            $uri = $uri . "?amount={$captureRequest->amount}&serviceTaxAmount={$captureRequest->serviceTaxAmount}";
        }
        
        $response = Request::put($uri)
            ->sendsJson()
            ->addHeaders($this->headers)
            ->send();
        
        if($response->code == HttpStatus::Ok){    
            
            $captureResponse = new CaptureResponse();
            $captureResponse->status = $response->body->Status;
            $captureResponse->reasonCode = $response->body->ReasonCode;
            $captureResponse->reasonMessage = $response->body->ReasonMessage;
            
            $captureResponse->links = $this->parseLinks($response->body->Links);
            
            return $captureResponse;
            
        }elseif($response->code == HttpStatus::BadRequest){            
            Utils::handleApiError($response);            
        }   
        
        return $response->code;
    }
383878
@Override
	public List<CommerceUserSegmentEntry> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
1311212
public function showGroup( $groupId )
    {
        $collection = $this->repository->getAppointmentsByParam( ['groupId' => $groupId ] );
        return $this->buildBundle( $collection );
    }
508182
public function getBarePaymentHandler($paymentHandlerId, $languageId = null)
    {
        $cacheKey = $paymentHandlerId;
        if (false === isset($this->cache[$cacheKey])) {
            $paymentHandler = $this->subject->getBarePaymentHandler($paymentHandlerId, $languageId);
            if (null === $paymentHandler) {
                return null;
            }
            $this->cache[$cacheKey] = $paymentHandler->sqlData;

            return $paymentHandler;
        }

        return TdbShopPaymentHandler::getInstanceFromDataRow($this->cache[$cacheKey], $languageId);
    }
514337
private function getAdditionalConfig($paymentHandlerGroupId)
    {
        $additionalConfig = array();
        try {
            $systemName = $this->shopPaymentConfigLoaderDataAccess->getPaymentHandlerGroupSystemNameFromId(
                $paymentHandlerGroupId
            );
        } catch (DataAccessException $e) {
            throw new ConfigurationException(
                'Data access error while trying to load payment handler group system name for ID '.$paymentHandlerGroupId,
                $e->getCode(),
                $e
            );
        }

        if (isset($this->configProviderList[$systemName])) {
            /** @var ShopPaymentConfigProviderInterface $configProvider */
            $configProvider = $this->configProviderList[$systemName];
            $additionalConfig = $configProvider->getAdditionalConfiguration();
        }

        return $additionalConfig;
    }
181484
@Override
	public List<CommerceNotificationTemplate> filterFindByGroupId(long groupId) {
		return filterFindByGroupId(groupId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
620281
public function getGroup($groupId)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_GROUP_ID_GET_PREFIX, [
            'group_id' => $groupId
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success' ? $result['groups_detail'] : false;
    }
19493
public function getRulesAsString($iGroupId)
    {
        $aRules = $this->getRulesAsArray($iGroupId);

        if (empty($aRules)) {
            return '';
        }

        $sStr = 'Passwords must ' . strtolower(implode(', ', $aRules)) . '.';
        return str_lreplace(', ', ' and ', $sStr);
    }