Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function createWebHook($url, array $events) |
||
20 | { |
||
21 | $this->apiEndPoint = 'v1/notifications/webhooks'; |
||
1 ignored issue
–
show
|
|||
22 | $this->apiUrl = collect([$this->apiUrl, $this->apiEndPoint])->implode('/'); |
||
1 ignored issue
–
show
|
|||
23 | |||
24 | $data = ['url' => $url]; |
||
25 | $data['event_types'] = collect($events)->map(function ($item) { |
||
26 | return ['name' => $item]; |
||
27 | })->toArray(); |
||
28 | |||
29 | $this->options['json'] = $data; |
||
1 ignored issue
–
show
|
|||
30 | |||
31 | $this->verb = 'post'; |
||
1 ignored issue
–
show
|
|||
32 | |||
33 | return $this->doPayPalRequest(); |
||
1 ignored issue
–
show
|
|||
34 | } |
||
142 |