/// <summary>
        /// Activate GiveX
        /// </summary>
        /// <param name="strCardNum">Card number</param>
        /// <param name="amount">Amount</param>
        /// <param name="saleNum">Sale number</param>
        /// <param name="refNum">Reference number</param>
        /// <param name="userCode">User code</param>
        /// <param name="errorMessage">Error message</param>
        /// <param name="givexReceipt">Givex receipt</param>
        /// <returns>true/false</returns>
        public bool ActivateGiveX(string strCardNum, float amount, int saleNum, ref string refNum,
                                  string userCode, out ErrorMessage errorMessage, out GiveXReceiptType givexReceipt)
        {
            var dateStart = DateTime.Now;

            Performancelog.Debug($"Start,GivexClientManager,ActivateGiveX,{string.Empty},{DateTime.Now:hh.mm.ss.ffffff}");
            var returnValue = false;

            errorMessage = new ErrorMessage();
            var response = new Variables.GiveXResponseType();

            givexReceipt = new GiveXReceiptType();
            refNum       = "";
            if (string.IsNullOrEmpty(strCardNum))
            {
                return(false);
            }

            modStringPad.InitGiveXRequest();
            Variables.GX_Request.ServiceType = "Activation";

            Variables.GX_Request.UserID = Convert.ToString(_givexPolicies["GIVEX_USER"]);

            Variables.GX_Request.UserPassword = Convert.ToString(_givexPolicies["GIVEX_PASS"]);

            Variables.GX_Request.OperatorID       = Convert.ToString(userCode); // "ALL"
            Variables.GX_Request.GivexNumber      = strCardNum.Trim();
            Variables.GX_Request.Language         = "0";
            Variables.GX_Request.Amount           = (amount).ToString(CultureInfo.InvariantCulture);
            Variables.GX_Request.TransactionCode  = (saleNum).ToString();
            Variables.GX_Request.TransmissionDate = DateAndTime.Today.ToString("MM/dd/yyyy");
            Variables.GX_Request.TransmissionTime = DateAndTime.TimeOfDay.ToString("hh:mm:ss");
            Variables.GX_Request.TerminalID       = "ALL";
            var strSend = modStringPad.GetGiveXRequest();

            if (SendGiveXRequest(strSend, "Activation," + (saleNum), "Activation", ref response, out errorMessage))
            {
                if (response.Result != "Approved")
                {
                    errorMessage.MessageStyle = _resourceManager.DisplayMsgForm(_offSet, response.TransactionReference.Trim() != "" ? 3265 : 3264, 99, response.TransactionReference, CriticalOkMessageType);
                    errorMessage.StatusCode   = HttpStatusCode.NotAcceptable;
                    return(false);
                }
                if (response.GivexNumber != strCardNum.Trim())
                {
                    //Call DisplayMsgForm("Invalid response from GiveX TPS, Gift Certificate is canceled!", 99)
                    errorMessage.MessageStyle = _resourceManager.DisplayMsgForm(_offSet, 3264, 99,
                                                                                response.TransactionReference, CriticalOkMessageType);
                }
                else
                {
                    returnValue = true;
                    refNum      = response.TransactionReference;



                    modStringPad.InitGiveXReceipt();
                    Variables.GX_Receipt.Date = DateAndTime.Today.ToString("MM/dd/yyyy");
                    Variables.GX_Receipt.Time = DateAndTime.TimeOfDay.ToString("hh:mm:ss");

                    Variables.GX_Receipt.UserID       = Convert.ToString(_givexPolicies["GIVEX_USER"]);
                    Variables.GX_Receipt.TranType     = 1; //Activation
                    Variables.GX_Receipt.SaleNum      = saleNum;
                    Variables.GX_Receipt.SeqNum       = response.TransactionReference;
                    Variables.GX_Receipt.CardNum      = response.GivexNumber;
                    Variables.GX_Receipt.SaleAmount   = float.Parse(response.Amount);
                    Variables.GX_Receipt.ExpDate      = string.Format(response.ExpiryDate, "yyMM");
                    Variables.GX_Receipt.Balance      = (float)(Conversion.Val(response.CertificateBalance));
                    Variables.GX_Receipt.PointBalance = (float)(Conversion.Val(response.PointsBalance));
                    Variables.GX_Receipt.ResponseCode = response.Result;

                    givexReceipt = new GiveXReceiptType
                    {
                        Date         = DateAndTime.Today.ToString("MM/dd/yyyy"),
                        Time         = DateAndTime.TimeOfDay.ToString("hh:mm:ss"),
                        UserID       = Convert.ToString(_givexPolicies["GIVEX_USER"]),
                        TranType     = 1, //Activation
                        SaleNum      = saleNum,
                        SeqNum       = response.TransactionReference,
                        CardNum      = response.GivexNumber,
                        SaleAmount   = float.Parse(response.Amount),
                        ExpDate      = string.Format(response.ExpiryDate, "yyMM"),
                        Balance      = (float)(Conversion.Val(response.CertificateBalance)),
                        PointBalance = (float)(Conversion.Val(response.PointsBalance)),
                        ResponseCode = response.Result,
                    };
                }
            }
            Performancelog.Debug($"End,GivexClientManager,ActivateGiveX,{DateTime.Now.Subtract(dateStart).TotalMilliseconds},{DateTime.Now:hh.mm.ss.ffffff}");

            return(returnValue);
        }