|
@@ -8,18 +8,21 @@ use Illuminate\Http\Request;
|
8
|
8
|
|
9
|
9
|
trait BillStatusBoolean
|
10
|
10
|
{
|
11
|
|
- public function isBillSuccess(Request $request): bool
|
|
11
|
+ public function isBillSuccess(Request $request): ?bool
|
12
|
12
|
{
|
13
|
|
- return $this->getBillStatus($request) > 0;
|
|
13
|
+ $status = $this->getBillStatus($request);
|
|
14
|
+ return $status === null ? null : $status > 0;
|
14
|
15
|
}
|
15
|
16
|
|
16
|
|
- public function isBillFailed(Request $request): bool
|
|
17
|
+ public function isBillFailed(Request $request): ?bool
|
17
|
18
|
{
|
18
|
|
- return $this->getBillStatus($request) < 0;
|
|
19
|
+ $status = $this->getBillStatus($request);
|
|
20
|
+ return $status === null ? null : $status < 0;
|
19
|
21
|
}
|
20
|
22
|
|
21
|
|
- public function isBillPending(Request $request): bool
|
|
23
|
+ public function isBillPending(Request $request): ?bool
|
22
|
24
|
{
|
23
|
|
- return $this->getBillStatus($request) == 0;
|
|
25
|
+ $status = $this->getBillStatus($request);
|
|
26
|
+ return $status === null ? null : $status == 0;
|
24
|
27
|
}
|
25
|
28
|
}
|