/* * * Permite solicitar a Webpay la anulación de una transacción realizada previamente y que se encuentra vigente. * */ public nullificationOutput nullify(string authorizationCode, decimal authorizedAmount, string buyOrder, decimal nullifyAmount, string commercecode) { nullificationInput nullificationInput = new nullificationInput(); nullificationInput.authorizationCode = authorizationCode; nullificationInput.authorizedAmount = authorizedAmount; nullificationInput.buyOrder = buyOrder; if (commercecode == null) { nullificationInput.commerceId = Int64.Parse(this.config.CommerceCode); } else { nullificationInput.commerceId = Int64.Parse(commercecode); } nullificationInput.nullifyAmount = nullifyAmount; using (WSCommerceIntegrationServiceImplService proxy = new WSCommerceIntegrationServiceImplService()) { /*Define el ENDPOINT del Web Service Webpay*/ proxy.Url = WSDL; Policy myPolicy = new Policy(); myPolicy.Assertions.Add(new CustomPolicyAssertion(this.config)); proxy.SetPolicy(myPolicy); proxy.Timeout = 60000; proxy.UseDefaultCredentials = false; nullificationOutput nullificationOutput = proxy.nullify(nullificationInput); return(nullificationOutput); } }
/** * Permite solicitar a Webpay la captura diferida de una transacción con autorización y sin captura simultánea. * */ public captureOutput capture(string authorizationCode, decimal captureAmount, string buyOrder) { captureInput capture = new captureInput(); capture.authorizationCode = authorizationCode; capture.buyOrder = buyOrder; capture.captureAmount = captureAmount; capture.commerceId = Int64.Parse(this.config.CommerceCode); using (WSCommerceIntegrationServiceImplService proxy = new WSCommerceIntegrationServiceImplService()) { /** Define el ENDPOINT del Web Service Webpay*/ proxy.Url = WSDL; Policy myPolicy = new Policy(); myPolicy.Assertions.Add(new CustomPolicyAssertion(this.config)); proxy.SetPolicy(myPolicy); proxy.Timeout = 60000; proxy.UseDefaultCredentials = false; captureOutput captureOutput = proxy.capture(capture); return(captureOutput); } }