diff --git a/examples/stream-payments.php b/examples/stream-payments.php index 2449928..84137b5 100644 --- a/examples/stream-payments.php +++ b/examples/stream-payments.php @@ -3,16 +3,17 @@ require '../vendor/autoload.php'; use \ZuluCrypto\StellarSdk\Horizon\ApiClient; -use \ZuluCrypto\StellarSdk\Model\Payment; +use \ZuluCrypto\StellarSdk\Model\AssetTransferInterface; $client = ApiClient::newPublicClient(); -$client->streamPayments('now', function(Payment $payment) { - printf('[%s] %s from %s -> %s' . PHP_EOL, +$client->streamPayments('now', function(AssetTransferInterface $assetTransfer) { + printf('[%s] [%s] %s from %s -> %s' . PHP_EOL, (new \DateTime())->format('Y-m-d h:i:sa'), - $payment->getAmount(), - $payment->getFromAccountId(), - $payment->getToAccountId() + $assetTransfer->getAssetTransferType(), + $assetTransfer->getAssetAmount(), + $assetTransfer->getFromAccountId(), + $assetTransfer->getToAccountId() ); });