Quantcast
Channel: FiveTech Software tech support forums
Viewing all articles
Browse latest Browse all 26212

Webservices

$
0
0
Hola Thefull.. Gracias por responder. este es el ejemplo que estoy haciendo. pero no logro que estoy haciendo mal.. #include "fivewin.ch" doc = CreateObject( "MSXML2.DOMDocument" ) ohttp = CreateObject( "MSXML2.XMLHTTP" ) ohttp:Open( "POST" ,"https://www.nubefact.com/api/beta/invoices", .F. ) oHttp:SetRequestHeader( "Connection:", "Keep-Alive" ) ohttp:SetRequestHeader( "Content-Type" ,"application/json" ) ohttp:SetRequestHeader( "Authorization token","e1409d7a0cb44732ab58d3ac33488283d8717f3caeb442eabc50394bb42e902f" ) Ctext:=MEMOREAD("dioni.json") doc:LoadXML(ctext) //ctext TRY ohttp:Send( doc:xml ) CATCH msginfo("No Se Pudo Enviar Documento XML","Intente Nuevamente") return .t. END response:=ohttp:responseText Memowrit( 'SendVentasCli_Res.xml',Response) Ctext1:=MEMOREAD("SendVentasCli_Res.xml") ?ctext1 Retu .t. contenido de del archivo... ******************************************* dioni.json {"invoice": {"tipo": "1","serie": "F001","entidad_numero_de_documento": "20553510661","entidad_tipo_de_documento": "6","entidad_denominacion": "LLAMA.PE SA","entidad_direccion": "CALLE LIBERTAD 116 LIBERTAD - LIMA - PERU","entidad_email": "hola@llama.pe","fecha_de_emision": "05-05-2016","fecha_de_vencimiento": "","moneda": "1","tipo_de_cambio": "","operacion_gratuita": "false","total_gravada": "1000","total_inafecta": "","total_exonerada": "","total_igv": "180","total_gratuita": "","descuento_global": "","total_otros_cargos": "10","total": "1190","detraccion": "false","observaciones": "","documento_que_se_modifica_tipo": "","documento_que_se_modifica_serie": "","documento_que_se_modifica_numero": "","tipo_de_nota_de_credito": "","tipo_de_nota_de_debito": "","enviar_automaticamente_a_la_sunat": "true","enviar_automaticamente_al_cliente": "true","cancelado": "true","codigo_unico": "RUC20150800013","invoice_lines": [ {"unit_code": "ZZ","cantidad": "2","tipo_de_igv": "1","valor_unitario": "250","precio_unitario": "590","subtotal": "500","igv": "90","total": "590","descripcion": "MENU DE DIA" }, {"unit_code": "ZZ","cantidad": "1","tipo_de_igv": "1","valor_unitario": "500","precio_unitario": "590","subtotal": "500","igv": "90","total": "590","descripcion": "INKA KOLA DE 1.5 LITROS" } ] } } ******************************************************************** la respuesta que debo de recibir es.. repuesta.json {"invoice": {"serie": "F001","numero": 7,"aceptada_por_sunat": true,"sunat_description": "La Factura numero F001-7, ha sido aceptada","sunat_note": null,"sunat_responsecode": "0","codigo_de_barras": "20219719443 | 01 | F001 | 000007 | 180.00 | 1,190.00 | 05/05/2016 | 6 | 20547551398 | UNv/nKSCy08PFSwAR02wZvqXVcs= | nGEDbsDZsXnrWjf//kpu2BnGeK+DmKZjoSGnCW3na1lki7pktxfDVe8ihxm9\ncrhNi5EPFmdTLcbxcc+W+lCpDj9h8LeIz5MlhdPPEmpZUfLDaBhytf/fruZg\nadQi0WvCjHqW3Z7CRgbJh7t40Wvz9FbPfZhs121baF+fwYwYQpY43lzJR+MR\nMmMeoSVB6kL9TFilUF1EoZ4NTBeFX2hEF9QVkPwqcvcznXIFMmhdG7pvX/p+\nryAYCDbMq4kcmiyqP0xgqL6wHjLiURq1eQa6JssMPm4a1Fag83xSmt62YjYL\ncwvHyG0Asu40jXPOA22kYyFLbGsI94/9ExSKZsPK2w== |" } } *****************************

Viewing all articles
Browse latest Browse all 26212

Trending Articles