|
@@ -85,7 +85,7 @@ class YLYService extends HttpService implements ProviderInterface
|
|
|
|
|
|
public function selectStore($store_id)
|
|
|
{
|
|
|
- $terminal_number = SystemStore::where('id',$store_id)->value('terminal_number');
|
|
|
+ $terminal_number = SystemStore::where('id', $store_id)->value('terminal_number');
|
|
|
$this->terminal = $terminal_number;
|
|
|
$this->getAccessToken($store_id);
|
|
|
return $this;
|
|
@@ -94,9 +94,9 @@ class YLYService extends HttpService implements ProviderInterface
|
|
|
|
|
|
* 获取AccessToken
|
|
|
* */
|
|
|
- protected function getAccessToken($store_id=0)
|
|
|
+ protected function getAccessToken($store_id = 0)
|
|
|
{
|
|
|
- $this->access_token = CacheModel::getDbCache('YLY_access_token'.$store_id, function () {
|
|
|
+ $this->access_token = CacheModel::getDbCache('YLY_access_token' . $store_id, function () {
|
|
|
$request = self::postRequest($this->apiUrl . 'oauth/oauth', [
|
|
|
'client_id' => $this->client_id,
|
|
|
'grant_type' => 'client_credentials',
|
|
@@ -183,6 +183,8 @@ class YLYService extends HttpService implements ProviderInterface
|
|
|
*/
|
|
|
public function setContent(string $name, array $orderInfo, array $product)
|
|
|
{
|
|
|
+ $orderInfo['real_name'] = substr($orderInfo['real_name'], 0, 2) . "*" . substr($orderInfo['user_phone'], 4);
|
|
|
+ $orderInfo['user_phone'] = substr($orderInfo['user_phone'], 0, 3) . "****" . substr($orderInfo['user_phone'], 7);
|
|
|
$timeYmd = date('Y-m-d', time());
|
|
|
$timeHis = date('H:i:s', time());
|
|
|
$goodsStr = '<table><tr><td>商品名称</td><td>数量</td><td>金额</td><td>小计</td></tr>';
|