CreateWebhook.php
2 years ago
DeleteWebhook.php
2 years ago
GenerateClientToken.php
2 years ago
GetAccessToken.php
2 years ago
UpdateWebhook.php
2 years ago
VerifyWebhookSignature.php
3 years ago
CreateWebhook.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\PaymentGateways\PayPalCommerce\PayPalCheckoutSdk\Requests; |
| 4 | |
| 5 | use PayPalHttp\HttpRequest; |
| 6 | |
| 7 | /** |
| 8 | * Class CreateWebhook |
| 9 | * |
| 10 | * This class use as request to create a webhook. |
| 11 | * |
| 12 | * @since 2.32.0 |
| 13 | */ |
| 14 | class CreateWebhook extends HttpRequest |
| 15 | { |
| 16 | public function __construct(array $requestBody) |
| 17 | { |
| 18 | parent::__construct('/v1/notifications/webhooks', 'POST'); |
| 19 | |
| 20 | $this->headers["Content-Type"] = "application/json"; |
| 21 | $this->body = wp_json_encode($requestBody); |
| 22 | } |
| 23 | } |
| 24 |