This commit is contained in:
mmrbnjd
2024-10-27 21:21:53 +03:30
parent e748993044
commit 379f3df414
7 changed files with 27 additions and 16 deletions

View File

@@ -82,7 +82,7 @@ namespace Back.Controllers
[AllowAnonymous]
public async Task<ActionResult<string>> CompanyRegistration([FromBody] CompanyRegistrationDTO item)
{
return BadRequest(new List<string> { "متاسفانه در مرحله آزمایش می باشیم و فعلا امکان ثبت نام نداریم"});
// return BadRequest(new List<string> { "متاسفانه در مرحله آزمایش می باشیم و فعلا امکان ثبت نام نداریم"});
var resultValidationmodel = await _companyRegistrationValidation.ValidateAsync(item);
if (!resultValidationmodel.IsValid)
return BadRequest(resultValidationmodel.Errors.Select(s => s.ErrorMessage).ToList());

View File

@@ -152,6 +152,7 @@ namespace Back.Controllers
[HttpGet("SendInvoice/{InvoiceID}")]
public async Task<ActionResult<bool>> SendInvoice(int InvoiceID)
{
return BadRequest(new List<string> { "در حال حاضر سامانه مودیان در دسترس نمی باشد" });
var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
var UserID = claim.Value;

View File

@@ -70,11 +70,12 @@ namespace Back.Services
if (!string.IsNullOrEmpty(resquth.UniqueMemory) && !string.IsNullOrEmpty(resquth.PrivateKey))
{
// "https://sandboxrc.tax.gov.ir/req/api/"
_UniqueMemory = resquth.UniqueMemory;
_PrivateKey = resquth.PrivateKey;
TaxApiService.Instance.Init(_UniqueMemory,
new SignatoryConfig(_PrivateKey, null),
new NormalProperties(ClientType.SELF_TSP), /*"https://tp.tax.gov.ir/req/api/"*/ "https://sandboxrc.tax.gov.ir/req/api/");
new NormalProperties(ClientType.SELF_TSP), "https://tp.tax.gov.ir/req/api/");
await TaxApiService.Instance.TaxApis.GetServerInformationAsync();
}
#endregion