class Sessions extends SlimCD implements Sessions

Class Sessions.

Properties

string $transactionUrl Transaction URL. from SlimCD
string $statsURL Stats URL. from SlimCD
bool $debug Whether or not debug mode is on. Default is off. from SlimCD
protected $send Data to send. from SlimCD
protected $receive Data that is received. from SlimCD
protected int $defaultTimeout Curl timeout. from SlimCD
protected bool $verifyPeer Curl Verify Peer. from SlimCD

Methods

object
buildError($url, $errorMessage)

Create an error using the URL and error message.

from SlimCD
mixed|object
httpPost($urlString, $timeout, $nameValueArray)

Use curl to POST the request to SlimCd.

from SlimCD
int
getTimeout($timeout)

Get current timeout value from property.

from SlimCD
string
getVersion()

Get the current version of the client.

from SlimCD
setVerifyPeer($verifyPeer)

You can disable verify peer, but it is not recommended.

from SlimCD
mixed
cancelSession(CancelSessionRequest $request, bool $timeout = false)

Prevents the session from being used.

mixed
checkSession(CheckSessionRequest $request, bool $timeout = false)

Checks a session.

mixed
createSession(CreateSessionRequest $request, bool $timeout = false)

Loads data into SLIM CD and returns a session id.

mixed
destroySessions(DestroySessionsRequest $request, bool $timeout = false)

Destroy and delete a session.

mixed
getSessionFields(GetSessionFieldsRequest $request, bool $timeout = false)

Get Session Fields.

mixed
multiSession(MultiSessionRequest $request)

Creates a unique session from a master-session and displays it. Used instead of ShowSession when the form is a template form.

mixed
searchSessions(SearchSessionsRequest $request, bool $timeout = false)

Search Sessions.

mixed
sendSession(SendSessionRequest $request, bool $timeout = false)

Sends a link via email or sms-text that allows the session to be displayed/filled on a remote PC.

mixed
showSession(ShowSessionRequest $request)

Displays the session inside the browser.

mixed
spawnSessions(SpawnSessionsRequest $request, bool $timeout = false)

Spawn a new sessionid from an old one.

Details

in SlimCD at line 73
protected object buildError($url, $errorMessage)

Create an error using the URL and error message.

Parameters

$url
$errorMessage

Return Value

object

in SlimCD at line 100
protected mixed|object httpPost($urlString, $timeout, $nameValueArray)

Use curl to POST the request to SlimCd.

Parameters

$urlString
$timeout
$nameValueArray

Return Value

mixed|object

Exceptions

Exception

in SlimCD at line 181
protected int getTimeout($timeout)

Get current timeout value from property.

Parameters

$timeout

Return Value

int

in SlimCD at line 197
string getVersion()

Get the current version of the client.

Return Value

string

in SlimCD at line 207
setVerifyPeer($verifyPeer)

You can disable verify peer, but it is not recommended.

Parameters

$verifyPeer

at line 29
mixed cancelSession(CancelSessionRequest $request, bool $timeout = false)

Prevents the session from being used.

CancelSession is used to cancel a session. Cancelling a session will prevent the clerk from performing payment processing. Cancelling a session may not be possible if the payment has already been completed (in which case a VOID transaction must be performed on the gateway), or if the payment is currently in-process for payment processing with the credit card companies.

Parameters

CancelSessionRequest $request
bool $timeout

Return Value

mixed

Exceptions

Exception

at line 46
mixed checkSession(CheckSessionRequest $request, bool $timeout = false)

Checks a session.

Parameters

CheckSessionRequest $request
bool $timeout

Return Value

mixed

Exceptions

Exception

at line 70
mixed createSession(CreateSessionRequest $request, bool $timeout = false)

Loads data into SLIM CD and returns a session id.

CreateSession is used to create a SessionID. SessionID values are later used as part of a secure and tamper-resistant URL so that a browser-style application can be launched to accept cardholder information outside of the developer’s software. CreateSession can also be used to send initial customer data to SLIM CD so that payment pages are pre-populated for the clerk, providing ease of data entry.

Parameters

CreateSessionRequest $request
bool $timeout

Return Value

mixed

Exceptions

Exception

at line 87
mixed destroySessions(DestroySessionsRequest $request, bool $timeout = false)

Destroy and delete a session.

Parameters

DestroySessionsRequest $request
bool $timeout

Return Value

mixed

Exceptions

Exception

at line 108
mixed getSessionFields(GetSessionFieldsRequest $request, bool $timeout = false)

Get Session Fields.

Returns all of the session’s “user data”. Any pre-filled data will be stored here. Any fields on the page will also be displayed once the user clicks SUBMIT to save that data as the page is processed.

Parameters

GetSessionFieldsRequest $request
bool $timeout

Return Value

mixed

Exceptions

Exception

at line 132
mixed multiSession(MultiSessionRequest $request)

Creates a unique session from a master-session and displays it. Used instead of ShowSession when the form is a template form.

MultiSession is used to display a previously-created session similarly to ShowSession. It is designed to accept limited input and display HTML output so that the SessionID value can be included in the URL that is provided as a command-line when launching in a browser. This also works well when redirecting from one web server to another. Unlike ShowSession, MultiSession is designed to be used by multiple recipients such as for charitable donations. MultiSession creates a unique session from the original template each time it is called.

Parameters

MultiSessionRequest $request

Return Value

mixed

at line 155
mixed searchSessions(SearchSessionsRequest $request, bool $timeout = false)

Search Sessions.

Returns a list of all the session matching the search criteria. Search is performed on a date range. Returned data includes session id, approved, approvedamt, etc.

Parameters

SearchSessionsRequest $request
bool $timeout

Return Value

mixed

Exceptions

Exception

at line 178
mixed sendSession(SendSessionRequest $request, bool $timeout = false)

Sends a link via email or sms-text that allows the session to be displayed/filled on a remote PC.

SendSession is used to send a session URL via Email or SMS text message. The recipient can then follow this link on their PC or Mobile device to the previously created hosted payment page where they can enter their payment information and complete the transaction.

Parameters

SendSessionRequest $request
bool $timeout

Return Value

mixed

Exceptions

Exception

at line 198
mixed showSession(ShowSessionRequest $request)

Displays the session inside the browser.

ShowSession is used to display a previously-created session. It is designed to accept limited input and display HTML output so that the SessionID value can be included in the URL that is provided as a command-line when launching in a browser. This also works well when redirecting from one web server to another.

Parameters

ShowSessionRequest $request

Return Value

mixed

at line 213
mixed spawnSessions(SpawnSessionsRequest $request, bool $timeout = false)

Spawn a new sessionid from an old one.

Parameters

SpawnSessionsRequest $request
bool $timeout

Return Value

mixed

Exceptions

Exception