public CreditResponse DoRequest()
        {
            // should validate _builder.GetOrderId() existence here

            var hostedActionRequest = new HostedAdmin(_builder.GetConfig(), _builder.GetCountryCode())
                                      .Credit(new Credit(
                                                  transactionId: _builder.Id,
                                                  amountToCredit: Decimal.ToInt64(_builder.AmountIncVat * 100) //centessimal
                                                  ));

            return(hostedActionRequest.DoRequest <CreditResponse>());
        }
        public CancelPaymentPlanAmountResponse 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.CancelPaymentPlanAmountRequest()
            {
                Authentication = auth,
                AmountInclVat  = _builder.AmountIncVat,
                ContractNumber = _builder.Id,
                ClientId       = _builder.GetConfig().GetClientNumber(_builder.OrderType, _builder.GetCountryCode()),
                Description    = _builder.Description
            };

            // 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.CancelPaymentPlanAmount(request);

            return(response);
        }
        public async Task <CancelPaymentPlanAmountResponse> DoRequest()
        {
            var auth = new Authentication()
            {
                Password = _builder.GetConfig().GetPassword(_builder.OrderType, _builder.GetCountryCode()),
                Username = _builder.GetConfig().GetUsername(_builder.OrderType, _builder.GetCountryCode())
            };

            var request = new CancelPaymentPlanAmountRequest()
            {
                Authentication = auth,
                AmountInclVat  = _builder.AmountIncVat,
                ContractNumber = _builder.Id,
                ClientId       = _builder.GetConfig().GetClientNumber(_builder.OrderType, _builder.GetCountryCode()),
                Description    = _builder.Description
            };

            // make request to correct endpoint, return response object
            var endpoint = _builder.GetConfig().GetEndPoint(PaymentType.ADMIN_TYPE);
            var adminWS  = new AdminServiceClient(AdminServiceClient.EndpointConfiguration.AdminSoapService);// "WcfAdminSoapService", endpoint);
            var response = await adminWS.CancelPaymentPlanAmountAsync(request);

            return(response);
        }