Тестовая транзакция DOGECOIN
Для совершения сделки в DOGECOIN
На моем сайте я интегрировал API DOGECOIN с https://www.dogeapi.com/. Когда пользователь нажимает на виджет оформления заказа, он перенаправляется на страницу DOGECOIN
API и здесь мне нужно вставить ПИН-код (УНИКАЛЬНЫЙ ПИН-код учетной записи), который вставляется при регистрации на https://www.dogeapi.com/.
ПРОБЛЕМА. Проблема в том, что для завершения транзакции нам нужны настоящие монеты дожей, но как разработчику мы всегда должны сначала выполнить тестовую транзакцию, поэтому мой вопрос заключается в том, как получить среду TEST для DOGECOI
ТЕСТОВАЯ СДЕЛКА?
Я знаю, что DOGECOIN вводится незадолго до какого-то месяца, и там не так много вещей, чтобы использовать его. Если у кого-то из вас есть такой опыт, чтобы справиться с этим, чем, пожалуйста, помогите мне.
ИНТЕГРАЦИОННЫЙ КОД:
<?php
//set to your API_KEY
$api_key = '************************';
//set this to your users id
//for this example we will make it 22
//must be alphanumeric only
$user_id = '22';
//set this to the amount the item costs
$amount_doge = '1000';
//send a request to the API to make a new payment address
//put info about the request in
$response = file_get_contents("https://www.dogeapi.com/wow/?api_key=$api_key&a=get_new_address&address_label=$user_id");
if($response !== 'Bad Query' && $response !== '') {
$new_address = json_decode($response);
//give them the address or echo a widget here
?>
<script src='https://www.dogeapi.com/widget/dogeapi.js' type='text/javascript'></script>
<div class='doge-widget-wrapper'>
<form method='get' action='https://www.dogeapi.com/checkout'>
<input type='hidden' name='widget_type' value='pay'>
<input type='hidden' name='widget_key' value='ugkzdu62opc8qlb3e41u5kthq'>
<input type='hidden' name='new_address' value='<?php echo $new_address ?>'>
<input type='hidden' name='amount_usd' value='10'>
<div class='doge-widget' style='display:none;'></div>
</form>
</div>
<?php
//for this example we will just echo an address
echo "Please pay $amount_doge DOGE to $new_address to receive your item. It may take up to 10 minutes to confirm your payment.";
//header("Location: post-payment.php");
} else {
echo 'There was a problem processing your order.';
}
?>
Я прикрепил изображение страницы после оформления заказа.