eko /WEB/App_Code/BLL/MegaPos.cs

Language C# Lines 132
MD5 Hash bd894874a01769c07f4dc80c2d20ee87 Estimated Cost $2,156 (why?)
Repository https://bitbucket.org/zzare/eko.git View Raw File View Project SPDX
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Data.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using SM.EM.BLL;

/// <summary>
/// Summary description for MegaPos
/// </summary>
public partial class MegaPos
{

    public static string GetTxId(int id) {


        return "sm" + id.ToString() + "ks";
    }

    public static string CertificatePath(){

        return @ConfigurationSettings.AppSettings["OnlineCert"];

        //return @"D:\_test\certifikati_za_trgovino_test_2\test\test.cer";
    }
    public static string Store()
    {
        return ConfigurationSettings.AppSettings["OnlineStore"];
    }
    public static bool TestMode()
    {
        return !(ConfigurationSettings.AppSettings["OnlineTestMode"] == "0");
    }

    public static string UpdateURL()
    {
        return "~/_inc/mp_update.aspx";
    }

    public static int StatusRefreshInterval()
    {
        return 8;
    }
    


   public class Common
    {
        public static string RenderUpdateHref(int txId)
        {
            return UpdateURL() + "?txId=" + txId.ToString();
        }
        public static string RenderStatusHref(Guid ordrID)
        {
            return SM.BLL.Common.ResolveUrlFull(SM.EM.Rewrite.OrderProductUrl(SM.BLL.Custom.MainUserID , ordrID, 5));
            //return "~/_inc/mp_update.aspx?txId=" + txId.ToString();
        }


        public class Status {
            public static short NOT_SET = 0;
            public static short INITIALIZING = 1;
            public static short INITIALIZED = 2;
            public static short PROCESSED = 3;
            public static short FAILED = 4;
            public static short CANCELLED = 5;       
        }

        public static  short GetStatusFromTrans(string transStat) {
            short ret = Status.FAILED;

            switch (transStat)
            {
                case "INITIALIZING":
                    ret = Status.INITIALIZING;
                    break;
                case "INITIALIZED":
                    ret = Status.INITIALIZED;
                    break;
                case "PROCESSED":
                    ret = Status.PROCESSED;
                    break;
                case "FAILED":
                    ret = Status.FAILED;
                    break;
                case "CANCELLED":
                    ret = Status.CANCELLED;
                    break;
                default:
                    ret = Status.FAILED;
                    break;
            }


            return ret;
        
        }
    
    
    }

    //partial void OnValidate(System.Data.Linq.ChangeAction action)
    //{
    //}




}

/// <summary>
/// Summary description for MP_TRANS
/// </summary>
public partial class MP_TRANS
{

    public string GetTxId()
    {
        return "";
    }


}
Back to Top