Exemplo n.º 1
0
        public AcApiResponse <ComplianceTransactionResponse, ApiData> ComplianceTransaction(
            ComplianceTransactionRequest req)
        {
            var deviceId = AuthIntegration.GetDeviceId();

            foreach (var moneyOrder in req.MoneyOrder)
            {
                if (deviceId != moneyOrder.DeviceID)
                {
                    logger.Info(string.Format("The DeviceId {0} does not match the logged in DeviceId {1}", deviceId,
                                              moneyOrder.DeviceID));
                    throw new InvalidDeviceException();
                }
            }
            var resp = agentConnectIntegration.ComplianceTransaction(req);

            var apiResp = new AcApiResponse <ComplianceTransactionResponse, ApiData>
            {
                BusinessMetadata = MapperHelper.SetResponseProperties(resp.Payload?.Flags, DataSource.AgentConnect),
                ResponseData     = resp
            };

            return(apiResp);
        }