示例#1
0
        public void Create(MscMcomPool mscMcomPool)
        {
            var mscTransactionData = _iTransactionData.GetIssuerData(mscMcomPool);
            //reversalı yapılan chargeback işleminin chargeback id si pool dan bulunur
            MscMcomPool cbMscMcomPool = _iTransactionData.GetMscMcomPoolClearingNo(mscTransactionData.ClrNo, ApiConstants.PoolActionType.Chargeback);
            //claim transaction bilgisi ile bulunur
            MscMcomClaim mscMcomClaim = _iTransactionData.GetClaim(mscTransactionData.ProvGuid);
            //reversal request oluşturulur
            ChargebackRequest chargebackRequest = new ChargebackRequest();

            chargebackRequest.claimId      = mscMcomClaim.ClaimId;
            chargebackRequest.chargebackId = cbMscMcomPool.McomRefNo;

            //update datası hazırlanır.
            ClrDocumentInfo clrDocumentInfo = _iTransactionData.GetDocumentInfo(mscTransactionData.Guid, ApiConstants.PoolActionType.ChargebackDocument);

            if (clrDocumentInfo == null)
            {
                throw new Exception("Document not found for update");
            }

            ChargebackFillRequest chargebackFillRequest = new ChargebackFillRequest();

            chargebackFillRequest.fileAttachment = _iTransactionData.GetAttachment(clrDocumentInfo);
            //memo bilgisi elde edilir.
            chargebackFillRequest.memo = clrDocumentInfo.Description;

            //Chargeback reversal servisi cagrılır.
            mscMcomPool.ResponseStatus = "";
            mscMcomPool.ClaimId        = mscMcomClaim.ClaimId;
            mscMcomPool.McomRefNo      = _iChargebacks.Update(mscMcomPool.ClearingRefKey, chargebackRequest, chargebackFillRequest);
        }
示例#2
0
        /// <summary>
        /// Reversal of related chargeback
        /// </summary>
        /// <param name="claimId"></param>
        /// <param name="chargebackId"></param>
        /// <returns>return chargeback id of reversal record.</returns>
        public String CreateReversal(long refKey, ChargebackRequest chargebackRequest)
        {
            String restUrl = String.Format("claims/{0}/chargebacks/{1}/reversal", chargebackRequest.claimId, chargebackRequest.chargebackId);
            var    result  = _apiController.Create <ChargebackResponse>(refKey, restUrl, null);

            return(result.chargebackId);
        }
示例#3
0
        /// <summary>
        /// Chargeback update
        /// </summary>
        /// <param name="claimId">Claim id</param>
        /// <param name="chargebackRequest">chargeback data</param>
        /// <returns>chargebackId</returns>
        public String Update(long refKey, ChargebackRequest chargebackRequest, ChargebackFillRequest chargebackFillRequest)
        {
            String restUrl = String.Format("claims/{0}/chargebacks/{1}", chargebackRequest.claimId, chargebackRequest.chargebackId);
            var    result  = _apiController.Update <ChargebackResponse>(refKey, restUrl, null, chargebackFillRequest);

            return(result.chargebackId);
        }
示例#4
0
        /// <summary>
        /// Retrieve Documentation
        /// </summary>
        /// <param name="claimId">Claim Id</param>
        /// <param name="chargebackId">Chargeback Id</param>
        /// <returns>File converted to a base64 encoded string. File Format is ZIP Note: ZIP file may contain these formats...JPG, TIFF, PDF</returns>
        public FileAttachment RetrieveDocumentation(long refKey, ChargebackRequest chargebackRequest)
        {
            Dictionary <String, String> parameters = new Dictionary <string, string>();

            parameters.Add("format", "ORIGINAL");
            String restUrl = String.Format("claims/{0}/chargebacks/{1}/documents", chargebackRequest.claimId, chargebackRequest.chargebackId);

            return(_apiController.Get <FileAttachment>(refKey, restUrl, parameters));
        }
        public void Create(MscMcomPool mscMcomPool)
        {
            //cb reversal datası alınır
            var cbReversalData = _iTransactionData.GetIssuerData(mscMcomPool);
            //reversalı yapılan chargeback işleminin chargeback id si pool dan bulunur
            MscMcomPool cbMscMcomPool = _iTransactionData.GetMscMcomPoolClearingNo(cbReversalData.PrevClearingNo, ApiConstants.PoolActionType.Chargeback);
            //claim transaction bilgisi ile bulunur
            MscMcomClaim mscMcomClaim = _iTransactionData.GetClaim(cbReversalData.ProvGuid);
            //reversal request oluşturulur
            ChargebackRequest chargebackRequest = new ChargebackRequest();

            chargebackRequest.claimId      = mscMcomClaim.ClaimId;
            chargebackRequest.chargebackId = cbMscMcomPool.McomRefNo;
            //Chargeback reversal servisi cagrılır.
            mscMcomPool.ResponseStatus = "INITIAL";
            mscMcomPool.ClaimId        = mscMcomClaim.ClaimId;
            mscMcomPool.McomRefNo      = _iChargebacks.CreateReversal(mscMcomPool.ClearingRefKey, chargebackRequest);
        }