BaseStripeClient::__construct( $config = array() )

Initializes a new instance of the {@link BaseStripeClient} class.


Description Description

The constructor takes a single argument. The argument can be a string, in which case it should be the API key. It can also be an array with various configuration settings.

Configuration settings include the following options:

  • api_key (null|string): the Stripe API key, to be used in regular API requests.
  • client_id (null|string): the Stripe client ID, to be used in OAuth requests.
  • stripe_account (null|string): a Stripe account ID. If set, all requests sent by the client will automatically use the {@code Stripe-Account} header with that account ID.
  • stripe_version (null|string): a Stripe API verion. If set, all requests sent by the client will include the {@code Stripe-Version} header with that API version.

The following configuration settings are also available, though setting these should rarely be necessary (only useful if you want to send requests to a mock server like stripe-mock):

  • api_base (string): the base URL for regular API requests. Defaults to DEFAULT_API_BASE.
  • connect_base (string): the base URL for OAuth requests. Defaults to DEFAULT_CONNECT_BASE.
  • files_base (string): the base URL for file creation requests. Defaults to DEFAULT_FILES_BASE.

Parameters Parameters

(Required) mixed>|string $config the API key as a string, or an array containing the client configuration settings


Top ↑

Source Source

File: includes/gateways/stripe/vendor/stripe/stripe-php/lib/BaseStripeClient.php


			

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.