Beispiel #1
0
        public override void ProcessRequest()
        {
            //Set variables
            TransactionID   = context.Request.QueryString["ac_transfer"];
            OrderID         = context.Request.QueryString["ac_order_id"];
            PaymentMethod   = context.Request.QueryString["ac_ps"];
            SentHash        = context.Request.QueryString["ac_hash"];
            Amount          = context.Request.QueryString["ac_merchant_amount"];
            Currency        = context.Request.QueryString["ac_merchant_currency"];
            MerchantAccount = context.Request.QueryString["ac_dest_wallet"];
            Status          = context.Request.QueryString["ac_transaction_status"];
            Args            = context.Request.QueryString["acm_args"];
            CommandName     = context.Request.QueryString["acm_command"];

            try
            {
                //Check IPs
                //

                //Check security hash
                CheckIncomeHash();

                //Check duplicated transactions
                CheckIfNotDoneYet(TransactionID);

                //Check if we are the merchant
                CheckMerchant(AdvCashAccountDetails.Exists(MerchantAccount.Replace(" ", "")));

                //Check currency
                CheckCurrency(Currency);

                //Check status
                CheckStatus(Status, "COMPLETED");

                //All OK, let's proceed
                Assembly    assembly = Assembly.GetAssembly(typeof(IIpnHandler));
                var         type     = assembly.GetType(CommandName, true, true);
                IIpnHandler command  = Activator.CreateInstance(type) as IIpnHandler;

                command.HandleAdvCash(Args, TransactionID, Amount);

                context.Response.Write(OrderID + "|success");
            }
            catch (Exception ex)
            {
                ErrorLogger.Log(ex);
                context.Response.Write(OrderID + "|error");
            }
        }
Beispiel #2
0
 public AdvCashButtonGenerationStrategy(AdvCashAccountDetails advcash)
 {
     account = advcash;
 }