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 | Order\ServiceProvider::class, |
||
50 | Redpack\ServiceProvider::class, |
||
51 | Refund\ServiceProvider::class, |
||
52 | Reverse\ServiceProvider::class, |
||
53 | Sandbox\ServiceProvider::class, |
||
54 | Transfer\ServiceProvider::class, |
||
55 | ]; |
||
56 | |||
57 | /** |
||
58 | * @var array |
||
59 | */ |
||
60 | protected $defaultConfig = [ |
||
61 | 'http' => [ |
||
62 | 'base_uri' => 'https://api.mch.weixin.qq.com/', |
||
63 | ], |
||
64 | ]; |
||
65 | |||
66 | /** |
||
67 | * Build payment scheme for product. |
||
68 | * |
||
69 | * @param string $productId |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function scheme(string $productId): string |
||
87 | |||
88 | /** |
||
89 | * @param \Closure $closure |
||
90 | * |
||
91 | * @return \Symfony\Component\HttpFoundation\Response |
||
92 | */ |
||
93 | public function handlePaidNotify(Closure $closure) |
||
97 | |||
98 | /** |
||
99 | * @param \Closure $closure |
||
100 | * |
||
101 | * @return \Symfony\Component\HttpFoundation\Response |
||
102 | */ |
||
103 | public function handleRefundedNotify(Closure $closure) |
||
107 | |||
108 | /** |
||
109 | * @param \Closure $closure |
||
110 | * |
||
111 | * @return \Symfony\Component\HttpFoundation\Response |
||
112 | */ |
||
113 | public function handleScannedNotify(Closure $closure) |
||
117 | |||
118 | /** |
||
119 | * Set sub-merchant. |
||
120 | * |
||
121 | * @param string $mchId |
||
122 | * @param string|null $appId |
||
123 | * |
||
124 | * @return $this |
||
125 | */ |
||
126 | public function setSubMerchant(string $mchId, string $appId = null) |
||
133 | |||
134 | /** |
||
135 | * @return bool |
||
136 | */ |
||
137 | public function inSandbox(): bool |
||
141 | |||
142 | /** |
||
143 | * @param string $name |
||
144 | * @param array $arguments |
||
145 | * |
||
146 | * @return mixed |
||
147 | */ |
||
148 | public function __call($name, $arguments) |
||
152 | } |
||
153 |