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.
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()
}
- elling-npd: Payments module for self-employed people
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
Your donations are really appreciated. Donations wallets/links/cards: