SEP08PostActionResponse
in package
Abstract base class for POST action responses when action_required status is received.
When an approval server responds with action_required status and action_method is POST, the wallet can optionally provide the requested SEP-9 KYC/AML fields programmatically to avoid requiring the user to manually enter information in a browser.
The server responds with one of two possible results:
- no_further_action_required: The POST was sufficient, transaction can be resubmitted (SEP08PostActionDone)
- follow_next_url: Further action required, user must visit next_url in browser (SEP08PostActionNextUrl)
This class provides a factory method to parse JSON responses and instantiate the appropriate concrete response class based on the result field.
HTTP Status Code: 200 for all valid responses
Tags
Table of Contents
Methods
- fromJson() : SEP08PostActionResponse
- Factory method to construct an action response object from JSON data.
Methods
fromJson()
Factory method to construct an action response object from JSON data.
public
static fromJson(array<string|int, mixed> $json) : SEP08PostActionResponse
Parses the JSON response after posting action fields and instantiates the appropriate concrete response class based on the 'result' field value.
Result Mapping:
- "no_further_action_required" -> SEP08PostActionDone
- "follow_next_url" -> SEP08PostActionNextUrl
Parameters
- $json : array<string|int, mixed>
-
Decoded JSON response from action URL
Tags
Return values
SEP08PostActionResponse —Concrete subclass instance based on result field