예제 #1
0
        public void UploadDocument()
        {
            var docUploadData = new DocumentUploadData()
            {
                DocumentName = "TestDoc_12345",
                DocCategory  = "Verification",
                DocumentPath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"ProPay\TestData\TestDoc.docx")
            };

            var response = _service.UploadDocument()
                           .WithAccountNumber("718134204")
                           .WithDocumentUploadData(docUploadData)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
예제 #2
0
        public void UploadDocumentChargeback()
        {
            var docUploadData = new DocumentUploadData()
            {
                DocumentName         = "TestDocCB_12345",
                TransactionReference = "2",
                DocumentPath         = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"ProPay\TestData\TestDocChargeback.docx")
            };

            var response = _service.UploadDocumentChargeback()
                           .WithAccountNumber("718134204")
                           .WithDocumentUploadData(docUploadData)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
예제 #3
0
        public void UploadDocumentByDocumentString()
        {
            var docUploadData = new DocumentUploadData()
            {
                DocumentName = "TestDoc_12345",
                DocCategory  = "Verification",
                Document     = TestAccountData.GetDocumentBase64String(@"ProPay\TestData\TestDoc.docx"),
                DocType      = "docx"
            };

            var response = _service.UploadDocument()
                           .WithAccountNumber("718134204")
                           .WithDocumentUploadData(docUploadData)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
예제 #4
0
        public void UploadDocumentChargebackByDocumentString()
        {
            var docUploadData = new DocumentUploadData()
            {
                DocumentName         = "TestDocCB_12345",
                TransactionReference = "2",
                Document             = TestAccountData.GetDocumentBase64String(@"ProPay\TestData\TestDocChargeback.docx"),
                DocType = "docx"
            };

            var response = _service.UploadDocumentChargeback()
                           .WithAccountNumber("718134204")
                           .WithDocumentUploadData(docUploadData)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
예제 #5
0
        private void HydrateDocumentUploadData(ElementTree xml, Element xmlTrans, TransactionType transType, DocumentUploadData docUploadData)
        {
            var docNameTag = transType == TransactionType.UploadDocumentChargeback ? "DocumentName" : "documentName";
            var docTypeTag = transType == TransactionType.UploadDocumentChargeback ? "DocType" : "docType";

            xml.SubElement(xmlTrans, docNameTag, docUploadData.DocumentName);
            xml.SubElement(xmlTrans, "TransactionReference", docUploadData.TransactionReference);
            xml.SubElement(xmlTrans, "DocCategory", docUploadData.DocCategory);
            xml.SubElement(xmlTrans, docTypeTag, docUploadData.DocType);
            xml.SubElement(xmlTrans, "Document", docUploadData.Document);
        }
예제 #6
0
        public PayFacBuilder WithDocumentUploadData(DocumentUploadData docUploadData)
        {
            DocumentUploadData = docUploadData;

            return(this);
        }