Browse Source

更新支付

tags/v1.0.7^0
wuliangbo 1 year ago
parent
commit
4965fe3895
2 changed files with 6 additions and 1 deletions
  1. +3
    -0
      src/Pay/Application.php
  2. +3
    -1
      src/Pay/Partner/Client.php

+ 3
- 0
src/Pay/Application.php View File

@@ -11,6 +11,7 @@ namespace EasyWeChat\Pay;
use Closure;
use EasyWeChat\Kernel\Exceptions\InvalidArgumentException;
use EasyWeChat\Kernel\ServiceContainer;
use EasyWeChat\OfficialAccount;

/**
* Class Application
@@ -19,10 +20,12 @@ use EasyWeChat\Kernel\ServiceContainer;
* @property \EasyWeChat\Pay\Direct\Client $direct
* @property \EasyWeChat\Pay\Jssdk\Client $jssdk
* @property \EasyWeChat\Pay\Partner\Client $partner
* @property \EasyWeChat\OfficialAccount\Auth\AccessToken $access_token
*/
class Application extends ServiceContainer
{
protected $providers = [
OfficialAccount\Auth\ServiceProvider::class,
Combine\ServiceProvider::class,
Direct\ServiceProvider::class,
Partner\ServiceProvider::class,


+ 3
- 1
src/Pay/Partner/Client.php View File

@@ -83,7 +83,9 @@ class Client extends BaseClient
{
$params['sp_appid'] = $this->app->config->get('app_id');
$params['sp_mchid'] = $this->app->config->get('mch_id');
$params['sub_appid'] = $this->app->config->get('sub_appid');
if ($this->app->config->get('sub_appid')) {
$params['sub_appid'] = $this->app->config->get('sub_appid');
}
$params['sub_mchid'] = $this->app->config->get('sub_mch_id');
$params['notify_url'] = $params['notify_url'] ?? $this->app['config']['notify_url'];
return $params;


Loading…
Cancel
Save