Exemple #1
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);
        }
Exemple #2
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);
        }