public void TestPaymentRequestMappedTest() { PaymentRequest paymentRequestMapped = new PaymentRequest(); paymentRequestMapped.LocalDate = "1226"; paymentRequestMapped.LocalTime = "125334"; paymentRequestMapped.TransactionReference = 4000000002010101037L; paymentRequestMapped.SenderName = "John Doe"; paymentRequestMapped.SenderAddress.Line1 = "123 Main Street"; paymentRequestMapped.SenderAddress.Line2 = "#5A"; paymentRequestMapped.SenderAddress.City = "Arlington"; paymentRequestMapped.SenderAddress.CountrySubdivision = "VA"; paymentRequestMapped.SenderAddress.PostalCode = 22207; paymentRequestMapped.SenderAddress.Country = "USA"; paymentRequestMapped.ReceivingMapped.SubscriberId = "*****@*****.**"; paymentRequestMapped.ReceivingMapped.SubscriberType = "EMAIL_ADDRESS"; paymentRequestMapped.ReceivingMapped.SubscriberAlias = "My Debit Card"; paymentRequestMapped.ReceivingAmount.Value = 10000; paymentRequestMapped.ReceivingAmount.Currency = 840; paymentRequestMapped.ICA = "009674"; paymentRequestMapped.ProcessorId = 9000000442L; paymentRequestMapped.RoutingAndTransitNumber = 990442082; paymentRequestMapped.CardAcceptor.Name = "My Local Bank"; paymentRequestMapped.CardAcceptor.City = "Saint Louis"; paymentRequestMapped.CardAcceptor.State = "MO"; paymentRequestMapped.CardAcceptor.PostalCode = 63101; paymentRequestMapped.CardAcceptor.Country = "USA"; paymentRequestMapped.TransactionDesc = "P2P"; paymentRequestMapped.MerchantId = 123456; Transfer transfer = service.GetTransfer(paymentRequestMapped); Assert.IsTrue(transfer != null); Assert.IsTrue(transfer.TransactionReference > 0); Assert.IsTrue(transfer.TransactionHistory != null); Assert.IsTrue(transfer.TransactionHistory[0].Response.Code == 00); }
public void TestPaymentRequestCardTest() { PaymentRequest paymentRequestCard = new PaymentRequest(); paymentRequestCard.LocalDate = "1226"; paymentRequestCard.LocalTime = "125334"; paymentRequestCard.TransactionReference = 4000000003010101032L; paymentRequestCard.SenderName = "John Doe"; paymentRequestCard.SenderAddress.Line1 = "123 Main Street"; paymentRequestCard.SenderAddress.Line2 = "#5A"; paymentRequestCard.SenderAddress.City = "Arlington"; paymentRequestCard.SenderAddress.CountrySubdivision = "VA"; paymentRequestCard.SenderAddress.PostalCode = 22207; paymentRequestCard.SenderAddress.Country = "USA"; paymentRequestCard.ReceivingCard.AccountNumber = 5184680430000014L; paymentRequestCard.ReceivingAmount.Value = 182206; paymentRequestCard.ReceivingAmount.Currency = 484; paymentRequestCard.ICA = "009674"; paymentRequestCard.ProcessorId = 9000000442L; paymentRequestCard.RoutingAndTransitNumber = 990442082; paymentRequestCard.CardAcceptor.Name = "My Local Bank"; paymentRequestCard.CardAcceptor.City = "Saint Louis"; paymentRequestCard.CardAcceptor.State = "MO"; paymentRequestCard.CardAcceptor.PostalCode = 63101; paymentRequestCard.CardAcceptor.Country = "USA"; paymentRequestCard.TransactionDesc = "P2P"; paymentRequestCard.MerchantId = 123456; Transfer transfer = service.GetTransfer(paymentRequestCard); Assert.IsTrue(transfer != null); Assert.IsTrue(transfer.TransactionReference > 0); Assert.IsTrue(transfer.TransactionHistory != null); Assert.IsTrue(transfer.TransactionHistory[0].Response.Code == 00); }
public Transfer GetTransfer(PaymentRequest paymentRequest) { //Determine if PaymentRequest is specifying card account number or mapped account if (paymentRequest.ReceivingMapped.SubscriberId == null) { paymentRequest.ReceivingMapped = null; } else { paymentRequest.ReceivingCard = null; } string response = ""; Dictionary<string, string> responseMap = doRequest(GetURL(), "POST", Serializer<PaymentRequest>.Serialize(paymentRequest).InnerXml); responseMap.TryGetValue(MESSAGE, out response); return Serializer<Transfer>.Deserialize(response); }