Esempio n. 1
0
        public ReturnObject <bool> ValidateCredentials(string user, string pass)
        {
            log.Info("ValidateCredentials");

            ReturnObject <bool> result;

            Service_WBPayments_Reference.Service_WBPayments_LogicClient service = new Service_WBPayments_Reference.Service_WBPayments_LogicClient();

            Service_WBPayments_Reference.ReturnObjectOfboolean boolResult = service.ValidateCredentials(user, pass);

            result = new ReturnObject <bool>(boolResult.Data, boolResult.SuccessMsg, boolResult.WarnMsg, boolResult.ErrorMsg, boolResult.InfoMsg);

            result.HttpCode = MapResultToHTTPCode(boolResult.Code);

            return(result);
        }
Esempio n. 2
0
        public ReturnObject <int> ConfirmPayment(string clientId, int paymentId, PaymentResult paymentResult)
        {
            log.Info("ConfirmPayment");
            Service_WBPayments_Reference.Service_WBPayments_LogicClient service        = new Service_WBPayments_Reference.Service_WBPayments_LogicClient();
            Service_WBPayments_Reference.ConfirmPaymentObject           confirmRequest = new Service_WBPayments_Reference.ConfirmPaymentObject();

            confirmRequest.ClientId         = clientId;
            confirmRequest.PaymentId        = paymentId;
            confirmRequest.GatewayReference = paymentResult.GatewayReference;
            confirmRequest.GatewayResponse  = paymentResult.GatewayResponse;
            confirmRequest.StatusId         = paymentResult.StatusId;

            Service_WBPayments_Reference.ReturnObjectOfint intResult = service.ConfirmPayment(confirmRequest);
            ReturnObject <int> result = new ReturnObject <int>(intResult.Data, intResult.SuccessMsg, intResult.WarnMsg, intResult.ErrorMsg, intResult.InfoMsg);

            result.HttpCode = MapResultToHTTPCode(intResult.Code);

            return(result);
        }
Esempio n. 3
0
        public ReturnObject <int> CreatePayment(string clientId, string gatewayId, Payment payment)
        {
            log.Info("CreatePayment");

            Service_WBPayments_Reference.Service_WBPayments_LogicClient service = new Service_WBPayments_Reference.Service_WBPayments_LogicClient();

            Service_WBPayments_Reference.CreatePaymentObject createRequest = new Service_WBPayments_Reference.CreatePaymentObject();

            createRequest.ClientId      = clientId;
            createRequest.GatewayId     = gatewayId;
            createRequest.Amount        = payment.Amount;
            createRequest.Comment       = payment.Comment;
            createRequest.CurrencyId    = payment.CurrencyId;
            createRequest.InvoiceNumber = payment.InvoiceReference;

            Service_WBPayments_Reference.ReturnObjectOfint intResult = service.CreatePayment(createRequest);
            ReturnObject <int> result = new ReturnObject <int>(intResult.Data, intResult.SuccessMsg, intResult.WarnMsg, intResult.ErrorMsg, intResult.InfoMsg);

            result.HttpCode = MapResultToHTTPCode(intResult.Code);

            return(result);
        }