Acceptance of payments from the card without jur. faces on Yandex.Money

Published on October 07, 2018

Acceptance of payments from the card without jur. faces on Yandex.Money

  • Tutorial

Open source yandex money donation service


Acceptance of payments on Yandex.Money nat. faces

  • online payments from a card, Yandex, phone
  • add a label to the payment
  • receiving and checking alerts to your server
  • Telegram bot subscription automation example

Implementation and description under the cut

Python project



Modules:


  • money.yandex.ru - a personal wallet to receive money
  • httpsserver - python server that generates payment pages and receives alerts from Yandex
  • billingservice - remote procedure that is called after receiving a notification about a payment, works with the base
  • redis-server - used as a queue server for remote procedure calls
  • example / telegrambot - an example of generating links to pay Telegram bot

Buttons to collect money


Yandex.Money has the ability to create buttons and forms for collecting money, in which you can embed your comments and payment tags.



Payment Notifications


In addition - it is possible to configure the receipt of payment notifications to your server.



Add payment acceptance


  1. Register, raise the status of the wallet to the nominal
  2. SETTINGS-> ALL REST-> HTTP NOTIFICATIONS
    • Add your domain and secret
    • Enable notifications
  3. We lifted redis-server , we entered access parameters in rq_access.py
  4. We get an SSL certificate for the domain, for example through letsencrypt
  5. We are raising the https server with its own parameters, do not forget about the firewall if the server is not available
  6. Register in httpsserver / .secret / ymsecret.py wallet id and secret for notifications from settings
  7. We rule httpserver-ympayment.service , we start the server under the supervisor
  8. On the machine with the base, rule billing.service and start the systemd for this service, the RQ worker will start
  9. We check remote start of procedures through queue Redis
  10. Based on example we add the generation of a payment link to your bot function.

An example of working in README
python-rq