BitPay PHP SDK

RESTcli
in package

Tags
author

BitPay Integrations integrations@bitpay.com

license

http://www.opensource.org/licenses/mit-license.php MIT

Table of Contents

Properties

$baseUrl  : string
$client  : Client
$ecKey  : PrivateKey
$identity  : string
$platformInfo  : string
Value for the X-BitPay-Platform-Info header.
$proxy  : string

Methods

__construct()  : mixed
RESTcli constructor.
delete()  : string
Send DELETE request.
get()  : string
Send GET request.
getJsonDataFromResponse()  : string
Parse Response object into json
init()  : void
Initialize Client.
post()  : string
Send POST request.
update()  : string
Send PUT request.
hasError()  : bool
parseException()  : void

Properties

$identity

protected string $identity

$platformInfo

Value for the X-BitPay-Platform-Info header.

protected string $platformInfo

Methods

__construct()

RESTcli constructor.

public __construct(string $environment, PrivateKey $ecKey[, string|null $proxy = null ], string|null $platformInfo) : mixed
Parameters
$environment : string
$ecKey : PrivateKey
$proxy : string|null = null
$platformInfo : string|null
Tags
throws
BitPayApiException

delete()

Send DELETE request.

public delete(mixed $uri[, array<string|int, mixed>|null $parameters = null ]) : string
Parameters
$uri : mixed
$parameters : array<string|int, mixed>|null = null
Tags
throws
BitPayApiException
throws
BitPayGenericException
Return values
string

get()

Send GET request.

public get(mixed $uri[, array<string|int, mixed>|null $parameters = null ][, bool $signatureRequired = true ]) : string
Parameters
$uri : mixed
$parameters : array<string|int, mixed>|null = null
$signatureRequired : bool = true
Tags
throws
BitPayApiException
throws
BitPayGenericException
Return values
string

(json)

post()

Send POST request.

public post(mixed $uri[, array<string|int, mixed> $formData = [] ][, bool $signatureRequired = true ]) : string
Parameters
$uri : mixed
$formData : array<string|int, mixed> = []
$signatureRequired : bool = true
Tags
throws
BitPayApiException
throws
BitPayGenericException
Return values
string

(json)

update()

Send PUT request.

public update(mixed $uri[, array<string|int, mixed> $formData = [] ]) : string
Parameters
$uri : mixed
$formData : array<string|int, mixed> = []
Tags
throws
BitPayApiException
throws
BitPayGenericException
Return values
string

hasError()

private hasError(array<string|int, mixed> $body) : bool
Parameters
$body : array<string|int, mixed>
Return values
bool

        
On this page

Search results