{"state": 0,
"result": {
"uuid": "f1386fb5-ecfa-41d4-a85d-b151d98df5e1",
"order_id": "test-28",
"amount": "10.00000000",
"payment_amount": "11.95000000",
"payer_amount": "10.00000000",
"payer_currency": "USDT",
"currency": "USDT",
"comments": null,
"network": "tron_trc20",
"address": null,
"from": null,
"txid": null,
"payment_status": "refund_process",
"url": "https://pay.cryptomus.com/pay/f1386fb5-ecfa-41d4-a85d-b151d98df5e1",
"expired_at": 1655196355,
"status": "check",
"is_final": false,
"additional_data": null,
"currencies": [
{
"currency": "USDT",
"network": "tron_trc20"
},
{
"currency": "USDT",
"network": "eth_erc20"
}
]
}
}
<?php
// JSON-строка
$json_str = '{"state": 0,
"result": {
"uuid": "f1386fb5-ecfa-41d4-a85d-b151d98df5e1",
"order_id": "test-28",
"amount": "10.00000000",
"payment_amount": "11.95000000",
"payer_amount": "10.00000000",
"payer_currency": "USDT",
"currency": "USDT",
"comments": null,
"network": "tron_trc20",
"address": null,
"from": null,
"txid": null,
"payment_status": "refund_process",
"url": "https://pay.cryptomus.com/pay/f1386fb5-ecfa-41d4-a85d-b151d98df5e1",
"expired_at": 1655196355,
"status": "check",
"is_final": false,
"additional_data": null,
"currencies": [
{
"currency": "USDT",
"network": "tron_trc20"
},
{
"currency": "USDT",
"network": "eth_erc20"
}
]
}
}';
// преобразуем JSON-строку в объект
$obj = json_decode($json_str);
// получаем значение свойства url
$url = $obj->result->url;
// выводим url на страницу
echo $url;
$json = '{"state": 0, "result": {"uuid": "f1386fb5-ecfa-41d4-a85d-b151d98df5e1", "order_id": "test-28", "amount": "10.00000000", "payment_amount": "11.95000000", "payer_amount": "10.00000000", "payer_currency": "USDT", "currency": "USDT", "comments": null, "network": "tron_trc20", "address": null, "from": null, "txid": null, "payment_status": "refund_process", "url": "https://pay.cryptomus.com/pay/f1386fb5-ecfa-41d4-a85d-b151d98df5e1", "expired_at": 1655196355, "status": "check", "is_final": false, "additional_data": null, "currencies": [{"currency": "USDT", "network": "tron_trc20"}, {"currency": "USDT", "network": "eth_erc20"}]}}';
$obj = json_decode($json);
$url = $obj->result->url;
echo $url;
echo $url;