Exemplo n.º 1
0
        public static string Compute3DHash(GarantiPayRequest request, Settings3D settings3D)
        {
            SHA1          sha            = new SHA1CryptoServiceProvider();
            var           temp           = settings3D.Password + request.terminalid.PadLeft(9, '0');
            var           hashedPassword = sha.ComputeHash(Encoding.UTF8.GetBytes(temp));
            StringBuilder sb             = new StringBuilder();

            for (int i = 0; i < hashedPassword.Length; i++)

            {
                sb.Append(hashedPassword[i].ToString("X2"));
            }

            temp = request.terminalid + request.orderid + request.txnamount + request.successurl + request.errorurl + request.txntype
                   + request.txninstallmentcount + request.storekey + sb.ToString();
            var hashData = sha.ComputeHash(Encoding.UTF8.GetBytes(temp));

            sb = new StringBuilder();
            for (int i = 0; i < hashData.Length; i++)
            {
                sb.Append(hashData[i].ToString("X2"));
            }

            return(sb.ToString());
        }
Exemplo n.º 2
0
 private void SetupSharedSettings()
 {
     Settings3D.ConnectSliderSettings(_xSlider, 0);
     Settings3D.ConnectSliderSettings(_ySlider, 1);
     Settings3D.ConnectSliderSettings(_zSlider, 2);
     Settings3D.ConnectCamLookSliderSettings(_camLookSlider);
 }
Exemplo n.º 3
0
        private void SetupSharedSettings()
        {
            // Move
            Settings3D.ConnectMvSliderSettings(_mvPXSlider, 0, AxisSign.Positive);
            Settings3D.ConnectMvSliderSettings(_mvPYSlider, 1, AxisSign.Positive);
            Settings3D.ConnectMvSliderSettings(_mvPZSlider, 2, AxisSign.Positive);
            Settings3D.ConnectMvSliderSettings(_mvNXSlider, 0, AxisSign.Negative);
            Settings3D.ConnectMvSliderSettings(_mvNYSlider, 1, AxisSign.Negative);
            Settings3D.ConnectMvSliderSettings(_mvNZSlider, 2, AxisSign.Negative);
            Settings3D.ConnectMvDblSliderSettings(_mvXYSlider, PlaneId.XY);
            Settings3D.ConnectMvDblSliderSettings(_mvYZSlider, PlaneId.YZ);
            Settings3D.ConnectMvDblSliderSettings(_mvZXSlider, PlaneId.ZX);
            Settings2D.ConnectMvSliderSettings(_mvP2DModeXSlider, 0, AxisSign.Positive);
            Settings2D.ConnectMvSliderSettings(_mvP2DModeYSlider, 1, AxisSign.Positive);
            Settings2D.ConnectMvSliderSettings(_mvN2DModeXSlider, 0, AxisSign.Negative);
            Settings2D.ConnectMvSliderSettings(_mvN2DModeYSlider, 1, AxisSign.Negative);
            Settings2D.ConnectMvDblSliderSettings(_mv2DModeDblSlider);
            _mvVertexSnapDrag.Settings = Settings3D.VertexSnapSettings;

            // Rotate
            Settings3D.ConnectRtSliderSettings(_rtXSlider, 0);
            Settings3D.ConnectRtSliderSettings(_rtYSlider, 1);
            Settings3D.ConnectRtSliderSettings(_rtZSlider, 2);
            Settings3D.ConnectRtCamLookSliderSettings(_rtCamLookSlider);
        }
        public static string Execute(Sale3DPayRequest request, Settings3D settings3D)
        {
            request.secure3dhash = Compute3DHash(request, settings3D);
            NameValueCollection Data = new NameValueCollection();

            Data.Add("mode", request.mode);
            Data.Add("secure3dsecuritylevel", request.secure3dsecuritylevel);
            Data.Add("apiversion", request.apiversion);
            Data.Add("terminalprovuserid", request.terminalprovuserid);
            Data.Add("terminaluserid", request.terminaluserid);
            Data.Add("terminalmerchantid", request.terminalmerchantid);
            Data.Add("terminalid", request.terminalid);
            Data.Add("txntype", request.txntype);
            Data.Add("txnamount", request.txnamount);
            Data.Add("txncurrencycode", request.txncurrencycode);
            Data.Add("txninstallmentcount", request.txninstallmentcount);
            Data.Add("orderid", request.orderid);
            Data.Add("successurl", request.successurl);
            Data.Add("errorurl", request.errorurl);
            Data.Add("customeremailaddress", request.customeremailaddress);
            Data.Add("customeripaddress", request.customeripaddress);
            Data.Add("secure3dhash", request.secure3dhash);
            Data.Add("txntimestamp", request.txntimestamp);
            Data.Add("cardnumber", request.cardnumber);
            Data.Add("cardexpiredatemonth", request.cardexpiredatemonth);
            Data.Add("cardexpiredateyear", request.cardexpiredateyear);
            Data.Add("cardcvv2", request.cardcvv2);
            Data.Add("storekey", request.storekey);

            return(Helper.PreparePOSTForm(settings3D.BaseUrl, Data));
        }
        public static string Execute(Sale3DOOSPayRequest request, Settings3D settings3D)
        {
            request.secure3dhash = Compute3DHash(request, settings3D);
            NameValueCollection Data = new NameValueCollection();

            Data.Add("mode", request.mode);
            Data.Add("secure3dsecuritylevel", request.secure3dsecuritylevel);
            Data.Add("apiversion", request.apiversion);
            Data.Add("terminalprovuserid", request.terminalprovuserid);
            Data.Add("terminaluserid", request.terminaluserid);
            Data.Add("terminalmerchantid", request.terminalmerchantid);
            Data.Add("terminalid", request.terminalid);
            Data.Add("txntype", request.txntype);
            Data.Add("txnamount", request.txnamount);
            Data.Add("txncurrencycode", request.txncurrencycode);
            Data.Add("txninstallmentcount", request.txninstallmentcount);
            Data.Add("orderid", request.orderid);
            Data.Add("successurl", request.successurl);
            Data.Add("errorurl", request.errorurl);
            Data.Add("customeremailaddress", request.customeremailaddress);
            Data.Add("customeripaddress", request.customeripaddress);
            Data.Add("secure3dhash", request.secure3dhash);
            Data.Add("lang", request.lang);
            Data.Add("refreshtime", request.refreshtime);
            Data.Add("txntimestamp", request.txntimestamp);
            Data.Add("companyname", request.companyname);

            return(Helper.PreparePOSTForm(settings3D.BaseUrl, Data));
        }
Exemplo n.º 6
0
 public void ClearSettings()
 {
     m3DSettings         = null;
     m6DOFSettings       = null;
     mAnalogSettings     = null;
     mForceSettings      = null;
     mGazeVectorSettings = null;
     mGeneralSettings    = null;
     mImageSettings      = null;
 }
Exemplo n.º 7
0
 public void ClearSettings()
 {
     m3DSettings                 = null;
     m6DOFSettings               = null;
     mAnalogSettings             = null;
     mForceSettings              = null;
     mGazeVectorSettings         = null;
     mSkeletonSettingsCollection = null;
     mGeneralSettings            = null;
     mImageSettings              = null;
 }
Exemplo n.º 8
0
        private void SetupSharedSettings()
        {
            Settings3D.ConnectSliderSettings(_pstvXSlider, 0, AxisSign.Positive);
            Settings3D.ConnectSliderSettings(_pstvYSlider, 1, AxisSign.Positive);
            Settings3D.ConnectSliderSettings(_pstvZSlider, 2, AxisSign.Positive);
            Settings3D.ConnectSliderSettings(_negXSlider, 0, AxisSign.Negative);
            Settings3D.ConnectSliderSettings(_negYSlider, 1, AxisSign.Negative);
            Settings3D.ConnectSliderSettings(_negZSlider, 2, AxisSign.Negative);

            Settings3D.ConnectDblSliderSettings(_xySlider, PlaneId.XY);
            Settings3D.ConnectDblSliderSettings(_yzSlider, PlaneId.YZ);
            Settings3D.ConnectDblSliderSettings(_zxSlider, PlaneId.ZX);
        }
Exemplo n.º 9
0
        /// <summary>Disconnect from server</summary>
        public void Disconnect()
        {
            mBroadcastSocketCreated = false;
            mNetwork.Disconnect();

            m3DSettings     = null;
            m6DOFSettings   = null;
            mAnalogSettings = null;
            mDiscoveryResponses.Clear();
            mForceSettings      = null;
            mGazeVectorSettings = null;
            mGeneralSettings    = null;
            mImageSettings      = null;
        }
        public static string CreateThreeDPaymentForm(Sale3DSecureRequest request, Settings3D settings3D)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">");
            builder.Append("<html>");
            builder.Append("<body>");
            builder.Append("<form //action=\"" + settings3D.BaseUrl + "\" method=\"POST\" id=\"three_d_form\" >");

            builder.Append("<input type=\"hidden\" name=\"secure3dsecuritylevel\" id=\"secure3dsecuritylevel\" value=\"" + request.secure3dsecuritylevel + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"mode\" id=\"mode\" value=\"" + request.mode + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"apiversion\" id=\"apiversion\" value=\"" + request.apiversion + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"terminalid\" id=\"terminalid\" value=\"" + request.terminalid + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"terminalprovuserid\" id=\"terminalprovuserid\" value=\"" + request.terminalprovuserid + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"terminaluserid\" id=\"terminaluserid\" value=\"" + request.terminaluserid + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"terminalmerchantid\" id=\"terminalmerchantid\" value=\"" + request.terminalmerchantid + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"txntype\" id=\"txntype\" value=\"" + request.txntype + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"cardnumber\" id=\"cardnumber\" value=\"" + request.cardnumber + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"cardexpiredatemonth\" id=\"cardexpiredatemonth\" value=\"" + request.cardexpiredatemonth + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"cardexpiredateyear\" id=\"cardexpiredateyear\" value=\"" + request.cardexpiredateyear + "\"/>");

            builder.Append("<input type=\"hidden\" name=\"cardcvv2\" id=\"cardcvv2\" value=\"" + request.cardcvv2 + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"txnamount\" id=\"txnamount\" value=\"" + request.txnamount + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"txncurrencycode\" id=\"txncurrencycode\" value=\"" + request.txncurrencycode + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"txninstallmentcount\" id=\"txninstallmentcount\" value=\"" + request.txninstallmentcount + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"orderid\" id=\"orderid\" value=\"" + request.orderid + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"successurl\" id=\"successurl\" value=\"" + request.successurl + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"errorurl\" id=\"errorurl\" value=\"" + request.errorurl + "\"/>");

            builder.Append("<input type=\"hidden\" name=\"secure3dhash\" id=\"secure3dhash\" value=\"" + request.secure3dhash + "\"/>");
            //builder.Append("<input type=\"hidden\" name=\"companyname\" id=\"companyname\" value=\"" + request.companyname + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"customeremailaddress\" id=\"customeremailaddress\" value=\"" + request.customeremailaddress + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"customeripaddress\" id=\"customeripaddress\" value=\"" + request.customeripaddress + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"txntimestamp\" id=\"txntimestamp\" value=\"" + request.txntimestamp + "\"/>");

            builder.Append("<input type=\"hidden\" name=\"lang\" id=\"lang\" value=\"" + request.lang + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"customeripaddress\" id=\"customeripaddress\" value=\"" + request.customeripaddress + "\"/>");
            builder.Append("<input type=\"hidden\" name=\"refreshtime\" id=\"refreshtime\" value=\"" + request.refreshtime + "\"/>");

            builder.Append("<input type=\"submit\" value=\"Öde\" style=\"display:none;\"/>");
            builder.Append("</form>");
            builder.Append("</body>");
            builder.Append("<script>document.getElementById(\"three_d_form\").submit();</script>");
            builder.Append("</html>");
            return(builder.ToString());
        }
Exemplo n.º 11
0
        public static string Execute(GarantiPayRequest request, Settings3D settings3D)
        {
            request.secure3dhash = Compute3DHash(request, settings3D);
            NameValueCollection Data = new NameValueCollection();

            Data.Add("mode", request.mode);
            Data.Add("secure3dsecuritylevel", request.secure3dsecuritylevel);
            Data.Add("apiversion", request.apiversion);
            Data.Add("terminalprovuserid", request.terminalprovuserid);
            Data.Add("terminaluserid", request.terminaluserid);
            Data.Add("terminalmerchantid", request.terminalmerchantid);
            Data.Add("terminalid", request.terminalid);
            Data.Add("txntype", request.txntype);
            Data.Add("txnamount", request.txnamount);
            Data.Add("txncurrencycode", request.txncurrencycode);
            Data.Add("txninstallmentcount", request.txninstallmentcount);
            Data.Add("orderid", request.orderid);
            Data.Add("successurl", request.successurl);
            Data.Add("errorurl", request.errorurl);
            Data.Add("customeremailaddress", request.customeremailaddress);
            Data.Add("customeripaddress", request.customeripaddress);
            Data.Add("secure3dhash", request.secure3dhash);
            Data.Add("txntimestamp", request.txntimestamp);

            Data.Add("installmentratewithreward1", request.installmentratewithreward1);
            Data.Add("installmentratewithreward2", request.installmentratewithreward2);
            Data.Add("totallinstallmentcount", request.totallinstallmentcount);

            Data.Add("installmentnumber1", request.installmentnumber1);
            Data.Add("installmentnumber2", request.installmentnumber2);
            Data.Add("installmentamount1", request.installmentamount1);
            Data.Add("installmentamount2", request.installmentamount2);

            Data.Add("bnsuseflag", request.bnsuseflag);
            Data.Add("fbbuseflag", request.fbbuseflag);
            Data.Add("chequeuseflag", request.chequeuseflag);
            Data.Add("garantipay", request.garantipay);
            Data.Add("refreshtime", request.refreshtime);
            Data.Add("txnsubtype", request.txnsubtype);
            Data.Add("companyname", request.companyname);
            Data.Add("txntimeoutperiod", request.txntimeoutperiod);
            Data.Add("storekey", request.storekey);

            return(Helper.PreparePOSTForm(settings3D.BaseUrl, Data));
        }
Exemplo n.º 12
0
        private void SetupSharedSettings()
        {
            Settings3D.ConnectSliderSettings(_pXSlider, 0, AxisSign.Positive);
            Settings3D.ConnectSliderSettings(_pYSlider, 1, AxisSign.Positive);
            Settings3D.ConnectSliderSettings(_pZSlider, 2, AxisSign.Positive);

            Settings3D.ConnectSliderSettings(_nXSlider, 0, AxisSign.Negative);
            Settings3D.ConnectSliderSettings(_nYSlider, 1, AxisSign.Negative);
            Settings3D.ConnectSliderSettings(_nZSlider, 2, AxisSign.Negative);

            Settings3D.ConnectDblSliderSettings(_xySlider, PlaneId.XY);
            Settings3D.ConnectDblSliderSettings(_yzSlider, PlaneId.YZ);
            Settings3D.ConnectDblSliderSettings(_zxSlider, PlaneId.ZX);

            Settings2D.ConnectSliderSettings(_p2DModeXSlider, 0, AxisSign.Positive);
            Settings2D.ConnectSliderSettings(_p2DModeYSlider, 1, AxisSign.Positive);
            Settings2D.ConnectSliderSettings(_n2DModeXSlider, 0, AxisSign.Negative);
            Settings2D.ConnectSliderSettings(_n2DModeYSlider, 1, AxisSign.Negative);
            Settings2D.ConnectDblSliderSettings(_2DModeDblSlider);

            _vertexSnapDrag.Settings = Settings3D.VertexSnapSettings;
        }
 public static string Execute(Sale3DSecureRequest request, Settings3D settings3D)
 {
     request.secure3dhash = Compute3DHash(request, settings3D);
     return(CreateThreeDPaymentForm(request, settings3D));
     //return RestHttpCaller.Create().PostXMLString(settings3D.BaseUrl, request);
 }