Exemplo n.º 1
0
        private void SaveGetAuthorizeAnswer(int orderId, string answerKey, string paramGAASereal, string responseGAASereal)
        {
            TodoPagoTransactionDto todoPagoTransactionDto = new TodoPagoTransactionDto();

            todoPagoTransactionDto.ordenId     = orderId;
            todoPagoTransactionDto.secondStep  = DateTime.Now.ToString();
            todoPagoTransactionDto.paramsGAA   = paramGAASereal;
            todoPagoTransactionDto.responseGAA = responseGAASereal;
            todoPagoTransactionDto.answerKey   = answerKey;

            todoPagoBusinessService.updateTodoPagoTransactionRecord(todoPagoTransactionDto);
        }
Exemplo n.º 2
0
        private void SaveSendAuthorizeRequest(Dictionary <string, object> result, int orderId, string paramSarSereal, string paramSarPayLoadSereal)
        {
            TodoPagoTransactionDto todoPagoTransactionDto = new TodoPagoTransactionDto();
            string requestKey        = GetValueByKey(result, TODOPAGO_REQUEST_KEY);
            string publicRequestKey  = GetValueByKey(result, TODOPAGO_PUBLIC_REQUEST_KEY);
            string responseSarSereal = todoPagoBusinessService.serealizar(result);

            _logger.Information("TodoPago ResponseSar : " + responseSarSereal);

            todoPagoTransactionDto.ordenId          = orderId;
            todoPagoTransactionDto.paramsSAR        = paramSarSereal + " " + paramSarPayLoadSereal;
            todoPagoTransactionDto.firstStep        = DateTime.Now.ToString();
            todoPagoTransactionDto.responseSAR      = responseSarSereal;
            todoPagoTransactionDto.requestKey       = requestKey;
            todoPagoTransactionDto.publicRequestKey = publicRequestKey;

            todoPagoBusinessService.insertTodoPagoTransactionRecord(todoPagoTransactionDto);
        }
Exemplo n.º 3
0
        private Dictionary <string, string> GenerateVoidRequestParams(int orderId)
        {
            Dictionary <string, string> voidRequestParams      = new Dictionary <string, string>();
            TodoPagoTransactionDto      todoPagoTransactionDto = todoPagoBusinessService.findTodoPagoTransactionRecord(orderId);

            voidRequestParams.Add(ElementNames.SECURITY, this.security);
            voidRequestParams.Add(ElementNames.MERCHANT, this.merchant);

            if (todoPagoTransactionDto.requestKey != null)
            {
                voidRequestParams.Add(ElementNames.REQUESTKEY, todoPagoTransactionDto.requestKey);
            }
            else
            {
                voidRequestParams.Add(ElementNames.REQUESTKEY, "");
            }

            return(voidRequestParams);
        }
Exemplo n.º 4
0
        private Dictionary <string, string> GenerateGAARequestParams(String answerKey, int orderId)
        {
            Dictionary <string, string> paramsGAA = new Dictionary <string, string>();

            paramsGAA.Add(ElementNames.SECURITY, this.security);
            paramsGAA.Add(ElementNames.SESSION, TODOPAGO_SAR_SESSION);
            paramsGAA.Add(ElementNames.MERCHANT, this.merchant);
            paramsGAA.Add(ElementNames.ANSWERKEY, answerKey);

            TodoPagoTransactionDto todoPagoTransactionDto = todoPagoBusinessService.findTodoPagoTransactionRecord(orderId);

            if (todoPagoTransactionDto.requestKey != null)
            {
                paramsGAA.Add(ElementNames.REQUESTKEY, todoPagoTransactionDto.requestKey);
            }
            else
            {
                paramsGAA.Add(ElementNames.REQUESTKEY, "");
            }

            return(paramsGAA);
        }