|
@@ -539,19 +539,20 @@ namespace TEAMModelOS.Controllers
|
|
|
//order.invoiceCode = invoiceCode;
|
|
|
order.invoiceNum = invoiceNum;
|
|
|
order.invoiceUrl = url;
|
|
|
+ (string, string) a = BlobUrlString(url);
|
|
|
+ string ContainerName = a.Item1;
|
|
|
+ string BlobName = a.Item2;
|
|
|
+ bool flg = IsBlobName(BlobName);
|
|
|
+ var sas = _azureStorage.GetBlobSasUriRead(ContainerName, BlobName);
|
|
|
+ order.invoiceUrl =$"{order.invoiceUrl}?{sas.sas}";
|
|
|
if (!string.IsNullOrWhiteSpace(order.buyer_email) &&order. invoiceNotify!=3)
|
|
|
{
|
|
|
Regex reg = new Regex("[\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[\\w](?:[\\w-]*[\\w])?");
|
|
|
if (reg.IsMatch($"{order.buyer_email}"))
|
|
|
{
|
|
|
- (string, string) a = BlobUrlString(url);
|
|
|
- string ContainerName = a.Item1;
|
|
|
- string BlobName = a.Item2;
|
|
|
- bool flg = IsBlobName(BlobName);
|
|
|
+
|
|
|
if (flg)
|
|
|
{
|
|
|
- var sas = _azureStorage.GetBlobSasUriRead(ContainerName, BlobName);
|
|
|
- order.invoiceUrl =$"{order.invoiceUrl}?{sas.sas}";
|
|
|
string html = System.IO.File.ReadAllText("JsonFile/Core/mail.html");
|
|
|
html= html.Replace("{tmdname}", order.buyer_name).Replace("{productName}", order.item_desc)
|
|
|
.Replace("{orderId}", order.order_no).Replace("{pay_amount}", $"{order.pay_amount*1.0/100}")
|