public static BEWSElimCIPResponseMod1 EliminarCIPMod1(BEWSElimCIPRequestMod1 request) { BEWSElimCIPResponseMod1 response = new BEWSElimCIPResponseMod1(); using (var proxy = new WSCrypto()) { proxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; proxy.Proxy = WebProxy.GetDefaultProxy(); proxy.Proxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; request.CIP = request.CIP.Trim(); request.Firma = proxy.Signer(request.CIP, ByteUtil.FileToByteArray(PrivatePath)); request.CIP = proxy.EncryptText(request.CIP, ByteUtil.FileToByteArray(PublicPathContraparte)); using (var proxyCIP = new Service()) { response = proxyCIP.EliminarCIPMod1(request); } } return(response); }
public static BEWSElimCIPResponseMod1 EliminarCIP(BEWSElimCIPRequestMod1 request) { request.CodServ = ConfigurationManager.AppSettings["PE_MERCHAND_ID"]; BEWSElimCIPResponseMod1 response = new BEWSElimCIPResponseMod1(); using (var proxy = new WSCrypto()) { proxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; proxy.Proxy = WebProxy.GetDefaultProxy(); proxy.Proxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; request.CIP = request.CIP.Trim(); request.Firma = proxy.Signer(request.CIP, ByteUtil.FileToByteArray(PrivateKey)); request.CIP = proxy.EncryptText(request.CIP, ByteUtil.FileToByteArray(PublicKey)); using (var proxyCIP = new Service()) { response = proxyCIP.EliminarCIPMod1(request); } } return(response); }