Esempio n. 1
0
 public async Task<object> MoneySend(ClientPaymentInformation clientPaymentInformation)
 {
     TransferRequest transferRequestCard = new TransferRequest();
     transferRequestCard.LocalDate = "1212";
     transferRequestCard.LocalTime = "161222";
     //transferRequestCard.TransactionReference = 4960304021110152928L;
     transferRequestCard.TransactionReference = LongRandom(1000000000000000000, long.MaxValue, new Random());
     transferRequestCard.SenderName = "John Doe";
     transferRequestCard.SenderAddress.Line1 = "123 Main Street";
     transferRequestCard.SenderAddress.Line2 = "#5A";
     transferRequestCard.SenderAddress.City = "Arlington";
     transferRequestCard.SenderAddress.CountrySubdivision = "VA";
     transferRequestCard.SenderAddress.PostalCode = 22207;
     transferRequestCard.SenderAddress.Country = "USA";
     transferRequestCard.FundingCard.AccountNumber = 5184680430000006L;
     //transferRequestCard.FundingCard.AccountNumber = Convert.ToInt64(clientPaymentInformation.CardNumber);
     transferRequestCard.FundingCard.ExpiryMonth = 11;
     transferRequestCard.FundingCard.ExpiryYear = 2017;
     transferRequestCard.FundingUCAF = "MjBjaGFyYWN0ZXJqdW5rVUNBRjU=1111";
     transferRequestCard.FundingMasterCardAssignedId = 123456;
     transferRequestCard.FundingAmount.Value = 15000;
     transferRequestCard.FundingAmount.Currency = 840;
     transferRequestCard.ReceiverName = "Jose Lopez";
     transferRequestCard.ReceiverAddress.Line1 = "Pueblo Street";
     transferRequestCard.ReceiverAddress.Line2 = "PO BOX 12";
     transferRequestCard.ReceiverAddress.City = "El PASO";
     transferRequestCard.ReceiverAddress.CountrySubdivision = "TX";
     transferRequestCard.ReceiverAddress.PostalCode = 79906;
     transferRequestCard.ReceiverAddress.Country = "USA";
     transferRequestCard.ReceiverPhone = 1800639426;
     transferRequestCard.ReceivingCard.AccountNumber = 5184680430000006L;
     //transferRequestCard.ReceivingCard.AccountNumber = Convert.ToInt64(Services.Get<GroupDetailService>().GetByGroupId(clientPaymentInformation.GroupId).CardNumber);
     transferRequestCard.ReceivingAmount.Value = 182206;
     transferRequestCard.ReceivingAmount.Currency = 484;
     transferRequestCard.Channel = "W";
     transferRequestCard.UCAFSupport = false;
     transferRequestCard.ICA = "009674";
     transferRequestCard.ProcessorId = 9000000442L;
     transferRequestCard.RoutingAndTransitNumber = 990442082;
     transferRequestCard.CardAcceptor.Name = "My Local Bank";
     transferRequestCard.CardAcceptor.City = "Saint Louis";
     transferRequestCard.CardAcceptor.State = "MO";
     transferRequestCard.CardAcceptor.PostalCode = 63101;
     transferRequestCard.CardAcceptor.Country = "USA";
     transferRequestCard.TransactionDesc = "P2P";
     transferRequestCard.MerchantId = 123456;
     TransferService service = new TransferService();
     var transfer = service.GetTransfer(transferRequestCard);
     return transfer;
 }
 public Transfer GetTransfer(TransferRequest transferRequest)
 {
     //Determine if TransferRequest is specifying card account number or mapped account
     if (transferRequest.FundingMapped.SubscriberId == null)
     {
         transferRequest.FundingMapped = null;
     }
     else
     {
         transferRequest.SenderAddress = null;
         transferRequest.FundingCard = null;
     }
     string response = "";
     Dictionary<string, string> responseMap = doRequest(GetURL(), "POST", Serializer<TransferRequest>.Serialize(transferRequest).InnerXml);
     responseMap.TryGetValue(MESSAGE, out response);
     return Serializer<Transfer>.Deserialize(response);
 }
 public void TestTransferRequestMappedTest()
 {
     TransferRequest transferRequestMapped = new TransferRequest();
     transferRequestMapped.LocalDate = "1212";
     transferRequestMapped.LocalTime = "161222";
     transferRequestMapped.TransactionReference = 4000000003010101016L;
     transferRequestMapped.FundingMapped.SubscriberId = "*****@*****.**";
     transferRequestMapped.FundingMapped.SubscriberType = "EMAIL_ADDRESS";
     transferRequestMapped.FundingMapped.SubscriberAlias = "My Debit Card";
     transferRequestMapped.FundingUCAF = "MjBjaGFyYWN0ZXJqdW5rVUNBRjU=1111";
     transferRequestMapped.FundingMasterCardAssignedId = 123456;
     transferRequestMapped.FundingAmount.Value = 15000;
     transferRequestMapped.FundingAmount.Currency = 840;
     transferRequestMapped.ReceiverName = "Jose Lopez";
     transferRequestMapped.ReceiverAddress.Line1 = "Pueblo Street";
     transferRequestMapped.ReceiverAddress.Line2 = "PO BOX 12";
     transferRequestMapped.ReceiverAddress.City = "El PASO";
     transferRequestMapped.ReceiverAddress.CountrySubdivision = "TX";
     transferRequestMapped.ReceiverAddress.PostalCode = 79906;
     transferRequestMapped.ReceiverAddress.Country = "USA";
     transferRequestMapped.ReceiverPhone = 1800639426;
     transferRequestMapped.ReceivingCard.AccountNumber = 5184680430000014L;
     transferRequestMapped.ReceivingAmount.Value = 182206;
     transferRequestMapped.ReceivingAmount.Currency = 484;
     transferRequestMapped.Channel = "W";
     transferRequestMapped.UCAFSupport = false;
     transferRequestMapped.ICA = "009674";
     transferRequestMapped.ProcessorId = 9000000442L;
     transferRequestMapped.RoutingAndTransitNumber = 990442082;
     transferRequestMapped.CardAcceptor.Name = "My Local Bank";
     transferRequestMapped.CardAcceptor.City = "Saint Louis";
     transferRequestMapped.CardAcceptor.State = "MO";
     transferRequestMapped.CardAcceptor.PostalCode = 63101;
     transferRequestMapped.CardAcceptor.Country = "USA";
     transferRequestMapped.TransactionDesc = "P2P";
     transferRequestMapped.MerchantId = 123456;
     Transfer transfer = service.GetTransfer(transferRequestMapped);
     Assert.IsTrue(transfer != null);
     Assert.IsTrue(transfer.TransactionReference > 0);
     Assert.IsTrue(transfer.TransactionHistory != null);
     Assert.IsTrue(transfer.TransactionHistory[0].Response.Code == 00);
     Assert.IsTrue(transfer.TransactionHistory[1].Response.Code == 00);
 }
 public void TestTransferRequestCardTest()
 {
     TransferRequest transferRequestCard = new TransferRequest();
     transferRequestCard.LocalDate = "1212";
     transferRequestCard.LocalTime = "161222";
     transferRequestCard.TransactionReference = 4000000001010102028L;
     transferRequestCard.SenderName = "John Doe";
     transferRequestCard.SenderAddress.Line1 = "123 Main Street";
     transferRequestCard.SenderAddress.Line2 = "#5A";
     transferRequestCard.SenderAddress.City = "Arlington";
     transferRequestCard.SenderAddress.CountrySubdivision = "VA";
     transferRequestCard.SenderAddress.PostalCode = 22207;
     transferRequestCard.SenderAddress.Country = "USA";
     transferRequestCard.FundingCard.AccountNumber = 5184680430000006L;
     transferRequestCard.FundingCard.ExpiryMonth = 11;
     transferRequestCard.FundingCard.ExpiryYear = 2014;
     transferRequestCard.FundingUCAF = "MjBjaGFyYWN0ZXJqdW5rVUNBRjU=1111";
     transferRequestCard.FundingMasterCardAssignedId = 123456;
     transferRequestCard.FundingAmount.Value = 15000;
     transferRequestCard.FundingAmount.Currency = 840;
     transferRequestCard.ReceiverName = "Jose Lopez";
     transferRequestCard.ReceiverAddress.Line1 = "Pueblo Street";
     transferRequestCard.ReceiverAddress.Line2 = "PO BOX 12";
     transferRequestCard.ReceiverAddress.City = "El PASO";
     transferRequestCard.ReceiverAddress.CountrySubdivision = "TX";
     transferRequestCard.ReceiverAddress.PostalCode = 79906;
     transferRequestCard.ReceiverAddress.Country = "USA";
     transferRequestCard.ReceiverPhone = 1800639426;
     transferRequestCard.ReceivingCard.AccountNumber = 5184680430000006L;
     transferRequestCard.ReceivingAmount.Value = 182206;
     transferRequestCard.ReceivingAmount.Currency = 484;
     transferRequestCard.Channel = "W";
     transferRequestCard.UCAFSupport = false;
     transferRequestCard.ICA = "009674";
     transferRequestCard.ProcessorId = 9000000442L;
     transferRequestCard.RoutingAndTransitNumber = 990442082;
     transferRequestCard.CardAcceptor.Name = "My Local Bank";
     transferRequestCard.CardAcceptor.City = "Saint Louis";
     transferRequestCard.CardAcceptor.State = "MO";
     transferRequestCard.CardAcceptor.PostalCode = 63101;
     transferRequestCard.CardAcceptor.Country = "USA";
     transferRequestCard.TransactionDesc = "P2P";
     transferRequestCard.MerchantId = 123456;
     Transfer transfer = service.GetTransfer(transferRequestCard);
     Assert.IsTrue(transfer != null);
     Assert.IsTrue(transfer.TransactionReference > 0);
     Assert.IsTrue(transfer.TransactionHistory != null);
     Assert.IsTrue(transfer.TransactionHistory[0].Response.Code == 00);
     Assert.IsTrue(transfer.TransactionHistory[1].Response.Code == 00);
 }