public AnnulResponse DoRequest() { var hostedActionRequest = new HostedAdmin(_builder.GetConfig(), _builder.GetCountryCode()) .Annul(new Annul(transactionId: _builder.Id)); return(hostedActionRequest.DoRequest <AnnulResponse>()); }
public Webpay.Integration.CSharp.AdminWS.CancelOrderResponse DoRequest() { var auth = new Webpay.Integration.CSharp.AdminWS.Authentication() { Password = _builder.GetConfig().GetPassword(_builder.OrderType, _builder.GetCountryCode()), Username = _builder.GetConfig().GetUsername(_builder.OrderType, _builder.GetCountryCode()) }; var request = new Webpay.Integration.CSharp.AdminWS.CancelOrderRequest() { Authentication = auth, SveaOrderId = _builder.Id, OrderType = ConvertPaymentTypeToOrderType(_builder.OrderType), ClientId = _builder.GetConfig().GetClientNumber(_builder.OrderType, _builder.GetCountryCode()) }; // make request to correct endpoint, return response object var endpoint = _builder.GetConfig().GetEndPoint(PaymentType.ADMIN_TYPE); var adminWS = new AdminServiceClient(new WSHttpBinding(SecurityMode.Transport), new EndpointAddress(endpoint)); var response = adminWS.CancelOrder(request); return(response); }
public async Task <CancelOrderResponse> DoRequest() { var auth = new AdminWS.Authentication() { Password = _builder.GetConfig().GetPassword(_builder.OrderType, _builder.GetCountryCode()), Username = _builder.GetConfig().GetUsername(_builder.OrderType, _builder.GetCountryCode()) }; var request = new AdminWS.CancelOrderRequest() { Authentication = auth, SveaOrderId = _builder.Id, OrderType = ConvertPaymentTypeToOrderType(_builder.OrderType), ClientId = _builder.GetConfig().GetClientNumber(_builder.OrderType, _builder.GetCountryCode()) }; // make request to correct endpoint, return response object var endpoint = _builder.GetConfig().GetEndPoint(PaymentType.ADMIN_TYPE); var adminWS = new AdminServiceClient(AdminServiceClient.EndpointConfiguration.WcfAdminSoapService, endpoint); var response = await adminWS.CancelOrderAsync(request); return(response); }