private PayFlowRequest SetReq(CartShipPayInfo csp, CreditCardInfo card)
        {
            PayFlowRequest req = new PayFlowRequest
            {
                Pwd     = "1812war347813",
                Vendor  = "stesha",
                User    = "******",
                Partner = "VSA",//id of the gateway provider
                //live endpoint
                // Endpoint = "https://payflowpro.paypal.com",
                //test endpoint
                Endpoint  = "https://pilot-payflowpro.paypal.com",
                Amt       = Convert.ToString(csp.ShoppingCart.ComputeCartValue()), // amount of sale with two decimal places
                Currency  = "AUD",
                Trxtype   = "S",                                                   // type of transaction S-for sale
                Tender    = "C",                                                   // method of payment C - for credit card
                Timeout   = "300",
                Verbosity = "HIGH",
                Hostport  = "443",

                // temp values
                SecCode = card.Verification,
                Acct    = card.Account, // creit card number
                ExpDate = "0719"        //card.months + card.years

                                        ///additional possible settings
                                        ///SILENTTRAN=TRUE // for silent redirect
            };

            return(req);
        }
        // use following test details for FDMS Nashvillle processor 4111111111111111 (a 4 and fifteen 1’s), expiration date 12/15, card security code 123.



        public ActionResult Set(CreditCardInfo card)
        {
            CartShipPayInfo csp = (CartShipPayInfo)Session["CartShipPayInfo"];
            PayFlowRequest  req = SetReq(csp, card);

            string payLoad  = req.BuildPayload();
            string response = SendReq(req.Endpoint, payLoad, BuildHeaders());
            string result   = GetValue(response, "RESULT");
            Order  order    = CopyDirectPaymentToOrder(response);

            if (result.Equals("0") && GetValue(response, "CVV2MATCH") == "Y")
            {
                TempData["Confirm"] = "The payment has been successfully processed";

                repo.SaveAllToDatabase(order);
                csp.ShoppingCart.ClearCart();

                return(View("ConfirmPayment", order));
            }
            else
            {
                TempData["Fail"] = "Payment failed";
                repo.SaveIncompleteOrder(order);
                return(View("_ErrorDisplay"));
            }
        }