SubmitUriSchemeTransactionResponse
in package
Response container for SEP-7 transaction submission operations.
This class encapsulates the result of signAndSubmitTransaction() operations. Depending on whether a callback URL was specified in the SEP-7 URI, the response will contain either a Horizon transaction submission response or an HTTP callback response.
Only one of the two response properties will be populated:
- submitTransactionResponse: Set when transaction submitted directly to Stellar network
- callBackResponse: Set when transaction POSTed to callback URL
Table of Contents
Methods
- __construct() : mixed
- Creates a new response container with exactly one response populated.
- getCallBackResponse() : ResponseInterface|null
- Returns the HTTP callback response.
- getSubmitTransactionResponse() : SubmitTransactionResponse|null
- Returns the Horizon transaction submission response.
Methods
__construct()
Creates a new response container with exactly one response populated.
public
__construct([SubmitTransactionResponse|null $submitTransactionResponse = null ][, ResponseInterface|null $callBackResponse = null ]) : mixed
Either submitTransactionResponse or callBackResponse will be non-null, but never both. This reflects the mutually exclusive submission paths.
Parameters
- $submitTransactionResponse : SubmitTransactionResponse|null = null
-
Horizon response when transaction submitted directly to Stellar network. Null if transaction was sent to callback URL instead.
- $callBackResponse : ResponseInterface|null = null
-
HTTP response from callback URL when transaction submitted via callback. Null if transaction was submitted directly to network instead.
getCallBackResponse()
Returns the HTTP callback response.
public
getCallBackResponse() : ResponseInterface|null
Non-null only when transaction was POSTed to callback URL (callback parameter present in SEP-7 URI).
Return values
ResponseInterface|null —HTTP response from callback or null
getSubmitTransactionResponse()
Returns the Horizon transaction submission response.
public
getSubmitTransactionResponse() : SubmitTransactionResponse|null
Non-null only when transaction was submitted directly to Stellar network (no callback URL specified in SEP-7 URI).
Return values
SubmitTransactionResponse|null —Transaction submission result or null