payment\PaymentGateway_Result
Class for gateway results
Synopsis
class PaymentGateway_Result
{
- // constants
- const SUCCESS = 'Success';
- const FAILURE = 'Failure';
- const INCOMPLETE = 'Incomplete';
- // members
- protected String $status;
- protected array $errors = ;
- protected HTTPResponse $HTTPResponse;
- // methods
- public void __construct()
- public void setStatus()
- public String getStatus()
- public HTTPResponse getHTTPResponse()
- public void setErrors()
- public void addError()
- public Array getErrors()
- public Boolean isSuccess()
- public Boolean isFailure()
- public Boolean isIncomplete()
Constants
Name | Value |
---|---|
SUCCESS | 'Success' |
FAILURE | 'Failure' |
INCOMPLETE | 'Incomplete' |
Members
protected
- $HTTPResponse
—
SilverStripe\Control\HTTPResponse
The HTTP response object passed back from the gateway - $errors
—
array
Array of errors raised by the gateway array(ErrorCode => ErrorMessage) - $status
—
payment\String
Status of the payment being processed
Methods
public
- __construct()
- addError() — Add an error to the error list
- getErrors() — Get errors
- getHTTPResponse() — Get HTTP Response
- getStatus() — Get status of this result
- isFailure() — Returns true if failure
- isIncomplete() — Returns true if incomplete
- isSuccess() — Returns true if successful
- setErrors() — Set the gateway errors
- setStatus() — Set the payment result status.