Stellar PHP SDK API Documentation

SEP08PostActionResponse

AbstractYes

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
see
https://github.com/stellar/stellar-protocol/blob/v1.7.4/ecosystem/sep-0008.md#following-the-action-url

SEP-0008 v1.7.4 Action URL

https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0009.md

SEP-0009 Standard KYC/AML Fields

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
throws
SEP08InvalidPostActionResponse

If result field is missing, unknown, or required fields for the given result are missing

Return values
SEP08PostActionResponse —

Concrete subclass instance based on result field

On this page

Search results