ConnectClient.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\ConnectClient; |
| 4 | |
| 5 | /** |
| 6 | * Class ConnectClient |
| 7 | * @package Give\PaymentGateways\PayPalCommerce |
| 8 | * |
| 9 | * @since 2.8.0 |
| 10 | */ |
| 11 | class ConnectClient |
| 12 | { |
| 13 | /** |
| 14 | * Api Url |
| 15 | * |
| 16 | * @since 2.8.0 |
| 17 | * |
| 18 | * @var string |
| 19 | */ |
| 20 | public $apiUrl = 'https://connect.givewp.com'; |
| 21 | |
| 22 | /** |
| 23 | * Get rest api endpoint url for requests. |
| 24 | * |
| 25 | * @since 2.8.0 |
| 26 | * |
| 27 | * @param string $endpoint |
| 28 | * |
| 29 | * @return string |
| 30 | */ |
| 31 | public function getApiUrl($endpoint) |
| 32 | { |
| 33 | return "{$this->apiUrl}/{$endpoint}"; |
| 34 | } |
| 35 | } |
| 36 |