public static function delete($token)
    {

        try {
            $authType = self::getAuth();
        } catch (OpenPayU_Exception $e) {
            throw new OpenPayU_Exception($e->getMessage(), $e->getCode());
        }

        if (!$authType instanceof AuthType_Oauth) {
            throw new OpenPayU_Exception_Configuration('Delete token works only with OAuth');
        }

        if (OpenPayU_Configuration::getOauthGrantType() !== OauthGrantType::TRUSTED_MERCHANT) {
            throw new OpenPayU_Exception_Configuration('Token delete request is available only for trusted_merchant');
        }

        $pathUrl = OpenPayU_Configuration::getServiceUrl() . self::TOKENS_SERVICE . '/' . $token;

        $response = self::verifyResponse(OpenPayU_Http::doDelete($pathUrl, $authType));

        return $response;
    }
public static function delete($token)
    {

        try {
            $authType = self::getAuth();
        } catch (OpenPayU_Exception $e) {
            throw new OpenPayU_Exception($e->getMessage(), $e->getCode());
        }

        if (!$authType instanceof AuthType_Oauth) {
            throw new OpenPayU_Exception_Configuration('Delete token works only with OAuth');
        }

        if (OpenPayU_Configuration::getOauthGrantType() !== OauthGrantType::TRUSTED_MERCHANT) {
            throw new OpenPayU_Exception_Configuration('Token delete request is available only for trusted_merchant');
        }

        $pathUrl = OpenPayU_Configuration::getServiceUrl() . self::TOKENS_SERVICE . '/' . $token;

        $response = self::verifyResponse(OpenPayU_Http::doDelete($pathUrl, $authType));

        return $response;
    }
public static function delete ( $ token ) { try { $ authType = self :: getAuth ( ) ; } catch ( OpenPayU_Exception $ e ) { throw new OpenPayU_Exception ( $ e -> getMessage ( ) , $ e -> getCode ( ) ) ; } if ( ! $ authType instanceof AuthType_Oauth ) { throw new OpenPayU_Exception_Configuration ( 'Delete token works only with OAuth' ) ; } if ( OpenPayU_Configuration :: getOauthGrantType ( ) !== OauthGrantType :: TRUSTED_MERCHANT ) { throw new OpenPayU_Exception_Configuration ( 'Token delete request is available only for trusted_merchant' ) ; } $ pathUrl = OpenPayU_Configuration :: getServiceUrl ( ) . self :: TOKENS_SERVICE . '/' . $ token ; $ response = self :: verifyResponse ( OpenPayU_Http :: doDelete ( $ pathUrl , $ authType ) ) ; return $ response ; }
Deleting a payment token
@param string $token
@return null|OpenPayU_Result
@throws OpenPayU_Exception
@throws OpenPayU_Exception_Configuration
Deleting a payment token