Esempio n. 1
0
        public AcApiResponse <BPValidationResponse, ReceiptsApiData> BPValidation(BPValidationRequest req)
        {
            var resp = agentConnectIntegration.BPValidation(req);

            // Process Receipt
            var additionalData = ReceiptHelper.GenerateAdditionalDataReceipts(resp.Payload?.Receipts, receiptIntegration);

            // Return Response View Model
            var apiResp = new AcApiResponse <BPValidationResponse, ReceiptsApiData>
            {
                BusinessMetadata = MapperHelper.SetResponseProperties(resp.Payload?.Flags, DataSource.AgentConnect),
                ResponseData     = resp,
                AdditionalData   = additionalData
            };

            return(apiResp);
        }
        public AcApiResponse <BPValidationResponse, ReceiptsApiData> BPValidation(BPValidationRequest req)
        {
            //Create request business object for agent connect service call
            req.PrimaryReceiptLanguage   = AuthIntegration.GetAgentPrimaryReceiptLanguage();
            req.SecondaryReceiptLanguage = AuthIntegration.GetAgentSecondaryReceiptLanguage();

            // AgentConnect sendValidation call for SEND
            var resp = agentConnectIntegration.BPValidation(req);

            // Process Receipt
            var additionalData = ReceiptHelper.GenerateAdditionalDataReceipts(resp.Payload?.Receipts, receiptIntegration);

            // Return Response View Model
            var apiResp = new AcApiResponse <BPValidationResponse, ReceiptsApiData>
            {
                BusinessMetadata = MapperHelper.SetResponseProperties(resp.Payload?.Flags, DataSource.AgentConnect),
                ResponseData     = resp,
                AdditionalData   = additionalData
            };

            return(apiResp);
        }