Commit b1f7210e by yangsh

修改customer中的环境变量

parent ae2a7c90
...@@ -55,4 +55,4 @@ WX_APP_ID=wx5a234043195ec484 ...@@ -55,4 +55,4 @@ WX_APP_ID=wx5a234043195ec484
WX_APP_SECRET=74af342df5f80ed48e32deffe893de56 WX_APP_SECRET=74af342df5f80ed48e32deffe893de56
WX_APP_KEY=shengpeng2017shengpeng2017shengp WX_APP_KEY=shengpeng2017shengpeng2017shengp
WX_MCH_ID=1426979702 WX_MCH_ID=1426979702
NB_HOST=http://cdz-nb.staging.senthink.com
...@@ -55,4 +55,6 @@ WX_APP_ID=wx5a234043195ec484 ...@@ -55,4 +55,6 @@ WX_APP_ID=wx5a234043195ec484
WX_APP_SECRET=74af342df5f80ed48e32deffe893de56 WX_APP_SECRET=74af342df5f80ed48e32deffe893de56
WX_APP_KEY=shengpeng2017shengpeng2017shengp WX_APP_KEY=shengpeng2017shengpeng2017shengp
WX_MCH_ID=1426979702 WX_MCH_ID=1426979702
WX_SSLCERT_PATH=/var/www/html/storage/cert/apiclient_cert.pem
WX_SSLKEY_PATH=/var/www/html/storage/cert/apiclient_key.pem
...@@ -20,10 +20,9 @@ class SendMessage ...@@ -20,10 +20,9 @@ class SendMessage
public function __construct() public function __construct()
{ {
$this->path = 'api/v1/wechatMessage'; $this->path = 'api/v1/wechatMessage';
$this->uri = 'https://cdzback2.test.senthink.com'; $this->url = getenv('MANAGE_HOST');
} }
...@@ -37,7 +36,7 @@ class SendMessage ...@@ -37,7 +36,7 @@ class SendMessage
{ {
$client = new Client([ $client = new Client([
'base_uri' => $this->uri, 'base_uri' => $this->uri,
'http_errors' => false, 'http_errors' => false,
]); ]);
...@@ -45,9 +44,9 @@ class SendMessage ...@@ -45,9 +44,9 @@ class SendMessage
'form_params' => [ 'form_params' => [
'userId' => $message->getUserId(), 'userId' => $message->getUserId(),
'templateId' => $message->getTemplateId(), 'templateId' => $message->getTemplateId(),
'data' => $message->getPushJson(), 'data' => $message->getPushJson(),
], ],
]); ]);
......
...@@ -29,19 +29,19 @@ class Refund ...@@ -29,19 +29,19 @@ class Refund
*/ */
private $requestParameters = [ private $requestParameters = [
'appid' => '', 'appid' => '',
'mch_id' => '', 'mch_id' => '',
'nonce_str' => '', 'nonce_str' => '',
'sign' => '', 'sign' => '',
'sign_type' => '', 'sign_type' => '',
'transaction_id' => '', 'transaction_id' => '',
'out_trade_no' => '', 'out_trade_no' => '',
'out_refund_no' => '', 'out_refund_no' => '',
'total_fee' => '', 'total_fee' => '',
'refund_desc' => '', 'refund_desc' => '',
'refund_fee' => '', 'refund_fee' => '',
'notify_url' => '', 'notify_url' => '',
'cash_fee' => '', 'cash_fee' => '',
]; ];
...@@ -140,10 +140,10 @@ class Refund ...@@ -140,10 +140,10 @@ class Refund
$response = $client->post(self::URL, [ $response = $client->post(self::URL, [
'http_errors' => false, 'http_errors' => false,
'Content-Type' => 'text/xml; charset=UTF8', 'body' => $requestXml, 'Content-Type' => 'text/xml; charset=UTF8', 'body' => $requestXml,
'ssl_key' => WX::SSLKEY_PATH, 'ssl_key' => getenv('WX SSLKEY_PATH'),
'cert' => WX::SSLCERT_PATH, 'cert' => getenv('WX_SSLKEY_PATH'),
]); ]);
if ($response->getStatusCode() === 200) { if ($response->getStatusCode() === 200) {
......
...@@ -20,21 +20,14 @@ class Wx ...@@ -20,21 +20,14 @@ class Wx
{ {
const APP_ID = 'wx5a234043195ec484'; const APP_ID = 'wx5a234043195ec484';
// const APP_ID = 'wx72a0a0591e4e2539';
const APP_SECRET = '74af342df5f80ed48e32deffe893de56'; const APP_SECRET = '74af342df5f80ed48e32deffe893de56';
// const APP_SECRET = '075401bcb54ae99b62cd9755f4bd939f';
const APP_KEY = 'shengpeng2017shengpeng2017shengp'; const APP_KEY = 'shengpeng2017shengpeng2017shengp';
// const APP_KEY = 'senthink2015senthink2015senthink';
const LANG = 'zh_CN'; const LANG = 'zh_CN';
const MCH_ID = '1426979702'; const MCH_ID = '1426979702';
// const MCH_ID = '1420618402';
const SSLCERT_PATH = __DIR__ . '/cert/apiclient_cert.pem'; const SSLCERT_PATH = __DIR__ . '/cert/apiclient_cert.pem';
...@@ -51,8 +44,7 @@ class Wx ...@@ -51,8 +44,7 @@ class Wx
public static function sign(array $content) public static function sign(array $content)
{ {
$content = array_filter($content, function ($value) $content = array_filter($content, function ($value) {
{
return filled($value); return filled($value);
...@@ -72,7 +64,7 @@ class Wx ...@@ -72,7 +64,7 @@ class Wx
//$str = trim($str,'&'); //$str = trim($str,'&');
$str .= 'key=' . self::APP_KEY; $str .= 'key=' . getenv('WX_APP_KEY');
return strtoupper(md5($str)); return strtoupper(md5($str));
......
...@@ -18,7 +18,7 @@ use Illuminate\Database\Capsule\Manager as Capsule; ...@@ -18,7 +18,7 @@ use Illuminate\Database\Capsule\Manager as Capsule;
use Illuminate\Events\Dispatcher; use Illuminate\Events\Dispatcher;
use Illuminate\Container\Container; use Illuminate\Container\Container;
$dotenv = new \Dotenv\Dotenv(__DIR__); $dotenv = new \Dotenv\Dotenv(__DIR__.'../');
$dotenv->load(); $dotenv->load();
...@@ -61,6 +61,8 @@ try { ...@@ -61,6 +61,8 @@ try {
$queue->consume(function (AMQPEnvelope $envelope, AMQPQueue $queue) { $queue->consume(function (AMQPEnvelope $envelope, AMQPQueue $queue) {
\Lib\Gateway::$registerAddress = getenv('GATEWAY_REGISTER');
$capule = new Capsule(); $capule = new Capsule();
$capule->addConnection([ $capule->addConnection([
......
...@@ -19,7 +19,7 @@ use Lib\redis\RedisSingle; ...@@ -19,7 +19,7 @@ use Lib\redis\RedisSingle;
use Lib\rabbit_mq\PublishPortShed; use Lib\rabbit_mq\PublishPortShed;
$dotenv = new \Dotenv\Dotenv(__DIR__); $dotenv = new \Dotenv\Dotenv(__DIR__ . '../');
$dotenv->load(); $dotenv->load();
try { try {
...@@ -59,6 +59,7 @@ Log::info('启动检查口子脱落消费者'); ...@@ -59,6 +59,7 @@ Log::info('启动检查口子脱落消费者');
try { try {
$queue->consume(function (AMQPEnvelope $envelope, AMQPQueue $queue) { $queue->consume(function (AMQPEnvelope $envelope, AMQPQueue $queue) {
\Lib\Gateway::$registerAddress = getenv('GATEWAY_REGISTER');
$capule = new Capsule(); $capule = new Capsule();
......
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