1 | <?php |
||
36 | class Application extends ServiceContainer |
||
37 | { |
||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $providers = [ |
||
42 | OfficialAccount\Auth\ServiceProvider::class, |
||
43 | BasicService\Url\ServiceProvider::class, |
||
44 | Base\ServiceProvider::class, |
||
45 | Bill\ServiceProvider::class, |
||
46 | Coupon\ServiceProvider::class, |
||
47 | Jssdk\ServiceProvider::class, |
||
48 | Order\ServiceProvider::class, |
||
49 | Redpack\ServiceProvider::class, |
||
50 | Refund\ServiceProvider::class, |
||
51 | Reverse\ServiceProvider::class, |
||
52 | Sandbox\ServiceProvider::class, |
||
53 | Transfer\ServiceProvider::class, |
||
54 | ]; |
||
55 | |||
56 | /** |
||
57 | * @var array |
||
58 | */ |
||
59 | protected $defaultConfig = [ |
||
60 | 'http' => [ |
||
61 | 'base_uri' => 'https://api.mch.weixin.qq.com/', |
||
62 | ], |
||
63 | ]; |
||
64 | |||
65 | /** |
||
66 | * Build payment scheme for product. |
||
67 | * |
||
68 | * @param string $productId |
||
69 | * |
||
70 | * @return string |
||
71 | */ |
||
72 | public function scheme(string $productId): string |
||
86 | |||
87 | /** |
||
88 | * @param callable $callback |
||
89 | * |
||
90 | * @return \Symfony\Component\HttpFoundation\Response |
||
91 | */ |
||
92 | public function handlePaidNotify(callable $callback) |
||
96 | |||
97 | /** |
||
98 | * @param callable $callback |
||
99 | * |
||
100 | * @return \Symfony\Component\HttpFoundation\Response |
||
101 | */ |
||
102 | public function handleRefundedNotify(callable $callback) |
||
106 | |||
107 | /** |
||
108 | * @param callable $callback |
||
109 | * |
||
110 | * @return \Symfony\Component\HttpFoundation\Response |
||
111 | */ |
||
112 | public function handleScannedNotify(callable $callback) |
||
116 | |||
117 | /** |
||
118 | * @return bool |
||
119 | */ |
||
120 | public function inSandbox(): bool |
||
124 | |||
125 | /** |
||
126 | * @param string $name |
||
127 | * @param array $arguments |
||
128 | * |
||
129 | * @return mixed |
||
130 | */ |
||
131 | public function __call($name, $arguments) |
||
135 | } |
||
136 |