SEP31RefundPayment
in package
Individual refund payment details within a cross-border payment refund.
This class represents a single refund payment transaction sent back to the Sending Anchor, including the Stellar transaction hash, refunded amount, and associated fee. Multiple refund payments may exist for a single transaction.
Refund Calculation:
- Net amount returned to sender: amount - fee
- Total refund amount: sum of all refund payments
- Fee is deducted from the refunded amount
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- fromJson() : SEP31RefundPayment
- Constructs a new instance of RefundPayment by using the given data.
Properties
$amount
public
string
$amount
$fee
public
string
$fee
$id
public
string
$id
Methods
__construct()
public
__construct(string $id, string $amount, string $fee) : mixed
Parameters
- $id : string
-
The Stellar transaction hash of the refund payment (not guaranteed to be unique).
- $amount : string
-
The amount sent back to the Sending Anchor, in units of amount_in_asset.
- $fee : string
-
The amount charged as a fee for processing the refund, in units of amount_in_asset.
fromJson()
Constructs a new instance of RefundPayment by using the given data.
public
static fromJson(array<string|int, mixed> $json) : SEP31RefundPayment
Parameters
- $json : array<string|int, mixed>
-
the data to construct the object from.
Return values
SEP31RefundPayment —the object containing the parsed data.