Files
hcs/Hcs.TestApp/TestApp/Scenario/PaymentsScenario.cs

48 lines
1.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Hcs.Client;
using Hcs.Client.Api.Payload.Payments;
using System;
namespace Hcs.TestApp.Scenario
{
internal class PaymentsScenario(UniClient client)
{
private readonly UniClient client = client;
internal void ImportNotificationsOfOrderExecution()
{
var payload = new ImportNotificationsOfOrderExecutionPayload()
{
// TODO: Разобраться, что это за айди
orderId = "",
orderDate = new DateTime(2025, 9, 5),
amount = 4000M,
onlinePayment = true,
year = 2025,
month = 8,
paymentDocumentId = "00АА095186-02-5081",
// TODO: Возможно что не обязательно передавать оба параметра
paymentDocumentGUID = ""
};
var result = client.Payments.ImportNotificationsOfOrderExecutionAsync(payload).Result;
Console.WriteLine("Scenario execution " + (result ? "succeeded" : "failed"));
}
internal void ImportSupplierNotificationsOfOrderExecution()
{
var payload = new ImportSupplierNotificationsOfOrderExecutionPayload()
{
orderDate = new DateTime(2025, 9, 5),
month = 8,
year = 2025,
paymentDocumentId = "00АА095186-02-5081",
amount = 4000M,
onlinePayment = true
};
var result = client.Payments.ImportSupplierNotificationsOfOrderExecutionAsync(payload).Result;
Console.WriteLine("Scenario execution " + (result ? "succeeded" : "failed"));
}
}
}