PluginProbe
Bookit — Booking & Appointment Calendar / 2.6.0.5
Bookit — Booking & Appointment Calendar v2.6.0.5
2.6.0.5 2.6.0.4 2.6.0.3 2.6.0.2 2.6.0.1 2.6.0 trunk 1.2 1.2.2 1.2.3 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 All 62 releases
bookit / src / Bookit / Gateways / StripeConnect / Requests.php

Requests.php in Bookit — Booking & Appointment Calendar 2.6.0.5, at src/Bookit/Gateways/StripeConnect/Requests.php

64 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Bookit\Gateways\StripeConnect;
4
5 use Bookit\Gateways\Contracts\Abstract_Requests;
6
7 /**
8 * Stripe Requests.
9 *
10 * @since 2.5.0
11 *
12 * @package Bookit\Gateways\StripeConnect;
13 */
14 class Requests extends Abstract_Requests {
15
16 /**
17 * The Merchant class reference to use.
18 *
19 * @since 2.5.0
20 *
21 * @var string
22 */
23 public static $merchant = Merchant::class;
24
25 /**
26 * The Gateway class reference to use.
27 *
28 * @since 2.5.0
29 *
30 * @var string
31 */
32 public static $gateway = Gateway::class;
33
34 /**
35 * The Stripe API base URL.
36 *
37 * @since 2.5.0
38 *
39 * @var string
40 */
41 private static $api_base_url = 'https://api.stripe.com/v1';
42
43 /**
44 * @inheritDoc
45 */
46 public static function get_api_url( $endpoint, array $query_args = [] ) {
47 $base_url = static::get_environment_url();
48 $endpoint = ltrim( $endpoint, '/' );
49
50 return add_query_arg( $query_args, "{$base_url}/{$endpoint}" );
51 }
52
53 /**
54 * Get environment base URL.
55 *
56 * @since 2.5.0
57 *
58 * @return string
59 */
60 public static function get_environment_url() {
61 return static::$api_base_url;
62 }
63
64 }