\PP\ControllersPandaPay

Interacts with the PandaPay API Extend this class if you need additional functionality or need to modify the internal \Curl\Curl object

Summary

Methods
Properties
Constants
__construct()
sendDonation()
sendGrant()
getRequestHeaders()
getResponseHeaders()
getResponseStatusCode()
getLastError()
No public properties found
API_URLS
API_VERSION
No protected methods found
$curl
$secretKey
$log
N/A
No private methods found
No private properties found
N/A

Constants

API_URLS

API_URLS

API_VERSION

API_VERSION

Properties

$curl

$curl : 

Type

$secretKey

$secretKey : 

Type

$log

$log : 

Type

Methods

__construct()

__construct(\PP\Controllers\[String  $ppKey, \PP\Controllers\string  $logglyKey = null) 

Creates a new API wrapper

Parameters

\PP\Controllers\[String $ppKey

the Loggly API secret key, leave null for local file logging]

\PP\Controllers\string $logglyKey

sendDonation()

sendDonation(\PP\Models\Donation  $donation) : Object

Sends a donation request to PandaPay

Parameters

\PP\Models\Donation $donation

the donation object

Throws

\Exception

on failure

Returns

Object —

the JSON response as a PHP object

sendGrant()

sendGrant(\PP\Models\Donation  $donation) : Object

Sends a grant request to PandaPay

Parameters

\PP\Models\Donation $donation

the donation object

Throws

\Exception

on failure

Returns

Object —

the JSON response as a PHP object

getRequestHeaders()

getRequestHeaders() : array<mixed,String>

Gets the request headers

Returns

array<mixed,String> —

responseHeaders[data, keys]

getResponseHeaders()

getResponseHeaders() : array<mixed,String>

Gets the response headers

Returns

array<mixed,String> —

responseHeaders[data, keys]

getResponseStatusCode()

getResponseStatusCode() : integer

Gets the response status code

Returns

integer —

the status code

getLastError()

getLastError() : String

Gets the last curl error

Returns

String —

the error