eko /WEB/App_Code/BLL/OnlineE24Payment.cs

Language C# Lines 186
MD5 Hash e73f342e13e993e4083e82f01c34cef0 Estimated Cost $2,383 (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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
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 OnlineE24Payment
/// </summary>
public partial class OnlineE24Payment
{

    public static string GetTxId(int id) {


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

    public static string CertificatePath(){

        return ConfigurationManager.AppSettings["OnlineCert"];

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

    

    public static string WebAddress()
    {
        return ConfigurationManager.AppSettings["OnlineWebAddress"];
    }
    public static string Port()
    {
        return ConfigurationManager.AppSettings["OnlinePort"];
    }
    public static string Context()
    {
        return ConfigurationManager.AppSettings["OnlineContext"];
    }
    public static string ID()
    {
        return ConfigurationManager.AppSettings["OnlineID"];
    }
    public static string Pass()
    {
        return ConfigurationManager.AppSettings["OnlinePass"];
    }

    public static string UpdateURL()
    {
        return "~/_inc/online_e24_update.ashx";
    }

    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 static string RenderErrorHref(Guid ordrID)
        {
            return SM.BLL.Common.ResolveUrlFull(SM.EM.Rewrite.OrderProductUrl(SM.BLL.Custom.MainUserID, ordrID, 5) + "&e=1");
            //return "~/_inc/mp_update.aspx?txId=" + txId.ToString();
        }


        public class Status {
            public static string NOT_SET = "";
            public static string APPROVED = "APPROVED"; // Uspešna avtorizacija 
            public static string NOT_APPROVED = "NOT APPROVED"; //Neuspešna avtorizacija
            public static string CAPTURED = "CAPTURED"; // Uspešna avtorizacija in poravnava
            public static string NOT_CAPTURED = "NOT CAPTURED"; // Neuspešna avtorizacija
            public static string DENIED_BY_RISK = "DENIED BY RISK"; // Blokirana transakcija zaradi varnostnih parametrov nastavljenih s strani banke.
            public static string HOST_TIMEOUT = "HOST TIMEOUT"; // Neprocesirana transakcija zaradi tehničnih oziroma komunikacijskih težav pri povezovanju z avtorizacijskim sistemom.

            public static string VOIDED = "VOIDED"; // Stornirana avtorizacija
            public static string REVERSED = "REVERSED"; // Stornirana avtorizacija

            public static string FAILED = "FAILED"; // error - custom status
            public static string INITIALIZED = "INITIALIZED"; // initialized - custom status

        }

        public class Action
        {
            public static string PURCHASE = "1";
            public static string AUTHORIZATION = "4";
            public static string CAPTURE = "5";
            public static string REVERSAL = "3";
            public static string VOID = "9";
            
        }

        //public static  string  GetStatusFromTrans(string transStat) {
        //    string ret = Status.NOT_SET;

        //    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