Commit e6085cef authored by hj's avatar hj

更新

parent b4fe7d74
...@@ -632,7 +632,7 @@ class InvoiceService ...@@ -632,7 +632,7 @@ class InvoiceService
'invoice_real_date' => $invoiceParams['invoice_real_date'] 'invoice_real_date' => $invoiceParams['invoice_real_date']
]; ];
$token = hash_hmac("sha256", json_encode($urlParams), $invoiceParams['invoice_real_number'], false); $token = hash_hmac("sha256", json_encode($urlParams), $invoiceParams['invoice_real_number'], false);
$downloadUrl = 'http://openapi.chem-site.com/finance/invoice/download?token='.$this->apiService->base64UrlEncode('hash='.$token.'&hm='.$invoiceParams['invoice_real_number']); $downloadUrl = 'https://openapi.chem-site.com/finance/invoice/download?token='.$this->apiService->base64UrlEncode('hash='.$token.'&hm='.$invoiceParams['invoice_real_number']);
$customerInfo = json_decode($invoiceParams['invoice_customer'],true); $customerInfo = json_decode($invoiceParams['invoice_customer'],true);
...@@ -730,7 +730,8 @@ class InvoiceService ...@@ -730,7 +730,8 @@ class InvoiceService
$path = config('filesystems.default.root').'public/finance/invoice/'.$invoiceInfo['invoice_platform'].'/'.$invoiceInfo['platform_invoice_id'].'/'; $path = config('filesystems.default.root').'public/finance/invoice/'.$invoiceInfo['invoice_platform'].'/'.$invoiceInfo['platform_invoice_id'].'/';
$this->saveInvoicePdf($path.$filename, $invoiceInfo['invoice_pdf_url']); $this->saveInvoicePdf($path.$filename, $invoiceInfo['invoice_pdf_url']);
$downloadUrl = $invoiceInfo['invoice_platform'] == 'rhawn' ? 'http://download.rhawn.cn/' : 'http://download.chem-mall.com/'; //$downloadUrl = $invoiceInfo['invoice_platform'] == 'rhawn' ? 'https://download.rhawn.cn/' : 'http://download.chem-mall.com/';
$downloadUrl = 'https://download.rhawn.cn/';
return [ 'downloadUrl' => $downloadUrl.$path.$filename, 'path' => $path, 'filename' => $filename ]; return [ 'downloadUrl' => $downloadUrl.$path.$filename, 'path' => $path, 'filename' => $filename ];
} }
...@@ -747,7 +748,7 @@ class InvoiceService ...@@ -747,7 +748,7 @@ class InvoiceService
$path = config('filesystems.default.root').'public/finance/invoice/manual/'; $path = config('filesystems.default.root').'public/finance/invoice/manual/';
$this->saveInvoicePdf($path.$filename); $this->saveInvoicePdf($path.$filename);
$downloadUrl = 'http://download.rhawn.cn/'; $downloadUrl = 'https://download.rhawn.cn/';
return [ 'downloadUrl' => $downloadUrl.$path.$filename, 'path' => $path, 'filename' => $filename ]; return [ 'downloadUrl' => $downloadUrl.$path.$filename, 'path' => $path, 'filename' => $filename ];
//throw new \Exception('没有对应的电子发票提供下载',502); //throw new \Exception('没有对应的电子发票提供下载',502);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment