

These services will cease to be available from April 1, 2021 , the new version of the API has these and more tools that will facilitate and save a lot of time in validations or penalties of the SAT in audits, we recommend widely reviewing you the new documentation at https://develers.facturoPorti.com.mx/reference/api-desarrollo-facturo as part of the new features can be part of the new features.
新的API访问服务以:
https://testapi.facturoporti.com.mx/
https://api.facturoporti.com.mx/
取决于您使用沙箱或生产的环境。
您需要帮助还是需要雇用服务?给我们发送电子邮件至[email protected] [email protected],转到页面https://www.facturoporti.com.mx在线告诉我们或致电我们555 546 2288或558 421 767我们可以很乐意给您您需要的东西。
这是用于在C#中使用Web服务以生成发票,笔记,收据,工资单,轴承信,付款补充等的示例。
当您已经通过自己的手段生成XML而只需要盖章时,此服务是理想的选择。集成在10分钟内很容易迅速,您将在我们的测试环境中广播CFDI在不到1小时的时间内生产。
此外,Web服务将允许取消一个或多个CFDI
建议使用视觉工作室开发IDE 2017或更高的社区。所有社区版本都是免费的,可以从https://visualstudio.microsoft.com/es/vs/communch/下载
获取最新版本的facturoporti c#in:
git clone https://github.com/facturoporti/factura-electronica-Web-Service-C-Sharp.git
下载包含执行冲压过程所需的内容的存储库。

选择文件按Timbrar,系统将执行以下操作:
if ( txtArchivoXML . Text . Trim ( ) . Length == 0 )
{
MessageBox . Show ( "Seleccione un archivo antes de continuar." , "Error al Timbrar Documento" ) ;
}
else
{
txtFechaInicio . Text = DateTime . Now . ToString ( ) ;
Cursor . Show ( ) ;
Cursor . Current = Cursors . WaitCursor ;
CertificarClient certificar = new CertificarClient ( ) ;
AutenticarPeticion autenticar = new AutenticarPeticion ( ) ;
TimbrarCFDIPeticion xml = new TimbrarCFDIPeticion ( ) ;
// Asigna los parametros de configuracion de conexion
autenticar . Usuario = "PruebasTimbrado" ;
autenticar . Contrasenia = "@Notiene1" ;
// abre el archivo XMl que fue seleccionado
FileStream resultado = null ;
resultado = new FileStream ( txtArchivoXML . Text , FileMode . Open , FileAccess . Read , FileShare . Read ) ;
using ( StreamReader contenidoArchivo = new StreamReader ( resultado ) )
{
xml . XMLEntrada = contenidoArchivo . ReadToEnd ( ) ;
contenidoArchivo . Close ( ) ;
}
TimbrarCFDIRespuesta respuesta = certificar . TimbradoMultiEmpresas ( autenticar , xml ) ;
certificar . Close ( ) ;
txtFechaTermino . Text = DateTime . Now . ToString ( ) ;
if ( respuesta . Estatus . Codigo == "000" )
{
txtXMLTimbrado . Text = respuesta . Timbrado . TimbreXML ;
}
MessageBox . Show ( respuesta . Estatus . Descripcion , "Generación CFDI" ) ;
Cursor . Current = Cursors . Default ;
} 在该术语上,系统指示盖章的结果还将向您显示财政音色:

使用的C#版本
Visual Studio 2017 Community con Framework 4.5
输入财政作品集(UUID)进行取消:

if ( txtFolioFiscal1 . Text . Trim ( ) . Length == 0 && txtFolioFiscal2 . Text . Trim ( ) . Length == 0 )
{
MessageBox . Show ( "Ingrese al menos un Folio Fiscal antes de continuar." , "Error al cancelar el CFDI" ) ;
}
else
{
// Genera XMl con los Folios a enviar se pueden enviar uno o mas CFDI para cancelacion
// Solo se podran enviar CFDI timbrados con nuestro servicio no hay el limite de CFDI que se puean cancelar
Cursor . Show ( ) ;
Cursor . Current = Cursors . WaitCursor ;
CertificarClient certificar = new CertificarClient ( ) ;
AutenticarPeticion autenticar = new AutenticarPeticion ( ) ;
CancelarCFDIPACPeticion cancelar = new CancelarCFDIPACPeticion ( ) ;
// Asigna los parametros de configuracion de conexion
autenticar . Usuario = "PruebasTimbrado" ;
autenticar . Contrasenia = "@Notiene1" ;
cancelar . RFC = "AAA010101AAA" ; // RFC del emisor del CFDI;
cancelar . Password = "12345678a" ;
Archivos archivo = new Archivos ( ) ;
cancelar . PFX = archivo . ConvertirStreamToByte ( archivo . Abrir ( ObtieneDirectorioAplicacion ( ) + @"CertificadoAAA010101AAA.pfx" ) ) ; //"Se debe de enviar el certificado en formato PFX para realizar la cancelacion";
List < string > folios = new List < string > ( ) ;
if ( ! string . IsNullOrEmpty ( txtFolioFiscal1 . Text ) )
folios . Add ( txtFolioFiscal1 . Text . Trim ( ) ) ;
if ( ! string . IsNullOrEmpty ( txtFolioFiscal2 . Text ) )
folios . Add ( txtFolioFiscal2 . Text . Trim ( ) ) ;
cancelar . UUID = folios . ToArray ( ) ;
CancelarCFDIRespuesta respuesta = certificar . CancelarCFDICualquierPAC ( autenticar , cancelar ) ;
certificar . Close ( ) ;
txtFechaTermino . Text = DateTime . Now . ToString ( ) ;
Cursor . Current = Cursors . Default ;
// No hay limite para el envio de cancelaciones en el ejemplo solo en envian 3 pero pueden ser todos los que el usuario
// desee cancelar al mismo tiempo
for ( int contador = 0 ; contador < respuesta . FoliosRespuesta . Length ; contador ++ )
{
if ( respuesta . FoliosRespuesta [ contador ] . Estatus != null )
MessageBox . Show ( respuesta . FoliosRespuesta [ contador ] . Estatus . Descripcion , "Generación CFDI" ) ;
}
} 执行发送取消按钮,在执行代码之前,您必须使用您的财政数据更新值;在执行结束时,您将得到答案:

注意:如果正确的数字证书必须发送的数字证书是PFX类型之一
如果您想要更多的Web服务信息,请下载集成指南,除了允许的值之外,它还包含所有属性及其描述
分叉存储库
Clona存储库
git clone [email protected]:yourusername/invoice-electronics-web-service-c-sharp.git
创建一个分支
git checkout desarrollo
git pull al original desarrollo
# Podrás escoger el nombre de tu rama
git checkout -b <feature/my_branch>
git add .
git commit -m "mis cambios"
git push origin <feature/my_branch>
*** -
Facturoporti在墨西哥开发。使用许可证查看更多。