Пример #1
0
        private OgoneResponse GetOgoneResponse()
        {
            var response = new OgoneResponse();

            response.OrderId = Request.QueryString["orderID"];
            var amount = Request.QueryString["amount"];

            if (!string.IsNullOrWhiteSpace(amount))
            {
                response.Amount = decimal.Parse(amount, CultureInfo.InvariantCulture);
            }
            response.Currency      = Request.QueryString["currency"];
            response.PaymentMethod = Request.QueryString["PM"];
            response.Acceptance    = Request.QueryString["ACCEPTANCE"];
            var status = Request.QueryString["STATUS"];

            if (!string.IsNullOrWhiteSpace(status))
            {
                response.Status = int.Parse(status, CultureInfo.InvariantCulture);
            }
            response.CardNumber   = Request.QueryString["CARDNO"];
            response.PayId        = Request.QueryString["PAYID"];
            response.NcError      = Request.QueryString["NCERROR"];
            response.Brand        = Request.QueryString["BRAND"];
            response.ShaSignature = Request.QueryString["SHASIGN"];
            return(response);
        }
Пример #2
0
        private void SavePaymentInfo(CheckoutViewModel model, OgoneResponse ogoneReponse)
        {
            var orderTransaction = new OrderTransaction
            {
                Success  = true,
                MethodId = PaymentMethods.OgoneId,
                OrderId  = model.CurrentOrder.bvin,
                Amount   = ogoneReponse.Amount,
                Action   = ActionType.ThirdPartyPayMethodCharge,
                RefNum1  = ogoneReponse.PaymentMethod + " " + ogoneReponse.OrderId,
                RefNum2  = ogoneReponse.PayId
            };

            HccApp.OrderServices.AddPaymentTransactionToOrder(model.CurrentOrder, orderTransaction);
        }