Properties

$bill

$bill : \EasyWeChat\Payment\Bill\Client

Type

\EasyWeChat\Payment\Bill\Client

$jssdk

$jssdk : \EasyWeChat\Payment\Jssdk\Client

Type

\EasyWeChat\Payment\Jssdk\Client

$order

$order : \EasyWeChat\Payment\Order\Client

Type

\EasyWeChat\Payment\Order\Client

$refund

$refund : \EasyWeChat\Payment\Refund\Client

Type

\EasyWeChat\Payment\Refund\Client

$coupon

$coupon : \EasyWeChat\Payment\Coupon\Client

Type

\EasyWeChat\Payment\Coupon\Client

$reverse

$reverse : \EasyWeChat\Payment\Reverse\Client

Type

\EasyWeChat\Payment\Reverse\Client

$redpack

$redpack : \EasyWeChat\Payment\Redpack\Client

Type

\EasyWeChat\Payment\Redpack\Client

$url

$url : \EasyWeChat\BasicService\Url\Client

Type

\EasyWeChat\BasicService\Url\Client

$transfer

$transfer : \EasyWeChat\Payment\Transfer\Client

Type

\EasyWeChat\Payment\Transfer\Client

$security

$security : \EasyWeChat\Payment\Security\Client

Type

\EasyWeChat\Payment\Security\Client

$access_token

$access_token : \EasyWeChat\OfficialAccount\Auth\AccessToken

Type

\EasyWeChat\OfficialAccount\Auth\AccessToken

$config

$config : \EasyWeChat\Kernel\Config

Type

\EasyWeChat\Kernel\Config

$request

$request : \Symfony\Component\HttpFoundation\Request

Type

\Symfony\Component\HttpFoundation\Request

$http_client

$http_client : \GuzzleHttp\Client

Type

\GuzzleHttp\Client

$logger

$logger : \Monolog\Logger

Type

\Monolog\Logger

$id

$id : string

Type

string

$providers

$providers : array

Type

array

$defaultConfig

$defaultConfig : array

Type

array

$userConfig

$userConfig : array

Type

array

Methods

__construct()

__construct(array  $config = array(), array  $prepends = array(), string|null  $id = null) 

Constructor.

Parameters

array $config
array $prepends
string|null $id

getId()

getId() : string

Returns

string

getConfig()

getConfig() : array

Returns

array

getProviders()

getProviders() : array

Return all providers.

Returns

array

__get()

__get(string  $id) : mixed

Magic get access.

Parameters

string $id

Returns

mixed

__set()

__set(string  $id, mixed  $value) 

Magic set access.

Parameters

string $id
mixed $value

registerProviders()

registerProviders(array  $providers) 

Parameters

array $providers

scheme()

scheme(string  $productId) : string

Build payment scheme for product.

Parameters

string $productId

Returns

string

handlePaidNotify()

handlePaidNotify(\Closure  $closure) : \Symfony\Component\HttpFoundation\Response

Parameters

\Closure $closure

Throws

\EasyWeChat\Kernel\Exceptions\Exception

Returns

\Symfony\Component\HttpFoundation\Response

handleRefundedNotify()

handleRefundedNotify(\Closure  $closure) : \Symfony\Component\HttpFoundation\Response

Parameters

\Closure $closure

Throws

\EasyWeChat\Kernel\Exceptions\Exception

Returns

\Symfony\Component\HttpFoundation\Response

handleScannedNotify()

handleScannedNotify(\Closure  $closure) : \Symfony\Component\HttpFoundation\Response

Parameters

\Closure $closure

Throws

\EasyWeChat\Kernel\Exceptions\Exception

Returns

\Symfony\Component\HttpFoundation\Response

setSubMerchant()

setSubMerchant(string  $mchId, string|null  $appId = null) : $this

Set sub-merchant.

Parameters

string $mchId
string|null $appId

Returns

$this

inSandbox()

inSandbox() : boolean

Returns

boolean

getKey()

getKey(string|null  $endpoint = null) : string

Parameters

string|null $endpoint

Throws

\EasyWeChat\Kernel\Exceptions\InvalidArgumentException

Returns

string

__call()

__call(string  $name, array  $arguments) : mixed

Parameters

string $name
array $arguments

Returns

mixed

pay()

pay(array  $attributes) : mixed

Parameters

array $attributes

Returns

mixed

authCodeToOpenid()

authCodeToOpenid(string  $authCode) : mixed

Parameters

string $authCode

Returns

mixed