File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
src/Gateways/Efi/Resources/Charge Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 34
34
*
35
35
* @return array charges
36
36
*/
37
- $ phpay
37
+ $ charges = $ phpay
38
38
->charge ()
39
- ->setQueryParams ([
40
- 'charge_type ' => 'billet ' ,
41
- 'begin_date ' => '2024-11-01 ' ,
42
- 'end_date ' => '2024-11-30 ' ,
43
- 'status ' => 'unpaid ' ,
44
- ])
45
39
->getAll ();
46
40
47
41
/**
Original file line number Diff line number Diff line change @@ -93,6 +93,15 @@ public function setQueryParams(array $queryParams): ChargeInterface
93
93
*/
94
94
public function getAll (): array
95
95
{
96
+ if (empty ($ this ->queryParams )) {
97
+ $ this ->setQueryParams ([
98
+ 'charge_type ' => 'billet ' ,
99
+ 'begin_date ' => date ('Y-m-d ' , strtotime ('-30 days ' )),
100
+ 'end_date ' => date ('Y-m-d ' ),
101
+ 'status ' => 'unpaid ' ,
102
+ ]);
103
+ }
104
+
96
105
return $ this ->get ('v1/charges ' , $ this ->queryParams );
97
106
}
98
107
You can’t perform that action at this time.
0 commit comments