Holoo.Store.HolooCMS 1.0.4
Holoo Store HolooCMS
Holoo.Store.HolooCMS is a typed .NET client for the SOAP operations documented for the Holoo CMS WebSite service. It builds SOAP 1.1 RPC/literal envelopes directly and does not depend on a generated service reference.
Registration
using Store.BB.HolooCMS.Dependencies;
services.AddHolooCMS(options =>
{
options.ServiceUri = new Uri("http://server55.tnc.ir:8080/WebSite/WebSite");
options.TerminalId = 23067;
});
Inject IHolooCMSService and call the typed asynchronous methods. Consumers that need a smaller surface can instead depend on IHolooCMSReferenceService, IHolooCMSSalesService, IHolooCMSCatalogService, or IHolooCMSPaymentService. The client obtains GetReferenceId, applies the reference-id MD5 protocol, sends the authenticated operation, and converts the JSON return value to the corresponding response model.
Recording sales
Call SetSalePaymentAsync after a successful bank callback for a Holoo software sale. Its typed result exposes the generated software serial in Serial and extracts the Holoo order number from the service message into OrderCode.
SetSalePaymentResult holooSale = await holooCms.SetSalePaymentAsync(request, cancellationToken);
string? serial = holooSale.Serial;
string? orderCode = holooSale.OrderCode;
For another software product, first obtain the Holoo serial from SetSalePaymentAsync, then pass that serial to SetSaleDependentAsync. Inspect ResponseKind because the dependent service can return a successful order number, a structured business error, or a plain service error.
SetSaleDependentResult dependentSale = await holooCms.SetSaleDependentAsync(
dependentRequest,
cancellationToken);
switch (dependentSale.ResponseKind)
{
case SetSaleDependentResponseKind.Success:
string orderCode = dependentSale.OrderCode!;
break;
case SetSaleDependentResponseKind.BusinessError:
string? businessMessage = dependentSale.Message;
break;
case SetSaleDependentResponseKind.ServiceError:
int? errorCode = dependentSale.ErrorCode;
string? serviceMessage = dependentSale.Message;
break;
}
All result types retain the exact SOAP <return> content in RawResponse for diagnostics. The supported setSaleDependent return shapes are:
- Numeric success such as
2443962:Result = true,ResponseKind = Success, andOrderCode = "2443962". - JSON business error such as
{"result":false,"message":"..."}(including a JSON-escaped string):Result = false,ResponseKind = BusinessError, withMessageandArticlepopulated. The service'sserialInfofield is intentionally not exposed bySetSaleDependentResult. - Plain service error such as
error 1015 :: null:Result = false,ResponseKind = ServiceError,ErrorCode = 1015, andMessage = "null".
Sale request examples
ReferenceId is generated and inserted by the client, so callers must not supply it. The remaining values map to the SOAP parameters in the same order and casing as the service contract.
var party = new PartyDetails
{
Name = "Customer name",
Family = "Customer family",
Address = "Customer address",
Telephone = "02100000000",
Mobile = "09000000000",
JobId = 0,
NationalCode = "0000000000",
PartyType = 0,
IsRemote = false,
SeparateId = 22,
StateCode = 100,
PostCode = "0000000000"
};
var holooRequest = new SetSalePaymentRequest
{
SoftCode = "31085",
NewKits = string.Empty,
BillCode = "123456",
SiteId = "10",
Party = party,
AgencyCode = string.Empty,
Tip = 1,
AcceptorCode = "4124192",
Fee = 0,
CardNumber = "1234"
};
var dependentRequest = new SetSaleDependentRequest
{
Invoice = new SaleInvoice
{
Lines =
[
new SaleInvoiceLine
{
SellerId = 10608,
ProductId = "6704003",
Quantity = 1
}
]
},
BillCode = "516116801422",
SiteId = "2405929",
Party = party,
Serial = "100110",
Uuid = "\"\"",
AutoFact = 3,
Tip = 1
};
The dependent invoice serializer writes sellerId and quantity as JSON strings, matching the accepted service payload: {"factor":[{"sellerId":"10608","productId":"6704003","quantity":"1"}]}. Use "\"\"" when the service requires its two-quotation-mark placeholder for an empty uuid.
Serial validation
GetSerialDataAsync obtains and inserts ReferenceId automatically and sends the supplied value as the SOAP serial parameter. Its result explicitly distinguishes valid and invalid serials:
GetSerialDataResult result = await holooCms.GetSerialDataAsync(
"222222222",
cancellationToken);
if (result.IsValid)
{
SerialDataResult serialInfo = result.SerialInfo!;
// Use serialInfo.SoftwareCode, serialInfo.PartyName, etc.
}
For a valid response, IsValid is true and SerialInfo contains all returned serial fields. When the service only returns {"partyCityId":0,"partyOstanId":0}, IsValid is false and SerialInfo is null. The exact SOAP <return> value remains available in RawResponse for diagnostics.
Implemented operations
GetReferenceIdsetSalePaymentsetSaleDependentGetArticlegetSerialDatagetPaymentsetPaymentSetPaymentDependent
The current live WSDL is used for parameter order and casing. In particular, it includes ArticleDate for GetArticle, PayAblePrice for setPayment, and the three-parameter contract for SetPaymentDependent.
No packages depend on Holoo.Store.HolooCMS.
.NET 10.0
- No dependencies.
| Version | Downloads | Last updated |
|---|---|---|
| 1.0.4 | 1 | 10/04/2026 |