public System.Threading.Tasks.Task <RequestPaymentResponse> RequestPaymentAsync(SecurityHeaderType Security, RequestHeaderType RequestHeader, dacRefund_Input dacRefund_Input)
        {
            RequestPaymentRequest inValue = new RequestPaymentRequest();

            inValue.Security        = Security;
            inValue.RequestHeader   = RequestHeader;
            inValue.dacRefund_Input = dacRefund_Input;
            return(((RequestPaymentV01)(this)).RequestPaymentAsync(inValue));
        }
        public dacRefund_Output RequestPayment(ref SecurityHeaderType Security, RequestHeaderType RequestHeader, dacRefund_Input dacRefund_Input)
        {
            RequestPaymentRequest inValue = new RequestPaymentRequest();

            inValue.Security        = Security;
            inValue.RequestHeader   = RequestHeader;
            inValue.dacRefund_Input = dacRefund_Input;
            RequestPaymentResponse retVal = ((RequestPaymentV01)(this)).RequestPayment(inValue);

            Security = retVal.Security;
            return(retVal.dacRefund_Output);
        }
        public string RequestPayment(CommerceOrder order)
        {
            var request = new RequestPaymentRequest
            {
                CustomerId = order.CustomerId,
                OrderId    = order.OrderID
            };

            request.SetShopName(order.ShopName);

            return(RunPipeline <RequestPaymentRequest, RequestPaymentResult>("heidelpay.requestPayment", request).RedirectUrl);
        }
Пример #4
0
        public async Task <IActionResult> RequestPayment([FromBody] RequestPaymentRequest request)
        {
            Guard.Against.Null(request, nameof(request));

            var paymentId = idGenerator.New();

            var command = Commands.RequestPayment.Create(
                paymentId,
                request.OrderId,
                request.Amount
                );

            await commandBus.Send(command);

            return(Created("api/Payments", paymentId));
        }
Пример #5
0
        public void Can_Send_RequestPayment_Request()
        {
            var     senderId   = "061133";
            var     merchantid = "APPDK0074110008";
            var     orderid    = "DB TESTING 2015060908";
            decimal amount     = 105;

            SoapConnection <RequestPaymentV01Client, RequestPaymentV01> soapConnection =
                new SoapConnection <RequestPaymentV01Client, RequestPaymentV01>(new EndpointConfiguration().RequestPaymentV01);

            var req = new RequestPaymentRequest
            {
                dacRefund_Input = new dacRefund_Input
                {
                    MerchantId = merchantid,
                    Amount     = amount,
                    BulkRef    = string.Empty,
                    CustomerId = string.Empty,
                    OrderId    = orderid,
                },
                Security      = new SecurityHeaderType(),
                RequestHeader = new RequestHeaderType
                {
                    Language  = "DA",
                    SenderId  = senderId,
                    SignerId1 = senderId,
                    SignerId2 = senderId,
                    SignerId3 = senderId,
                    DBCryptId = senderId,
                    RequestId = "1234",
                    Timestamp = DateTime.UtcNow.DbTimestamp()
                }
            };

            var output =
                soapConnection.Send(client => client.RequestPayment(ref req.Security, req.RequestHeader, req.dacRefund_Input));

            Assert.IsNotNull(output);
        }
 System.Threading.Tasks.Task <RequestPaymentResponse> RequestPaymentV01.RequestPaymentAsync(RequestPaymentRequest request)
 {
     return(base.Channel.RequestPaymentAsync(request));
 }
 RequestPaymentResponse RequestPaymentV01.RequestPayment(RequestPaymentRequest request)
 {
     return(base.Channel.RequestPayment(request));
 }