| @@ 84-90 (lines=7) @@ | ||
| 81 | * |
|
| 82 | * @return array list of event types |
|
| 83 | */ |
|
| 84 | public function getEventTypes() |
|
| 85 | {
|
|
| 86 | $this->endpoint = 'eventtypes'; |
|
| 87 | $this->url = sprintf('%s%s', $this->url, $this->endpoint);
|
|
| 88 | $response = $this->get($this->url); |
|
| 89 | return new AuthnetWebhooksResponse($response); |
|
| 90 | } |
|
| 91 | ||
| 92 | /** |
|
| 93 | * Outputs the endpoint URL and request JSON in a human readable format |
|
| @@ 137-143 (lines=7) @@ | ||
| 134 | * |
|
| 135 | * @return array list of event types |
|
| 136 | */ |
|
| 137 | public function getWebhooks() |
|
| 138 | {
|
|
| 139 | $this->endpoint = 'webhooks'; |
|
| 140 | $this->url = sprintf('%s%s', $this->url, $this->endpoint);
|
|
| 141 | $response = $this->get($this->url); |
|
| 142 | return new AuthnetWebhooksResponse($response); |
|
| 143 | } |
|
| 144 | ||
| 145 | /** |
|
| 146 | * Get a webhook |
|
| @@ 152-158 (lines=7) @@ | ||
| 149 | * |
|
| 150 | * @return array list of event types |
|
| 151 | */ |
|
| 152 | public function getWebhook($webhookId) |
|
| 153 | {
|
|
| 154 | $this->endpoint = 'webhooks'; |
|
| 155 | $this->url = sprintf('%s%s/%s', $this->url, $this->endpoint, $webhookId);
|
|
| 156 | $response = $this->get($this->url); |
|
| 157 | return new AuthnetWebhooksResponse($response); |
|
| 158 | } |
|
| 159 | ||
| 160 | /** |
|
| 161 | * Outputs the endpoint URL and request JSON in a human readable format |
|