Пример #1
0
        public void ExportRefundsRequest()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "G_98c04cf8-d42a-4b60-a288-b62d86f4dba5",
                Test_Timestamp   = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                SenderIdentifier = "3eb551",
                SenderRole       = "3",

                PageNumber = 1,
                PageLength = 100
            };

            //Act
            var request = gisgmp.CreateExportRefundsRequest(
                refundsKind: ExportRefundsKind.REFUND,
                uip: new UIP[] { new UIP("10471020010005233009202000000012") }
                );

            //Assert
            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(ExportRefundsRequest)}", pathRoot));
        }
Пример #2
0
        public void ImportChargesResponse()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "I_36a89db2-3845-4915-1234-dd95394aadb4",
                RqId                = "G_fce0c544-b08d-44bc-83d8-738f10e9d068",
                Test_Timestamp      = new DateTime(day: 30, month: 09, year: 2020, hour: 15, minute: 28, second: 43, millisecond: 045, kind: DateTimeKind.Local),
                RecipientIdentifier = "3eacb7",
            };

            //Act
            var response = gisgmp.CreateImportChargesResponse(
                importProtocol:
                new ImportProtocolType[]
            {
                new ImportProtocolType(
                    entityID: "I_54a59db2-3845-4915-8770-dd95394aadb4",
                    code: "0",
                    description: "Успешно (ТЕСТОВЫЕ ДАННЫЕ!)"
                    )
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(ImportChargesResponse)}", pathRoot));
        }
Пример #3
0
        public static void Main()
        {
            Console.WriteLine("Тестирование");
            GisGmpBuilder gisgmp = new GisGmpBuilder
            {
                CallBackReadyRequest = new CallBackData(M1),
                SenderIdentifier     = "ED343",
                SenderRole           = "1",
                OriginatorId         = "",
                PageNumber           = 1,
                PageLength           = 100
            };


            gisgmp.ExportCharges(ExportChargesKind.CHARGE, new SupplierBillIDType[] { "1234567890123456789012345" });


            //string guidSmev = gisgmp.ExportRefunds(ExportRefundsKind.REFUND, new UIP[] { });
            //gisgmp.ImportPayments(ImportedPaymentType)
            //GisGmpBuilder.ExportRefunds(config, ExportRefundsKind.REFUND, new UIP[] { });

            //XmlDocument doc = GisGmpBuilder.SerializerObject(gisgmp.CreateExportRefundsRequest(ExportRefundsKind.REFUND, new UIP[] { }));


            Console.ReadKey();
        }
Пример #4
0
        public void ImportRefundsResponse()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "I_c6609858-a388-4a14-9f73-d83377b571eb",
                RqId                = "I_07d5a0d1-5183-4efc-86a8-93b4d341872c",
                Test_Timestamp      = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                RecipientIdentifier = "3eb551"
            };

            //Act
            var response = gisgmp.CreateImportRefundsResponse(
                importProtocol: new ImportProtocolType[]
            {
                new ImportProtocolType(
                    entityID: "I_46488813-8080-49f4-b60f-7f87af897c6a",
                    code: "0",
                    description: "Успешно (ТЕСТОВЫЕ ДАННЫЕ!)"
                    )
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(ImportRefundsResponse)}", pathRoot));
        }
Пример #5
0
        public void ExportNSIResponse1()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "I_56a25db2-7954-2145-1764-dd85395aadb6",
                RqId                = "G_cfe0c598-b35d-34bc-28d8-697f21d9e251",
                Test_Timestamp      = new DateTime(day: 12, month: 06, year: 2020, hour: 10, minute: 18, second: 44, millisecond: 723, kind: DateTimeKind.Local),
                RecipientIdentifier = "3637ed",
            };

            //Act
            var response = gisgmp.CreateExportNSIResponse(
                new PayeeNSIInfoType(
                    name: "ФГБУ «ФКП Росреестра» по г Москва (Тестовые данные!)",
                    inn: "7705401341",
                    kpp: "770542151",
                    orgStatus: "1",
                    changeDate: new DateTime(day: 11, month: 04, year: 2020, hour: 12, minute: 10, second: 21)
                    )
                );

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(ExportNSIResponse1)}", pathRoot));
        }
Пример #6
0
        public void ImportCertificateRequest()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "I_6e188de4-8491-49ea-8ec6-a09a607d020a",
                Test_Timestamp   = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                SenderIdentifier = "3eb551",
                SenderRole       = "3"
            };

            //Act
            var request = gisgmp.CreateImportCertificateRequest(
                new ImportCertificateEntryType[]
            {
                new ImportCertificateEntryType(
                    id:  "I_6e188de4-8491-49ea-8ec6-a09a607d020a",
                    ownership: "3eb551"
                    )
            });

            //Assert
            XmlDocument xmlDoc = default;

            Assert.Null(Record.Exception(() => xmlDoc = GisGmpBuilder.SerializerObject(request, true)));
            Assert.Null(Record.Exception(() => GisGmpBuilder.Deserialize <ImportCertificateRequest>(xmlDoc)));

            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(ImportCertificateRequest)}", pathRoot));
        }
Пример #7
0
        public void ImportCertificateResponse()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "G_3752f2cf-86f2-4214-afd0-1e21d80ef30d",
                RqId                = "I_6e188de4-8491-49ea-8ec6-a09a607d020a",
                Test_Timestamp      = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                RecipientIdentifier = "3eb551"
            };

            //Act
            var response = gisgmp.CreateImportCertificateResponse(
                new ImportProtocolType[]
            {
                new ImportProtocolType(
                    entityID: "I_6e188de4-8491-49ea-8ec6-a09a607d020a",
                    code: "0",
                    description: "Успешно (ТЕСТОВЫЕ ДАННЫЕ!)"
                    )
            });

            //Assert
            XmlDocument xmlDoc = default;

            Assert.Null(Record.Exception(() => xmlDoc = GisGmpBuilder.SerializerObject(response, true)));
            Assert.Null(Record.Exception(() => GisGmpBuilder.Deserialize <ImportCertificateResponse>(xmlDoc)));

            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(ImportCertificateResponse)}", pathRoot));
        }
Пример #8
0
        public void ForcedAcknowledgementResponse()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "G_52858add-199d-4d20-b1de-ed324630232a",
                RqId                = "G_e5c906a5-0ceb-4320-97e5-233f32dd8925",
                Test_Timestamp      = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 14, second: 21),
                RecipientIdentifier = "3eb551"
            };

            //Act
            var response = gisgmp.CreateForcedAcknowledgementResponse(
                quittances:
                new QuittanceType[]
            {
                new QuittanceType(
                    supplierBillID: "18817072711544879499",
                    creationDate: new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 56, millisecond: 284, kind: DateTimeKind.Local),
                    billStatus: AcknowledgmentStatusType.Item5,
                    paymentId: "10471020010005233009202000000001"
                    )
                {
                    TotalAmount   = 50000,
                    Balance       = 0,
                    PaymentId     = "10471020010005233009202000000001",
                    AmountPayment = 50000
                }
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(ForcedAcknowledgementResponse)}", pathRoot));
        }
Пример #9
0
        public void ChargeCreationResponse()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "ID000000000000000000000000000001",
                RqId                = "I_cf64ff59-fba3-49b5-977e-eeb035d012a3",
                Test_Timestamp      = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 14, second: 29, millisecond: 337, kind: DateTimeKind.Local),
                RecipientIdentifier = "3eb715",
            };

            //Act
            var response = gisgmp.CreateImportChargesTemplateResponse(
                new ChargeType(
                    supplierBillID: "0355431000000000011629713",
                    billDate: new DateTime(day: 30, month: 09, year: 2020, hour: 14, minute: 06, second: 30, millisecond: 313, kind: DateTimeKind.Local),
                    totalAmount: 200000,
                    purpose: "Выдача национального водительского удостоверения на пластиковой основе (ТЕСТОВЫЕ ДАННЫЕ!)",
                    kbk: "18810807141011000110",
                    oktmo: "45381000",
                    payee: new Payee()
            {
                Name       = "Министерство внутренних дел Российской Федерации",
                Inn        = "7706074737",
                Kpp        = "770601001",
                OrgAccount = new OrgAccount(
                    bank: new BankType(
                        name: "ОПЕРАЦИОННЫЙ ДЕПАРТАМЕНТ БАНКА РОССИИ//Межрегиональное операционное управление Федерального казначейства г. Москва",
                        bik: "024501901",
                        correspondentBankAccount: "40102810045370000002"
                        ),
                    accountNumber: "03100643000000019500"
                    )
            },
                    payer: new ChargePayer(
                        payerIdentifier: "1240000000000431133252",
                        payerName: "Тестовый плательщик"
                        ),
                    budgetIndex: new BudgetIndexType(
                        status: Status.Item01,
                        paytReason: PaytReason.Item0,
                        taxPeriod: "0",
                        taxDocNumber: "01",
                        taxDocDate: "0"
                        )
                    )
            {
                Origin = "TEMP",
                Item   = new MultiplierSize()
                {
                    Value  = "0.7",
                    Expiry = "0"
                }
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(ChargeCreationResponse)}", pathRoot));
        }
Пример #10
0
        public void ImportPaymentsResponse()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "I_1aa5aaca-d28f-48b1-9b39-b3a5f16d4e5c",
                RqId                = "I_13032ed0-4a7a-49ed-ad46-2a7206d3bca7",
                Test_Timestamp      = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                RecipientIdentifier = "3eb646"
            };

            //Act
            var response = gisgmp.CreateImportPaymentsResponse(
                importProtocol: new ImportProtocolType[]
            {
                new ImportProtocolType(
                    entityID: "I_09bcf2c6-a08a-4ea2-959d-8e198ba689d9",
                    code: "0",
                    description: "Успешно (ТЕСТОВЫЕ ДАННЫЕ!)"
                    )
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(ImportPaymentsResponse)}", pathRoot));
        }
Пример #11
0
        public void ExportPaymentsRequest()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "G_a108e1f7-e0f0-48d2-8e80-b64a423efe4e",
                Test_Timestamp   = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                SenderIdentifier = "3eb646",
                SenderRole       = "9",

                PageNumber = 1,
                PageLength = 100
            };

            //Act
            var request = gisgmp.CreateExportPaymentsRequest(
                paymentsKind: ExportPaymentsKind.PAYMENT,
                uin: new SupplierBillIDType[] { new SupplierBillIDType("32117072411021588933") }
                );

            //Assert
            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(ExportPaymentsRequest)}", pathRoot));
        }
Пример #12
0
        public void ExportNSIResponse2()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "G_3df3e555-1dcd-48e1-8483-bb358a128b38",
                RqId                = "U_7994af15-f7f2-4a10-a055-5aacf6057d4f",
                Test_Timestamp      = new DateTime(day: 12, month: 06, year: 2020, hour: 10, minute: 19, second: 45, millisecond: 713, kind: DateTimeKind.Local),
                RecipientIdentifier = "3637ed",
            };

            //Act
            var response = gisgmp.CreateExportNSIResponse(
                new oktmoNSIInfoType(
                    name: "город Каспийск (Тестовые данные!)",
                    oktmo: "82720000",
                    status: "1",
                    changeDate: new DateTime(day: 04, month: 04, year: 2020, hour: 18, minute: 13, second: 51)
                    )
                );

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(ExportNSIResponse2)}", pathRoot));
        }
Пример #13
0
        public void ExportRefundsResponse()
        {
            // Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "I_cf6899af-40c2-4e48-8f62-d666a6b4f63c",
                RqId                = "G_98c04cf8-d42a-4b60-a288-b62d86f4dba5",
                Test_Timestamp      = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                RecipientIdentifier = "3eb551"
            };

            //Act
            var response = gisgmp.CreateExportRefundsResponse(
                hasMore: false,
                refund: new Refund[]
            {
                new Refund(
                    changeStatusInfo: new ChangeStatusInfo(meaning: "1"),
                    refundId: "0410964930092020000000013",
                    refundDocDate: new DateTime(day: 30, month: 09, year: 2020, hour: 14, minute: 06, second: 30, millisecond: 313, kind: DateTimeKind.Local),
                    budgetLevel: BudgetLevel.Item1,
                    refundPayee: new RefundPayee(
                        payerIdentifier: "1220000000005512349832",
                        name: "Тестовый получатель",
                        bankAccountNumber: new AccountType(bank: new BankType(bik: "044552272"))
                        ),
                    refundApplication: new RefundApplication(
                        appNum: "987894",
                        appDate: new DateTime(day: 30, month: 09, year: 2020),
                        paymentIdType: "10471020010005233009202000000012",
                        cashType: 1,
                        amount: 300000,
                        purpose: "Штраф за нарушение ПДД (ТЕСТОВЫЕ ДАННЫЕ!)"
                        ),
                    refundBasis: new RefundBasis(
                        docKind: "Заявление",
                        docNumber: "331254",
                        docDate: new DateTime(day: 30, month: 09, year: 2020)
                        ),
                    refundPayer: new RefundPayer(
                        codeUBP: "28519",
                        name: "Тестовый участник",
                        inn: "7706012716",
                        kpp: "770901011"
                        )
                    )
                {
                    Kbk   = "18811630020016000140",
                    Oktmo = "45381000"
                }
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(ExportRefundsResponse)}", pathRoot));
        }
Пример #14
0
        public void SubscriptionServiceRequest1()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "G_5e8e6ede-db3a-4fd4-af74-4e76268368b0",
                Test_Timestamp   = new DateTime(day: 30, month: 09, year: 2020, hour: 16, minute: 03, second: 25, millisecond: 932, kind: DateTimeKind.Local),
                SenderIdentifier = "000009",
                SenderRole       = "7"
            };

            //Act
            var request = gisgmp.CreateSubscriptionServiceRequest(exportSubscriptions: true);

            //Assert
            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(SubscriptionServiceRequest1)}", pathRoot));
        }
Пример #15
0
        public void ExportNSIRequest2()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "U_7994af15-f7f2-4a10-a055-5aacf6057d4f",
                Test_Timestamp   = new DateTime(day: 12, month: 06, year: 2020, hour: 10, minute: 19, second: 43, millisecond: 684, kind: DateTimeKind.Local),
                SenderIdentifier = "3637ed",
                SenderRole       = "7"
            };

            //Act
            var request = gisgmp.CreateExportNSIRequest(
                new NSIExportConditions(oktmo: "82720000")
                );

            //Assert
            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(ExportNSIRequest2)}", pathRoot));
        }
Пример #16
0
        public void Org()
        {
            // Arrange

            //Act
            var sType = new OrganizationType("4243534", "1234567890", "123456789", "1234567890123");



            XmlDocument sDoc = GisGmpBuilder.SerializerObject(sType, true);

            sDoc.Save(@$ "{pathRoot}\sType.xml");

            //var dObj = GisGmpBuilder.Deserialize<OrganizationType>(sDoc);
            //XmlDocument dDoc = GisGmpBuilder.SerializerObject(dObj, true);
            //dDoc.Save(@$"{pathRoot}\dType.xml");

            //INNType inn = "1";

            //Assert
            Assert.True(true);
        }
Пример #17
0
        public void SubscriptionServiceResponse2()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "G_3df3e555-1dcd-48e1-8483-bb358a128b38",
                RqId                = "U_7994af15-f7f2-4a10-a055-5aacf6057d4f",
                Test_Timestamp      = new DateTime(day: 30, month: 09, year: 2020, hour: 16, minute: 04, second: 25, millisecond: 932, kind: DateTimeKind.Local),
                RecipientIdentifier = "000009"
            };

            //Act
            var response = gisgmp.CreateSubscriptionServiceResponse(
                createSubscriptionResult: new CreateSubscriptionResult[]
            {
                new CreateSubscriptionResult(
                    subscriptionProtocol: new SubscriptionProtocolType[]
                {
                    new SubscriptionProtocolType(
                        code: "0",
                        description: "Успешно (ТЕСТОВЫЕ ДАННЫЕ!)",
                        parameterId: "P_e5792842-b9b1-4515-859f-a309afeaa9d7"
                        )
                }
                    )
                {
                    DispatchDate           = new DateTime(day: 30, month: 09, year: 2020, hour: 16, minute: 03, second: 52, millisecond: 932, kind: DateTimeKind.Local),
                    DispatchDateSpecified  = true,
                    SubscriptionCode       = "NC0001",
                    SubscriptionIdentifier = "000009NC0001",
                }
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(SubscriptionServiceResponse2)}", pathRoot));
        }
Пример #18
0
        public void SubscriptionServiceRequest2()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "U_7994af15-f7f2-4a10-a055-5aacf6057d4f",
                Test_Timestamp   = new DateTime(day: 30, month: 09, year: 2020, hour: 16, minute: 03, second: 25, millisecond: 932, kind: DateTimeKind.Local),
                SenderIdentifier = "000009",
                SenderRole       = "7"
            };

            //Act
            var request = gisgmp.CreateSubscriptionServiceRequest(
                createSubscription: new CreateSubscription(
                    subscriptionStatus: SubscriptionStatus.Item1,
                    itemElementName: ItemChoiceType4.SubscriptionCode,
                    item: "NC0001"
                    )
            {
                RoutingCode            = "45382000",
                SubscriptionParameters = new SubscriptionParametersType[]
                {
                    new SubscriptionParametersType(
                        status: Status.Item1,
                        parameterId: "P_e5792842-b9b1-4515-859f-a309afeaa9d7",
                        parameterValue: new ParameterValue[]
                    {
                        new ParameterValue(parameterCode: "payerIdentifier", value: "1140000000000164921814")
                    }
                        )
                },
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(SubscriptionServiceRequest2)}", pathRoot));
        }
Пример #19
0
        public void ExportNSIRequest1()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "G_cfe0c598-b35d-34bc-28d8-697f21d9e251",
                Test_Timestamp   = new DateTime(day: 12, month: 06, year: 2020, hour: 10, minute: 18, second: 43, millisecond: 684, kind: DateTimeKind.Local),
                SenderIdentifier = "3637ed",
                SenderRole       = "7"
            };

            //Act
            var request = gisgmp.CreateExportNSIRequest(
                new NSIExportConditions(
                    payeeData: new PayeeData(inn: "7705401341", kpp: "770542151")
                    )
                );

            //Assert
            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(ExportNSIRequest1)}", pathRoot));
        }
Пример #20
0
        public void ExportQuittancesRequest()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "G_327e3906-5a3d-4c79-98f8-18bdd3f7228b",
                Test_Timestamp   = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                SenderIdentifier = "3eacb7",
                SenderRole       = "1",
                PageNumber       = 1,
                PageLength       = 100
            };

            //Act
            var request = gisgmp.CreateExportQuittancesRequest(
                quittancesKind: ExportQuittancesKind.QUITTANCE,
                uin: new SupplierBillIDType[] { new SupplierBillIDType("32117072411021588933") }
                );

            //Assert
            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(ExportQuittancesRequest)}", pathRoot));
        }
Пример #21
0
        public void ExportQuittancesResponse()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "I_1cc3a1dc-263d-40ef-9f0a-51f8b51433a3",
                RqId                = "G_327e3906-5a3d-4c79-98f8-18bdd3f7228b",
                Test_Timestamp      = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                RecipientIdentifier = "3eacb7"
            };

            //Act
            var response = gisgmp.CreateExportQuittancesResponse(
                hasMore: false,
                quittance:
                new QuittanceType[]
            {
                new QuittanceType(
                    supplierBillID: "32117072411021588933",
                    creationDate: new DateTime(day: 30, month: 09, year: 2020, hour: 16, minute: 35, second: 56, millisecond: 284, kind: DateTimeKind.Local),
                    billStatus: AcknowledgmentStatusType.Item1,
                    paymentId: "10471020010005233009202000000001"
                    )
                {
                    TotalAmount   = 500000,
                    Balance       = 0,
                    AmountPayment = 500000,
                    IsRevoked     = false
                }
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(ExportQuittancesResponse)}", pathRoot));
        }
Пример #22
0
        public void ForcedAcknowledgementRequest()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "G_e5c906a5-0ceb-4320-97e5-233f32dd8925",
                Test_Timestamp   = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                SenderIdentifier = "3eb551",
                SenderRole       = "3"
            };

            //Act
            var request = gisgmp.CreateForcedAcknowledgementRequest(
                new Reconcile(
                    supplierBillId: "18817072711544879499",
                    paymentId: new PaymentIdType[] { "10471020010005233009202000000001" }
                    )
                );

            //Assert
            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(ForcedAcknowledgementRequest)}", pathRoot));
        }
Пример #23
0
        public void SubscriptionServiceResponse1()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "U_49655ef1-07fe-41f9-9538-c1bcdffb2b95",
                RqId                = "G_5e8e6ede-db3a-4fd4-af74-4e76268368b0",
                Test_Timestamp      = new DateTime(day: 30, month: 09, year: 2020, hour: 16, minute: 04, second: 25, millisecond: 932, kind: DateTimeKind.Local),
                RecipientIdentifier = "000009"
            };

            //Act
            var response = gisgmp.CreateSubscriptionServiceResponse(
                subscriptions: new Subscriptions[]
            {
                new Subscriptions(
                    subscriptionCode: "NC0001",
                    subscriptionName: "Уведомления о начислениях по определенным значениям идентификатора плательщика (ТЕСТОВЫЕ ДАННЫЕ!)",
                    subscriptionOperation: "Уведомления о поступлении извещения о начислении (ТЕСТОВЫЕ ДАННЫЕ!)",
                    subscriptionParameter: new SubscriptionParameter[]
                {
                    new SubscriptionParameter(
                        parameterCode: "payerIdentifier",
                        parameterName: "Идентификатор плательщика",
                        required: true,
                        parameterPattern: @"(1((0[1-9])|(1[0-5])|(2[12456789])|(3[0]))[0-9a-zA-Zа-яА-Я]{19})|(200\d{14}[A-Z0-9]{2}\d{3})|(300\d{14}[A-Z0-9]{2}\d{3}|3[0]{7}\d{9}[A-Z0-9]{2}\d{3})|(4[0]{9}\d{12})"
                        )
                }
                    )
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(SubscriptionServiceResponse1)}", pathRoot));
        }
Пример #24
0
        public void ExportPaymentsResponse()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id             = "I_17f81555-2452-42a3-8c8b-4679c2bdf2b7",
                RqId                = "G_a108e1f7-e0f0-48d2-8e80-b64a423efe4e",
                Test_Timestamp      = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                RecipientIdentifier = "3eb646",
            };

            //Act
            var response = gisgmp.CreateExportPaymentsResponse(
                hasMore: false,
                paymentInfo: new PaymentInfo[]
            {
                new PaymentInfo(
                    changeStatusInfo: new ChangeStatusInfo(meaning: "1"),
                    paymentId: "10471020010005233009202000000001",
                    paymentDate: new DateTime(day: 30, month: 09, year: 2020, hour: 14, minute: 06, second: 30, millisecond: 313, kind: DateTimeKind.Local),
                    paymentOrg: new PaymentOrgType(
                        bank: new BankType(bik: "047252006")
                        ),
                    payee: new Payee()
                {
                    Name       = "ФГБУ «ФКП Росреестра» по г Москва",
                    Inn        = "7705401341",
                    Kpp        = "770542151",
                    OrgAccount = new OrgAccount(
                        bank: new BankType(bik: "044525000"),
                        accountNumber: "40101810045250010041"
                        )
                },
                    purpose: "ФГБУ «ФКП Росреестра» по г Москва (ТЕСТОВЫЕ ДАННЫЕ!)",
                    amount: 500000,
                    transKind: TransKindType.Item01
                    )
                {
                    SupplierBillID = "32117072411021588933",
                    Kbk            = "32111301031016000130",
                    Oktmo          = "45348000",
                    Payer          = new PaymentPayer(
                        payerIdentifier: "1010000000008751379232",
                        payerName: "Тестовый плательщик"
                        ),
                    BudgetIndex = new BudgetIndexType(
                        status: Status.Item01,
                        paytReason: PaytReason.Item0,
                        taxPeriod: "0",
                        taxDocNumber: "0",
                        taxDocDate: "0"
                        ),
                    AcknowledgmentInfo = new AcknowledgmentInfo(
                        supplierBillID: "32117072411021588933"
                        )
                }
            }
                );

            //Assert
            Assert.True(Tools.CheckObjToXml(response, $@"{nameof(ExportPaymentsResponse)}", pathRoot));
        }
Пример #25
0
        public void ImportPaymentsRequest()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "I_13032ed0-4a7a-49ed-ad46-2a7206d3bca7",
                Test_Timestamp   = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                SenderIdentifier = "3eb646",
                SenderRole       = "9"
            };

            //Act
            var request = gisgmp.CreateImportPaymentsRequest(
                importedPaymentTypes:
                new ImportedPaymentType[]
            {
                new ImportedPaymentType(
                    id: "I_09bcf2c6-a08a-4ea2-959d-8e198ba689d9"
                    )
                {
                    PaymentId      = "10471020010005233009202000000001",
                    Purpose        = "Штраф",
                    Kbk            = "18811630020016000140",
                    Oktmo          = "45348000",
                    SupplierBillID = "18817072416285972102",
                    Amount         = 50000,
                    PaymentDate    = new DateTime(day: 30, month: 09, year: 2020, hour: 14, minute: 06, second: 30, millisecond: 313, kind: DateTimeKind.Local),
                    TransKind      = TransKindType.Item01,
                    PaymentOrg     = new PaymentOrgType(
                        bank: new BankType(bik: "047252006")
                        ),
                    Payer = new PaymentPayer(
                        payerIdentifier: "1010000000003751379232",
                        payerName: "Тестовый плательщик"
                        ),
                    Payee = new Payee()
                    {
                        Name       = "УВД по ЦАО ГУ МВД России по г. Москве",
                        Inn        = "7706012716",
                        Kpp        = "770901011",
                        OrgAccount = new OrgAccount(
                            bank: new BankType(
                                bik: "024501901",
                                correspondentBankAccount: "40102810045370000002"
                                ),
                            accountNumber:  "03100643000000019500"
                            )
                    },
                    BudgetIndex = new BudgetIndexType(
                        status: Status.Item01,
                        paytReason: PaytReason.Item0,
                        taxPeriod: "0",
                        taxDocNumber: "0",
                        taxDocDate: "0"
                        )
                }
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(ImportPaymentsRequest)}", pathRoot));
        }
Пример #26
0
        /// <summary>
        /// Проверкака правильно ли происходит сериализация объекта
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="obj">Объект запрос/ответ</param>
        /// <param name="nameObj">Название объекта</param>
        /// <param name="pathRoot">Путь к корневой папке с папкой Sample в которой эталон SnameObj.xml</param>
        /// <returns></returns>
        public static bool CheckObjToXml <T>(T obj, string nameObj, string pathRoot) where T : class
        {
            XmlDocument doc = GisGmpBuilder.SerializerObject(obj, true);

            doc.Save(@$ "{pathRoot}\{nameObj}.xml");
Пример #27
0
        public void ImportChargesRequest()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "G_fce0c544-b08d-44bc-83d8-738f10e9d068",
                Test_Timestamp   = new DateTime(day: 30, month: 09, year: 2020, hour: 15, minute: 27, second: 53, millisecond: 045, kind: DateTimeKind.Local),
                SenderIdentifier = "3eacb7",
                SenderRole       = "1"
            };

            //Act
            var request = gisgmp.CreateImportChargesRequest(
                importedChargeTypes:
                new ImportedChargeType[]
            {
                new ImportedChargeType(
                    id: "I_54a59db2-3845-4915-8770-dd95394aadb4",
                    supplierBillID: "32116102414550976332",
                    billDate: new DateTime(day: 30, month: 09, year: 2020, hour: 14, minute: 06, second: 30, millisecond: 313, kind: DateTimeKind.Local),
                    totalAmount: 500000,
                    purpose: "Плата за предоставление сведений из Единого государственного реестра недвижимости",
                    kbk: "32111301031016000130",
                    oktmo: "45348000",
                    payee: new Payee()
                {
                    Name       = "ФГБУ «ФКП Росреестра» по г Москва",
                    Inn        = "7705401341",
                    Kpp        = "770542151",
                    Ogrn       = "7723819340452",
                    OrgAccount = new OrgAccount(
                        bank: new BankType(
                            name: "ОПЕРАЦИОННЫЙ ДЕПАРТАМЕНТ БАНКА РОССИИ//Межрегиональное операционное управление Федерального казначейства г. Москва",
                            bik: "024501901",
                            correspondentBankAccount: "40102810045370000002"
                            ),
                        accountNumber: "03100643000000019500"
                        )
                },
                    payer: new ChargePayer(
                        payerIdentifier: "1220000000007712579832",
                        payerName: "Тестовый плательщик"
                        ),
                    budgetIndex: new BudgetIndexType(
                        status: Status.Item01,
                        paytReason: PaytReason.Item0,
                        taxPeriod: "0",
                        taxDocNumber: "0",
                        taxDocDate: "0"
                        )
                    )
                {
                    OriginatorId = "3eb5fa",
                }
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(ImportChargesRequest)}", pathRoot));
        }
Пример #28
0
        public void ImportRefundsRequest()
        {
            //Arrange
            GisGmpBuilder gisgmp = new GisGmpBuilder()
            {
                TestEnable = true,
                //
                Test_Id          = "I_07d5a0d1-5183-4efc-86a8-93b4d341872c",
                Test_Timestamp   = new DateTime(day: 30, month: 09, year: 2020, hour: 18, minute: 13, second: 51),
                SenderIdentifier = "3eb551",
                SenderRole       = "3"
            };

            //Act
            var request = gisgmp.CreateImportRefundsRequest(
                importedRefundTypes: new ImportedRefundType[]
            {
                new ImportedRefundType(
                    id: "I_46488813-8080-49f4-b60f-7f87af897c6a"
                    )
                {
                    RefundId      = "0410964930092020000000001",
                    RefundDocDate = new DateTime(day: 30, month: 09, year: 2020, hour: 14, minute: 06, second: 30, millisecond: 313, kind: DateTimeKind.Local),
                    BudgetLevel   = BudgetLevel.Item1,
                    Kbk           = "18811630020016000140",
                    Oktmo         = "45381000",
                    RefundPayer   = new RefundPayer(
                        codeUBP: "28519",
                        name: "Тестовый участник",
                        inn: "7706012716",
                        kpp: "770901011"
                        ),
                    RefundApplication = new RefundApplication(
                        appNum: "256894",
                        appDate: new DateTime(day: 30, month: 09, year: 2020),
                        paymentIdType: "10471020010005233009202000000012",
                        cashType: 1,
                        amount: 50000,
                        purpose: "Штраф за нарушение ПДД.Управление транспортным средством с нечитаемыми государственными регистрационными знаками"
                        ),
                    RefundBasis = new RefundBasis(
                        docKind: "Заявление",
                        docNumber: "235",
                        docDate: new DateTime(day: 30, month: 09, year: 2020)
                        ),
                    RefundPayee = new RefundPayee(
                        payerIdentifier: "1220000000007712579832",
                        name: "Тестовый получатель",
                        bankAccountNumber: new AccountType(
                            bank: new BankType(
                                bik: "044552272",
                                correspondentBankAccount: "30101810800000010022"
                                )
                            )
                        )
                }
            });

            //Assert
            Assert.True(Tools.CheckObjToXml(request, $@"{nameof(ImportRefundsRequest)}", pathRoot));
        }