1 | <?php |
||
37 | class Application extends ServiceContainer |
||
38 | { |
||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $providers = [ |
||
43 | OfficialAccount\Auth\ServiceProvider::class, |
||
44 | BasicService\Url\ServiceProvider::class, |
||
45 | Base\ServiceProvider::class, |
||
46 | Bill\ServiceProvider::class, |
||
47 | Coupon\ServiceProvider::class, |
||
48 | Jssdk\ServiceProvider::class, |
||
49 | Merchant\ServiceProvider::class, |
||
50 | Order\ServiceProvider::class, |
||
51 | Redpack\ServiceProvider::class, |
||
52 | Refund\ServiceProvider::class, |
||
53 | Reverse\ServiceProvider::class, |
||
54 | Sandbox\ServiceProvider::class, |
||
55 | Transfer\ServiceProvider::class, |
||
56 | ]; |
||
57 | |||
58 | /** |
||
59 | * @var array |
||
60 | */ |
||
61 | protected $defaultConfig = [ |
||
62 | 'http' => [ |
||
63 | 'base_uri' => 'https://api.mch.weixin.qq.com/', |
||
64 | ], |
||
65 | ]; |
||
66 | |||
67 | /** |
||
68 | * Build payment scheme for product. |
||
69 | * |
||
70 | * @param string $productId |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | public function scheme(string $productId): string |
||
88 | |||
89 | /** |
||
90 | * @param \Closure $closure |
||
91 | * |
||
92 | * @return \Symfony\Component\HttpFoundation\Response |
||
93 | * |
||
94 | * @codeCoverageIgnore |
||
95 | */ |
||
96 | public function handlePaidNotify(Closure $closure) |
||
100 | |||
101 | /** |
||
102 | * @param \Closure $closure |
||
103 | * |
||
104 | * @return \Symfony\Component\HttpFoundation\Response |
||
105 | * |
||
106 | * @codeCoverageIgnore |
||
107 | */ |
||
108 | public function handleRefundedNotify(Closure $closure) |
||
112 | |||
113 | /** |
||
114 | * @param \Closure $closure |
||
115 | * |
||
116 | * @return \Symfony\Component\HttpFoundation\Response |
||
117 | * |
||
118 | * @codeCoverageIgnore |
||
119 | */ |
||
120 | public function handleScannedNotify(Closure $closure) |
||
124 | |||
125 | /** |
||
126 | * Set sub-merchant. |
||
127 | * |
||
128 | * @param string $mchId |
||
129 | * @param string|null $appId |
||
130 | * |
||
131 | * @return $this |
||
132 | */ |
||
133 | public function setSubMerchant(string $mchId, string $appId = null) |
||
140 | |||
141 | /** |
||
142 | * @return bool |
||
143 | */ |
||
144 | public function inSandbox(): bool |
||
148 | |||
149 | /** |
||
150 | * @return string |
||
151 | */ |
||
152 | public function getKey() |
||
156 | |||
157 | /** |
||
158 | * @param string $name |
||
159 | * @param array $arguments |
||
160 | * |
||
161 | * @return mixed |
||
162 | */ |
||
163 | public function __call($name, $arguments) |
||
167 | } |
||
168 |