diff options
author | miraikumiko <miraikumiko@disroot.org> | 2025-03-19 21:22:04 +0000 |
---|---|---|
committer | miraikumiko <miraikumiko@disroot.org> | 2025-03-19 21:22:04 +0000 |
commit | b1602675d3c9cd62bb0a7411027779af22cf101a (patch) | |
tree | 142fca58114d0ec71164fd58d617f69f600a03ca | |
parent | 495c56b087fa41440da7af160cfe5fd4170a5f76 (diff) | |
download | miraikumiko.com-b1602675d3c9cd62bb0a7411027779af22cf101a.tar.gz miraikumiko.com-b1602675d3c9cd62bb0a7411027779af22cf101a.tar.bz2 |
Added monero_payment_gateway.md
-rw-r--r-- | content/en/blog/monero_payment_gateway.md | 22 | ||||
-rw-r--r-- | content/es/blog/monero_payment_gateway.md | 22 | ||||
-rw-r--r-- | content/ru/blog/monero_payment_gateway.md | 22 |
3 files changed, 66 insertions, 0 deletions
diff --git a/content/en/blog/monero_payment_gateway.md b/content/en/blog/monero_payment_gateway.md new file mode 100644 index 0000000..dbae9f9 --- /dev/null +++ b/content/en/blog/monero_payment_gateway.md @@ -0,0 +1,22 @@ ++++ +title = "Your own Monero payment gateway" +description = "Creating your own anonymous payment gateway" +date = 2025-03-19 +tags = [ + "tech", + "guide", + "monero" +] ++++ + +Creating your own Monero payment gateway is very easy, here are the main steps: + +1. Run `monero-wallet-rpc --tx-notify "script.sh %s"`, where **%s** is **txid**, which will be automatically passed to your script as the first argument. Your script will be executed with each received transaction. + +2. When a buyer, for example in your online store, wants to pay for a product, the site should give him an address to which the money will be transferred. To do this, your web application must perform an RPC request [make_integrated_address](https://docs.getmonero.org/rpc-library/wallet-rpc/#make_integrated_address) to the daemon you launched to receive such an address **integrated_address** and **payment_id**. The address is given to the buyer, and the payment identifier is saved for future verification. + +3. After the money is transferred, your script from the first point will receive **txid** which must be passed to your web application. It will receive **payment_id** and **amount** using the RPC method [get_transfer_by_txid](https://docs.getmonero.org/rpc-library/wallet-rpc/#get_transfer_by_txid) — the identifier and amount of the payment. + +4. The application checks the payment ID and the received amount, which is measured in atomic units 1 XMR = 1e12 (atomic-units). Keep this in mind when comparing the amount, it is written at the beginning of the [documentation](https://docs.getmonero.org/rpc-library/wallet-rpc). + +Making one-time payments without an internal balance is very inconvenient, so it is best to create a user balance in the database on the site, which can be replenished at any time. diff --git a/content/es/blog/monero_payment_gateway.md b/content/es/blog/monero_payment_gateway.md new file mode 100644 index 0000000..c105b06 --- /dev/null +++ b/content/es/blog/monero_payment_gateway.md @@ -0,0 +1,22 @@ ++++ +title = "Propio sistema de pago Monero" +description = "Crea tu propio sistema de pago anónimo" +date = 2025-03-19 +tags = [ + "tech", + "guide", + "monero" +] ++++ + +Crear tu propio sistema de pago Monero es muy fácil, aquí tienes los pasos básicos: + +1. Ejecute `monero-wallet-rpc --tx-notify "script.sh %s"`, donde **%s** es el **txid** que se pasará automáticamente a su script como primer argumento. Su script se ejecutará con cada transacción recibida. + +2. Cuando un comprador, por ejemplo en tu tienda online, quiere pagar un producto, el sitio debe darle la dirección a la que se transferirá el dinero. Para hacer esto, su aplicación web debe realizar una solicitud RPC [make_integrated_address](https://docs.getmonero.org/rpc-library/wallet-rpc/#make_integrated_address) al demonio que está ejecutando para obtener la **integrated_address** y la dirección **payment_id**. La dirección se proporciona al comprador y el ID de pago se almacena para verificación futura. + +3. Después de transferir el dinero, su secuencia de comandos desde el primer punto recibirá **txid** que deberá pasar a su aplicación web. Usando el método RPC [get_transfer_by_txid](https://docs.getmonero.org/rpc-library/wallet-rpc/#get_transfer_by_txid) recibirá **payment_id** y **amount** — el identificador y el monto del pago. + +4. La aplicación verifica el ID de pago y el monto recibido, que se mide en unidades atómicas 1 XMR = 1e12 (unidades atómicas). Tenga esto en cuenta al comparar la cantidad, esto está escrito al comienzo de la [documentación](https://docs.getmonero.org/rpc-library/wallet-rpc). + +Realizar pagos únicos sin un saldo interno es muy inconveniente, por lo que es mejor crear un saldo de usuario en la base de datos del sitio, que se puede reponer en cualquier momento. diff --git a/content/ru/blog/monero_payment_gateway.md b/content/ru/blog/monero_payment_gateway.md new file mode 100644 index 0000000..a4b4abf --- /dev/null +++ b/content/ru/blog/monero_payment_gateway.md @@ -0,0 +1,22 @@ ++++ +title = "Своя платёжка Monero" +description = "Создание собственной анонимной платёжки" +date = 2025-03-19 +tags = [ + "tech", + "guide", + "monero" +] ++++ + +Создать собственную платёжную систему Monero очень легко, вот основные шаги: + +1. Запускайте `monero-wallet-rpc --tx-notify "script.sh %s"`, где **%s** — это **txid**, который автоматически будет передаваться вашему скрипту в качестве первого аргумента. Ваш скрипт будет отрабатывать с каждой полученной транзакцией. + +2. Когда покупатель, например в вашем интернет-магазине, хочет оплатить товар, сайт ему должен выдать адрес на который будут переводиться деньги. Для этого ваше веб-приложение должно выполнить RPC запрос [make_integrated_address](https://docs.getmonero.org/rpc-library/wallet-rpc/#make_integrated_address) к демону которого вы запустили для получения такого адреса **integrated_address** и **payment_id**. Адрес отдаётся покупателю, а идентификатор платежа сохраняется для будущей верификации. + +3. После того как деньги будут переведены, ваш скрипт из первого пункта получит **txid** который нужно передать вашему веб-приложению. Оно с помощью RPC метода [get_transfer_by_txid](https://docs.getmonero.org/rpc-library/wallet-rpc/#get_transfer_by_txid) получит **payment_id** и **amount** — идентификатор и сумму платежа. + +4. Приложение сверяет идентификатор платежа и полученную сумму, которая измеряется в атомных единицах 1 XMR = 1e12 (atomic-units). Имейте это ввиду при сравнении суммы, об этом написано в начале [документации](https://docs.getmonero.org/rpc-library/wallet-rpc). + +Делать одноразовые платежи без внутреннего баланса очень не удобно, поэтому на сайте лучше всего сделать пользовательский баланс в базе данных, который можно будет пополнить в любое время. |