public void Save(ExtendedInformation info)
        {
            _information = info;

            if (IsNew())
                Insert();
            else
                Update();
        }
예제 #2
0
 /// <summary>
 /// Void transaction attempt to cancel a transaction that has already been processed successfully with a payment gateway, but before settlement with the bank, if cancellation is not possible a refund (credit) must be performed.
 /// </summary>
 /// <param name="transactionKey"></param>
 /// <param name="extInfo">The extension information, usualy be null.</param>
 /// <returns></returns>
 public virtual async Task <ServiceNetResponse> Void(string transactionKey, ExtendedInformation extInfo)
 {
     return(await this.ProcessReferenceTransaction((transaction) =>
     {
         transaction.Type = TransactionType.Void.ToString("g");
         transaction.ReferenceKey = transactionKey;
         transaction.ReqTrxTag = extInfo?.RequestTransactionTag;
     }));
 }
예제 #3
0
        public void ValidatePreAuthorizeMethod_ExtendedInformationIsEmpty_PreAuthozationFail()
        {
            if (isAuthorizeNet)
            {
                return;
            }

            ExtendedInformation extendedInformation = new ExtendedInformation(); //Extended information is empty
            ServiceNetResponse  result = _paymentService.PreAuthorize(_amount, _currency, _badcard, _extendedInformation).Result;

            Assert.AreEqual(false, result.Success);
        }
예제 #4
0
        public void Save(ExtendedInformation info)
        {
            _information = info;

            if (IsNew())
            {
                Insert();
            }
            else
            {
                Update();
            }
        }
예제 #5
0
 /// <summary>
 /// Creates a new offer
 /// </summary>
 /// <param name="price"></param>
 /// <param name="place"></param>
 /// <param name="rating"></param>
 /// <param name="hotelname"></param>
 /// <param name="anfahrt"></param>
 /// <param name="daycount"></param>
 /// <param name="futtertyp"></param>
 /// <param name="category"></param>
 /// <param name="image"></param>
 /// <param name="top"></param>
 /// <param name="zusatzinf"></param>
 /// <param name="zusatz2"></param>
 /// <param name="zusatz3"></param>
 public void CreateOffers(int price, String place, int rating, String hotelname, String anfahrt, int daycount, String futtertyp, CategoryEnum category, String image, bool top, String zusatzinf, String zusatz2, String zusatz3)
 {
     try
     {
         var dao   = new TravelOfferDao();
         var offer = new TravelOffer()
         {
             PricePerPerson = price,
             Place          = place,
             ImgPath        = image,
             HotelRating    = rating,
             HotelName      = hotelname,
             TravelType     = anfahrt,
             DayCount       = daycount,
             BoardType      = futtertyp,
             CategoryId     = (int)category,
             TopOffer       = top,
         };
         ExtendedInformation ei = new ExtendedInformation()
         {
             Information = zusatzinf
         };
         offer.ExtendedInformation.Add(ei);
         if (zusatz2 != "")
         {
             ExtendedInformation ei2 = new ExtendedInformation()
             {
                 Information = zusatz2
             };
             offer.ExtendedInformation.Add(ei2);
         }
         if (zusatz3 != "")
         {
             ExtendedInformation ei3 = new ExtendedInformation()
             {
                 Information = zusatz3
             };
             offer.ExtendedInformation.Add(ei3);
         }
         offer.ExtendedInformation.Add(ei);
         dao.Save(offer);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
         Console.WriteLine("Create Offers: Error in entry.");
     }
 }
예제 #6
0
        public async Task TestSuccessCreditCardTransaction_ChargeVoid_TransactionIsSuccess()
        {
            ExtendedInformation extInfo = new ExtendedInformation
            {
                Customer      = "TEST_0199999",
                InvoiceNumber = "TEST" + DateTime.Now.ToString("yyyyMMdd_HHmmss.fffff"),
                DocumentHead  = new LevelTwoData
                {
                    DiscountAmount = 10M,
                    DutyAmount     = 110M,
                    TaxAmount      = 10M,
                    FreightAmount  = 5M,
                    ShipFromZip    = "60139",
                    ShipToZip      = "60189",
                    PONumber       = "PO_1235",
                    OrderDate      = DateTime.Now
                }
            };
            //Test PreAuthorize method.
            ServiceNetResponse result = await _paymentService.Sale(115M, _currency, _goodcard, extInfo);

            Assert.AreEqual(result.Success, true);
            Assert.AreEqual(TransactionStatus.Approved, result.TransactionStatus);
            Assert.IsNotNull(result.TransactionResponse);

            var tranResult = result.TransactionResponse;

            Assert.IsNotNull(tranResult.TransactionKey);

            string transactionKey = tranResult.TransactionKey;

            if (isAuthorizeNet) // skip void when gateway is Authorize.Net
            {
                return;
            }

            //Test Void method.
            result = _paymentService.Void(transactionKey, _extendedInformation).Result;
            Assert.AreEqual(true, result.Success);
            Assert.AreEqual(TransactionStatus.Approved, result.TransactionStatus);
            Assert.IsNotNull(result.TransactionResponse);
        }
        public void TestInit()
        {
            TestServices.InitializeService();


            _walletService  = TestServices.ServiceProvider.GetService <IWalletService>();
            _paymentService = TestServices.ServiceProvider.GetService <IPaymentService>();

            _cardA = new Card
            {
                Customer   = "TESTAUTO",
                CardHolder = new CardHolder
                {
                    FirstName = "PantsON",
                    LastName  = "Fire",
                },

                Account        = "4583194798565295",
                Cvc            = "532",
                ExpirationDate = "0925",
                Billto         = new Address
                {
                    City    = "Wheton",
                    Country = "USA",
                    Line1   = "218 Esat Avenue",
                    State   = "IL",
                    Zip     = "60139",
                    Email   = "*****@*****.**"
                }
            };

            _cardB = new Card
            {
                Customer   = "TESTAUTO",
                CardHolder = new CardHolder
                {
                    FirstName = "PantsON",
                    LastName  = "Fire",
                },

                Account        = "4111111111111111",
                Cvc            = "532",
                ExpirationDate = "0925",
                Billto         = new Address
                {
                    City    = "Wheton",
                    Country = "USA",
                    Line1   = "218 Esat Avenue",
                    State   = "IL",
                    Zip     = "60139",
                    Email   = "*****@*****.**"
                }
            };

            _extendedInformation = new ExtendedInformation
            {
                InvoiceNumber = "Inv0001",
                DocumentHead  = new LevelTwoData
                {
                    DutyAmount    = 100M,
                    FreightAmount = 110M,
                    OrderDate     = DateTime.Now,
                    PONumber      = "Po0013",
                    TaxAmount     = 43.98M,
                }
            };
        }
예제 #8
0
        /// <summary>
        /// Force transaction is to enter an already approved authorization/transaction. A Force is typically used for capturing a phone or voice authorization. When entering a Force you will be required to enter the authorization code.
        /// </summary>
        /// <param name="authorizationCode">the previous authorization code</param>
        /// <param name="amount">amount</param>
        /// <param name="currency">currency of the amount </param>
        /// <param name="card">Credit card</param>
        /// <param name="extInfo">the extension information</param>
        /// <returns>The ServiceNetResponse object, include the http status, raw response and transaction response</returns>
        public virtual async Task <ServiceNetResponse> Force(string authorizationCode, decimal amount, string currency, Card card, ExtendedInformation extInfo)
        {
            return(await this.CreateProcessTransaction((transaction) =>
            {
                transaction.Type = TransactionType.Force.ToString("g");
                transaction.ReqAuthCode = authorizationCode;
                transaction.Card = card;
                transaction.Amount = amount;
                transaction.Currency = currency;
                transaction.Customer = extInfo.Customer;
                if (!string.IsNullOrWhiteSpace(card?.Customer))
                {
                    transaction.Customer = card.Customer;
                }

                SetupTransactionDocument(transaction, extInfo);
            }));
        }
예제 #9
0
        private void SetupTransactionDocument(Transaction transaction, ExtendedInformation extInfo)
        {
            if (extInfo != null)
            {
                System.Globalization.CultureInfo us = new System.Globalization.CultureInfo("en-us");

                if (string.IsNullOrWhiteSpace(transaction.Customer) && !string.IsNullOrWhiteSpace(extInfo.Customer))
                {
                    transaction.Customer = extInfo.Customer;
                }

                transaction.Document = new Document()
                {
                    Head = new System.Collections.Generic.List <NameValue>()
                };

                var head = transaction.Document.Head;

                if (!string.IsNullOrWhiteSpace(extInfo.InvoiceNumber))
                {
                    head.Add(new NameValue()
                    {
                        Name  = "InvoiceNumber",
                        Value = extInfo.InvoiceNumber
                    });
                }

                if (extInfo.DocumentHead != null)
                {
                    var lvl2 = extInfo.DocumentHead;

                    if (!string.IsNullOrWhiteSpace(lvl2.PONumber))
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "PONumber",
                            Value = lvl2.PONumber
                        });
                    }

                    if (lvl2.DiscountAmount != null)
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "DiscountAmount",
                            Value = Convert.ToString(lvl2.DiscountAmount.Value, us)
                        });
                    }

                    if (lvl2.DutyAmount != null)
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "DutyAmount",
                            Value = Convert.ToString(lvl2.DutyAmount.Value, us)
                        });
                    }

                    if (lvl2.FreightAmount != null)
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "FreightAmount",
                            Value = Convert.ToString(lvl2.FreightAmount.Value, us)
                        });
                    }

                    if (lvl2.HandlingAmount != null)
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "HandlingAmount",
                            Value = Convert.ToString(lvl2.HandlingAmount.Value, us)
                        });
                    }

                    if (lvl2.IsTaxExempt.GetValueOrDefault())
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "TaxExempt",
                            Value = "Y"
                        });
                    }

                    if (lvl2.TaxAmount != null)
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "TaxAmount",
                            Value = Convert.ToString(lvl2.TaxAmount.Value, us)
                        });
                    }

                    if (!string.IsNullOrWhiteSpace(lvl2.ShipFromZip))
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "ShipFromZip",
                            Value = lvl2.ShipFromZip
                        });
                    }

                    if (!string.IsNullOrWhiteSpace(lvl2.ShipToZip))
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "ShipToZip",
                            Value = lvl2.ShipToZip
                        });
                    }

                    if (lvl2.OrderDate != null)
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "OrderDate",
                            Value = lvl2.OrderDate.Value.ToString("MM/dd/yyyy")
                        });
                    }


                    if (lvl2.VATTaxAmount != null)
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "VATTaxAmount",
                            Value = Convert.ToString(lvl2.VATTaxAmount.Value, us)
                        });
                    }

                    if (lvl2.VATTaxRate != null)
                    {
                        head.Add(new NameValue()
                        {
                            Name  = "VATTaxRate",
                            Value = Convert.ToString(lvl2.VATTaxRate.Value, us)
                        });
                    }
                }

                if (transaction.Document.Head.Count == 0)
                {
                    transaction.Document.Head = null;
                }

                if (extInfo.DocumentLines != null && extInfo.DocumentLines.Count > 0)
                {
                    transaction.Document.Lines = new List <DocumentLine>();
                    foreach (var l3 in extInfo.DocumentLines)
                    {
                        var line = new List <NameValue>();
                        if (l3.ItemCommodityCode != null)
                        {
                            line.Add(new NameValue {
                                Name = "ItemCommodityCode", Value = l3.ItemCommodityCode
                            });
                        }

                        if (l3.ItemProdCode != null)
                        {
                            line.Add(new NameValue {
                                Name = "ItemProdCode", Value = l3.ItemProdCode
                            });
                        }

                        if (l3.ItemUPC != null)
                        {
                            line.Add(new NameValue {
                                Name = "ItemUPC", Value = l3.ItemUPC
                            });
                        }

                        if (l3.ItemUOM != null)
                        {
                            line.Add(new NameValue {
                                Name = "ItemUOM", Value = l3.ItemUOM
                            });
                        }

                        if (l3.ItemDesc != null)
                        {
                            line.Add(new NameValue {
                                Name = "ItemDesc", Value = l3.ItemDesc
                            });
                        }

                        if (l3.ItemAmount != null)
                        {
                            line.Add(new NameValue {
                                Name = "ItemAmount", Value = Convert.ToString(l3.ItemAmount.Value, us)
                            });
                        }

                        if (l3.ItemCost != null)
                        {
                            line.Add(new NameValue {
                                Name = "ItemCost", Value = Convert.ToString(l3.ItemCost.Value, us)
                            });
                        }

                        if (l3.ItemDiscount != null)
                        {
                            line.Add(new NameValue {
                                Name = "ItemDiscount", Value = Convert.ToString(l3.ItemDiscount.Value, us)
                            });
                        }

                        if (l3.ItemFreightAmount != null)
                        {
                            line.Add(new NameValue {
                                Name = "ItemFreightAmount", Value = Convert.ToString(l3.ItemFreightAmount.Value, us)
                            });
                        }

                        if (l3.ItemHandlingAmount != null)
                        {
                            line.Add(new NameValue {
                                Name = "ItemHandlingAmount", Value = Convert.ToString(l3.ItemHandlingAmount.Value, us)
                            });
                        }

                        if (l3.ItemQuantity != null)
                        {
                            line.Add(new NameValue {
                                Name = "ItemQuantity", Value = Convert.ToString(l3.ItemQuantity.Value, us)
                            });
                        }

                        transaction.Document.Lines.Add(new DocumentLine {
                            Columns = line
                        });
                    }
                }

                //set up userdefined
                if (extInfo.ExtentionInformation != null && extInfo.ExtentionInformation.Count > 0)
                {
                    transaction.Document.UserDefined = new List <NameValue>();
                    foreach (var entry in extInfo.ExtentionInformation)
                    {
                        transaction.Document.UserDefined.Add(new NameValue
                        {
                            Name  = entry.Key,
                            Value = Convert.ToString(entry.Value, us)
                        });
                    }
                }

                //set pf.document is null if there is no actual content
                if (transaction.Document.Lines == null &&
                    transaction.Document.Head == null &&
                    transaction.Document.DefaultBillTo == null &&
                    transaction.Document.UserDefined == null)
                {
                    transaction.Document = null;
                }
            }
        }
예제 #10
0
 /// <summary>
 /// Capture transaction will attempt to execute and finalize (capture) a pre-authorized transaction with specific amount, if Amount is null, it will capture with authorized amount. if Amount is provoided, it could be able to capture an authorization transaction multiple times, which depends on what gateway been used. (Note: Following gateways support multiple captures, Authorize.Net, USAePay & Payeezy(aka First Data GGE4).)
 /// </summary>
 /// <param name="transactionKey">The transaction key returned from the Authorization transaction. </param>
 /// <param name="amount">The capture amount.  If Amount is null, it will capture with authorized amount. </param>
 /// <param name="extInfo">The extension infomation, usaully be null </param>
 /// <returns></returns>
 public virtual async Task <ServiceNetResponse> Capture(string transactionKey, decimal?amount, ExtendedInformation extInfo)
 {
     return(await this.ProcessReferenceTransaction((transaction) =>
     {
         transaction.Type = TransactionType.Capture.ToString("g");
         transaction.ReferenceKey = transactionKey;
         transaction.Amount = amount;
         transaction.ReqTrxTag = extInfo?.RequestTransactionTag;
     }));
 }
예제 #11
0
        /// <summary>
        /// Refund transaction will attempt to credit a transaction that has already been submitted to a payment gateway and has been settled from the bank. PayFabric attempts to submit a CREDIT transaction for the same exact amount as the original SALE transaction.
        /// </summary>
        /// <param name="transactionKey">The previous settled transaction key.</param>
        /// <param name="amount">Amount to refund, for Payfabric, this amount must be null, since it does not support partial refund. </param>
        /// <param name="extInfo">The extension informaiont, usually be null.</param>
        /// <returns></returns>
        public virtual async Task <ServiceNetResponse> Refund(string transactionKey, decimal?amount, ExtendedInformation extInfo)
        {
            if (amount.HasValue)
            {
                throw new ArgumentException("Sorry, Payfabric does not support parital Refund. Please use Credit function.");
            }

            return(await this.ProcessReferenceTransaction((transaction) =>
            {
                transaction.Type = TransactionType.Refund.ToString("g");
                transaction.ReferenceKey = transactionKey;
                transaction.ReqTrxTag = extInfo?.RequestTransactionTag;
            }));
        }
예제 #12
0
        public void TestInit()
        {
            TestServices.InitializeService();

            var _payFabricOptions = TestServices.ServiceProvider.GetService <IOptions <PayFabricOptions> >().Value;

            _paymentService = TestServices.ServiceProvider.GetService <IPaymentService>();

            if (string.Compare(_payFabricOptions.SetupId, "AuthorizeNet", true) == 0)
            {
                isAuthorizeNet = true;
            }
            _amount   = 40.0M;
            _currency = "USD";
            _address  = new Address
            {
                City    = "Wheaton",
                Country = "USA",
                Email   = "*****@*****.**"
            };

            _badcard = new Card
            {
                CardHolder = new CardHolder
                {
                    FirstName = "PantsON",
                    LastName  = "Fire",
                },
                Account        = "4583194798565295",
                Cvc            = "532",
                ExpirationDate = "0925",
                Billto         = new Address
                {
                    City    = "Wheton",
                    Country = "USA",
                    Line1   = "218 Esat Avenue",
                    State   = "IL",
                    Zip     = "60139",
                    Email   = "*****@*****.**"
                }
            };

            _goodcard = new Card
            {
                CardHolder = new CardHolder
                {
                    FirstName = "PantsON",
                    LastName  = "Fire",
                },

                Account        = "4111111111111111",
                Cvc            = "532",
                ExpirationDate = "0925",
                Billto         = new Address
                {
                    City    = "wheaton",
                    Country = "USA",
                    Line1   = "1953 Wexford Cir",
                    State   = "IL",
                    Zip     = "60189",
                    Email   = "*****@*****.**"
                },
                Tender = TenderTypeEnum.CreditCard
            };

            _extendedInformation = new ExtendedInformation
            {
                Customer      = "TESTAUTO",
                InvoiceNumber = "Inv0001",
                DocumentHead  = new LevelTwoData
                {
                    DutyAmount    = 100M,
                    FreightAmount = 110M,
                    OrderDate     = DateTime.Now,
                    PONumber      = "Po0013",
                    TaxAmount     = 43.98M,
                }
            };
        }
예제 #13
0
        public void TestSuccessCreditCardTransaction_PreAuthorize_Force_Void_TransactionIsSuccess()
        {
            var card = new Card
            {
                CardHolder = new CardHolder
                {
                    FirstName = "PantsON",
                    LastName  = "Fire",
                },

                Account        = "4111111111111111",
                Cvc            = "532",
                ExpirationDate = "0925",
                Billto         = new Address
                {
                    City    = "wheaton",
                    Country = "USA",
                    Line1   = "1953 Wexford Cir",
                    State   = "IL",
                    Zip     = "60189",
                    Email   = "*****@*****.**"
                },
                Tender = TenderTypeEnum.CreditCard
            };

            ExtendedInformation extInfo = new ExtendedInformation
            {
                Customer      = "TEST_0199999",
                InvoiceNumber = "TEST" + DateTime.Now.ToString("yyyyMMdd_HHmmss.fffff"),
                DocumentHead  = new LevelTwoData
                {
                    DiscountAmount = 10M,
                    DutyAmount     = 110M,
                    TaxAmount      = 10M,
                    FreightAmount  = 5M,
                    ShipFromZip    = "60139",
                    ShipToZip      = "60189",
                    PONumber       = "PO_1235",
                    OrderDate      = DateTime.Now
                },
                DocumentLines = new List <LevelThreeData> {
                    new LevelThreeData
                    {
                        ItemDesc     = "SHOE-LA01-BLACK",
                        ItemQuantity = 1M,
                        ItemUOM      = "PAIR",
                        ItemAmount   = 55M,
                        ItemDiscount = 5M
                    },
                    new LevelThreeData
                    {
                        ItemDesc     = "SHOE-LA02-WHITE",
                        ItemQuantity = 1M,
                        ItemUOM      = "PAIR",
                        ItemAmount   = 55M,
                        ItemDiscount = 5M
                    }
                },
                ExtentionInformation = new Dictionary <string, object>()
                {
                    { "AppID", "PayFabric.Net" },
                    { "DisableEmailReceipt", true }
                }
            };

            //Test PreAuthorize method.
            ServiceNetResponse result = _paymentService.PreAuthorize(115.0M, _currency, card, extInfo).Result;

            Assert.AreEqual(result.Success, true);
            Assert.IsNotNull(result.TransactionResponse);

            var tranResult = result.TransactionResponse;

            Assert.AreEqual(TransactionStatus.Approved, result.TransactionStatus);
            Assert.IsNotNull(tranResult.TransactionKey);

            string authorizationCode = tranResult.AuthorizationCode;


            //Test Force method, set card.cvv=null;
            card.Cvc = null;
            result   = _paymentService.Force(authorizationCode, 115M, _currency, card, _extendedInformation).Result;
            Assert.AreEqual(true, result.Success);
            Assert.IsNotNull(result.TransactionResponse);

            tranResult = result.TransactionResponse;
            Assert.AreEqual(TransactionStatus.Approved, result.TransactionStatus);

            //Re-assign latest transaction key for next Void method to pass.
            var transactionKey = tranResult.TransactionKey;

            //Test Void method.
            result = _paymentService.Void(transactionKey, _extendedInformation).Result;
            Assert.AreEqual(true, result.Success);
            Assert.IsNotNull(result.TransactionResponse);

            tranResult = result.TransactionResponse;
            Assert.AreEqual(TransactionStatus.Approved, result.TransactionStatus);
        }
예제 #14
0
        public void TestSuccessCreditCardTransaction_PreAuthorizeCaptureVoid_TransactionIsSuccess()
        {
            ExtendedInformation extInfo = new ExtendedInformation
            {
                Customer      = "TEST_0199999",
                InvoiceNumber = "TEST" + DateTime.Now.ToString("yyyyMMdd_HHmmss.fffff"),
                DocumentHead  = new LevelTwoData
                {
                    DiscountAmount = 10M,
                    DutyAmount     = 110M,
                    TaxAmount      = 10M,
                    FreightAmount  = 5M,
                    ShipFromZip    = "60139",
                    ShipToZip      = "60189",
                    PONumber       = "PO_1235",
                    OrderDate      = DateTime.Now
                },
                DocumentLines = new List <LevelThreeData> {
                    new LevelThreeData
                    {
                        ItemDesc     = "SHOE-LA01-BLACK",
                        ItemQuantity = 1M,
                        ItemUOM      = "PAIR",
                        ItemAmount   = 55M,
                        ItemDiscount = 5M
                    },
                    new LevelThreeData
                    {
                        ItemDesc     = "SHOE-LA02-WHITE",
                        ItemQuantity = 1M,
                        ItemUOM      = "PAIR",
                        ItemAmount   = 55M,
                        ItemDiscount = 5M
                    }
                },
                ExtentionInformation = new Dictionary <string, object>()
                {
                    { "AppID", "PayFabric.Net" },
                    { "DisableEmailReceipt", true }
                }
            };
            //Test PreAuthorize method.
            ServiceNetResponse result = _paymentService.PreAuthorize(115.0M, _currency, _goodcard, extInfo).Result;

            Assert.AreEqual(result.Success, true);
            Assert.IsNotNull(result.TransactionResponse);

            var tranResult = result.TransactionResponse;

            Assert.AreEqual(TransactionStatus.Approved, result.TransactionStatus);
            Assert.IsNotNull(tranResult.TransactionKey);

            string transactionKey = tranResult.TransactionKey;

            //Test Capture method.
            result = _paymentService.Capture(transactionKey, 115M, _extendedInformation).Result;
            Assert.AreEqual(true, result.Success);
            Assert.IsNotNull(result.TransactionResponse);

            tranResult = result.TransactionResponse;

            Assert.AreEqual(TransactionStatus.Approved, result.TransactionStatus);

            //Re-assign latest transaction key for next Void method to pass.
            transactionKey = tranResult.TransactionKey;

            //Test Void method.
            result = _paymentService.Void(transactionKey, _extendedInformation).Result;
            Assert.AreEqual(true, result.Success);
            Assert.IsNotNull(result.TransactionResponse);

            tranResult = result.TransactionResponse;
            Assert.AreEqual(TransactionStatus.Approved, result.TransactionStatus);
        }