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);
        }
        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);
        }
        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);
        }
        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);
        }