Elytrium / Elling

Elytrium Billing: Module-based billing platform made with Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elytrium

In development

Elling - Elytrium Billing

Join our Discord

Module-based billing platform made with Go
The main idea of this product - make a stable billing platform for high-loads
This is only the back-end side of the API! Check out elling-app for the front-end.

Module system

Elling - module-based billing. You can create your own module, just export your module to the variable Module in your Go plugin

type Module interface {
    OnInit()
    GetName() string
    OnRegisterMethods() map[string]routing.Method
    OnDBMigration() []interface{}
    OnSmallTick()
    OnBigTick()
}

See more

  • elling-npd: Payments module for self-employed people

Basic modules

Basic modules - really simple modules, you can configure them editing their .yml files

  • basic/oauth: Module for OAuth authorization support
    • Create the folder with name "oauth"
    • Create the .yml file there
    • Fill it (example):
    • display-name: Discord
      name: discord
      oauth-gen-request: "https://discord.com/api/oauth2/authorize?client_id=793481663077548032&redirect_uri=https%3A%2F%2Fsrv.cool%2Finternal%2Foauth&response_type=code&scope=identify"
      need-verify: true
      verify-request:
        url: https://discord.com/api/oauth2/token
        method: POST
        headers:
          Content-Type: application/x-www-form-urlencoded
        data: "client_id=793481663077548032&client_secret=whoopsy&grant_type=authorization_code&code={token}&redirect_uri=https%3A%2F%2Fsrv.cool%2Finternal%2Foauth"
        response-type: JSON
        response-value-path:
        - access_token
      get-data-request:
        url: https://discord.com/api/oauth2/@me
        method: GET
        headers:
          Authorization: Bearer {token}
        response-type: JSON
        response-value-path:
        - user.username
        - user.id
  • basic/topup: Simple top-up module
    • Create the folder with name "topup"
    • Create the .yml file there
    • Fill it (example):
    • name: hevav-pay
      display-name: hevav.pay 
      account-limit: 10
      ttl: 3600000
      pay-string: https://hevav.dev/pay/{topUpId}
      create-request:
        url: https://hevav.dev/pay
        method: PUT
        headers: 
          Authorization: Bearer 1234567890
        data: id={topUpID}&amount={amount}&user[name]={user_name}&user[id]={balance_id}&expiryDate={date}
        response-type: NONE
      check-request:
        url: https://hevav.dev/payverify
        method: POST
        headers: 
          Authorization: Bearer 1234567890
        data: id={topUpID}&amount={amount}&user[name]={user_name}&user[id]={balance_id}&expiryDate={date}
        response-type: PLAIN
      check-request-success-string: OK
      reject-request:
        url: https://hevav.dev/pay/{topUpId}
        method: DELETE
        headers: 
          Authorization: Bearer 1234567890
        data: id={topUpID}
        response-type: NONE

Donation

Your donations are really appreciated. Donations wallets/links/cards:

  • MasterCard Debit Card (Tinkoff Bank): 5536 9140 0599 1975
  • Qiwi Wallet: PFORG or this link
  • YooMoney Wallet: 4100 1721 8467 044 or this link
  • PayPal: ogurec332@mail.ru

About

Elytrium Billing: Module-based billing platform made with Go

License:GNU Affero General Public License v3.0


Languages

Language:Go 98.9%Language:Shell 1.1%