All Projects → paysuper → Paysuper Billing Server

paysuper / Paysuper Billing Server

Licence: gpl-3.0
A core monolith-like service with all payment processing business logic in PaySuper.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Paysuper Billing Server

S
a go web freamwork for micro service, very very easy to create and deploy, with auto service registry and discover, high performance and based on http/2 no ssl
Stars: ✭ 67 (-29.47%)
Mutual labels:  microservice, service, go-micro
Go Grpc
A simpler grpc framework
Stars: ✭ 133 (+40%)
Mutual labels:  microservice, go-micro
Confluence
Torrent client as a HTTP service
Stars: ✭ 126 (+32.63%)
Mutual labels:  microservice, service
Go Os
Stars: ✭ 185 (+94.74%)
Mutual labels:  microservice, go-micro
Go Shopping
A sample suite of services built on the go-micro framework
Stars: ✭ 98 (+3.16%)
Mutual labels:  microservice, go-micro
Cinema
使用 go-micro 微服务框架开发的电影院订票系统
Stars: ✭ 140 (+47.37%)
Mutual labels:  microservice, go-micro
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (+54.74%)
Mutual labels:  microservice, go-micro
Typescript Rest
This is a lightweight annotation-based expressjs extension for typescript.
Stars: ✭ 458 (+382.11%)
Mutual labels:  microservice, service
laracom
laracom driven by go micro services
Stars: ✭ 37 (-61.05%)
Mutual labels:  microservice, go-micro
comrade-dev
Comrade is a job scheduler&manager service.
Stars: ✭ 69 (-27.37%)
Mutual labels:  microservice, service
HiveMind
HiveMind is a project management and ERP application for services organizations. It features project/task management, request tracking, time tracking, expenses, invoices/payments, general ledger, and content management (wiki). HiveMind is based on Moqui Framework, Mantle Business Artifacts, and Simple Screens.
Stars: ✭ 40 (-57.89%)
Mutual labels:  service, billing
Besticon
Favicon service written in Go
Stars: ✭ 472 (+396.84%)
Mutual labels:  microservice, service
Remit
RabbitMQ-backed microservices supporting RPC, pubsub, automatic service discovery and scaling with no code changes.
Stars: ✭ 24 (-74.74%)
Mutual labels:  microservice, service
Kaufmann ex
Kafka backed service library.
Stars: ✭ 86 (-9.47%)
Mutual labels:  microservice
Febs Cloud
基于Spring Cloud Hoxton.RELEASE、Spring Cloud OAuth2 & Spring Cloud Alibaba & Element 微服务权限系统,开箱即用。预览地址:https://cloud.mrbird.cn
Stars: ✭ 1,295 (+1263.16%)
Mutual labels:  microservice
Loopback4 Example Microservices
Deprecated - please use https://github.com/strongloop/loopback4-example-shopping/tree/master/kubernetes
Stars: ✭ 84 (-11.58%)
Mutual labels:  microservice
Rabbitevents
Nuwber's events provide a simple observer implementation, allowing you to listen for various events that occur in your current and another application. For example, if you need to react to some event published from another API.
Stars: ✭ 84 (-11.58%)
Mutual labels:  microservice
Sentinel Cpp
C++ implementation of Sentinel
Stars: ✭ 91 (-4.21%)
Mutual labels:  microservice
Podinfo
Go microservice template for Kubernetes
Stars: ✭ 1,287 (+1254.74%)
Mutual labels:  microservice
Solid Email Microservice
Learn the SOLID design principles by building a robust email microservice
Stars: ✭ 84 (-11.58%)
Mutual labels:  microservice

PaySuper Billing Server

License: GPL v3 contributions welcome Build Status codecov Go Report Card

PaySuper is a unique, simple payment toolkit designed to make developers self-reliant. It’s an open-source payment service with a highly customizable payment form, an intuitive API, and comprehensible, eye-catching reports.

Billing Server is a core and heart of all PaySuper for a payment processing business logic. It is designed to be mediator micro-service for Management API covering all REST API for based interfaces for Dashboard and Payment Form. PaySuper Management API is documented in the API Reference.

Learn more about a payments flow and PaySuper Checkout integration.

PaySuper Service Architecture
Checkout integration. PaySuper JS SDK is designed to integrate a Checkout Form on a merchant's website or a game client.
💵 Frontend for a payment form. PaySuper Payment Form is a frontend for a single-page application with a payment form.
📊 Frontend for a merchant. PaySuper Dashboard is the BFF server and frontend to interact with all PaySuper related features for merchants.
🔧 Payment Form API Backend. PaySuper Checkout is a REST API backend for PaySuper Payment Form and a billing processing such as purchase receipts and others. Public API methods are documented in the API Reference.
🔧 Billing API Backend. PaySuper Management API is a REST API backend for PaySuper Dashboard and other management API methods. Public API methods are documented in the API Reference.
💳 Payment processing. PaySuper Billing Server is a micro-service that provides with any payment processing business logic.

Features

  • Support for the payment tokens for the order and user data.

  • PaySuper can securely store your customer’s billing address and the payment method data to prefill the Checkout Form with. The customer has to agree for this to happen.

  • VAT/Sales tax have a clear and automatic calculation.

  • Payment Link feature.

  • Detailed statistics for each transaction.

  • Transparent payout calculation.

  • Recurring invoices (work is in progress).

Table of Contents

Getting Started

Billing Server is designed to be cloud agnostic application. In general we use Kubernetes based installation to launch PaySuper in a dev environment cloud and AWS for production.

Architecture

Schema of the architecture

Developing

Branches

We use the GitFlow as a branching model for Git.

Docker deployment

docker build -f Dockerfile -t paysuper_billing_service

docker run -d -e "MONGO_DSN=mongodb://127.0.0.1:27017/billing_repository" -e "CACHE_PROJECT_PAYMENT_METHOD_TIMEOUT=600" paysuper_billing_service

Starting the application

Billing Server application can be started in 2 modes:

  • as microservice, to maintain rates requests from other components of system. This mode does not requests any rates
  • as console app, to run the tasks, that passed as command line argument

Console mode can be used with cron schedule.

To start app in console mode you must set -task flag in command line to one of these values:

  • vat_reports - to update vat reports data. This task must be run every day, at the end of day.
  • royalty_reports - to build royalty reports for merchants. This task must be run once on a week.
  • royalty_reports_accept - to auto-accept toyalty reports. This task must be run daily.
  • rebuild_accounting_entries - to rebuild accounting entries and order view for passed orderid. Full command looks like, for example, -task=rebuild_accounting_entries -orderid=5f0d19a5eb851d9ee7935ffa -force=true where -orderid is id of order, and -force is flag to delete old accounting entries (if exists) and create new ones.

Notice: for vat-reports task you may pass an report date (from past only!) for that you need get an report. Date passed as date parameter, in YYYY-MM-DD format

Example: $ paysuper-billing-server.exe -task=vat_reports -date="2018-12-31" runs VAT reports calculation for last day of December, 2018.

To run application as microservice simply don't pass any flags to command line :)

Environment variables

Name Description
MONGO_DSN MongoDB DSN connection string
MONGO_DIAL_TIMEOUT MongoDB dial timeout in seconds
PSP_ACCOUNTING_CURRENCY PaySuper accounting currency
METRICS_PORT HTTP server port for a health and metrics request
CENTRIFUGO_SECRET Centrifugo secret key
CENTRIFUGO_API_SECRET Centrifugo API secret key
BROKER_ADDRESS RabbitMQ URL address
CARD_PAY_API_URL CardPay API URL to process payments, more in documentation
CACHE_REDIS_ADDRESS A seed list of host:port addresses of cluster nodes
CACHE_REDIS_PASSWORD Password for a connection string
CACHE_REDIS_POOL_SIZE PoolSize applies per cluster node and not for the whole cluster
CACHE_REDIS_MAX_RETRIES Maximum retries for connection
CACHE_REDIS_MAX_REDIRECTS The maximum number of retries before giving up
CACHE_REDIS_VERSION Version of cache (if you need to flush all cache)
CUSTOMER_COOKIE_PUBLIC_KEY Base64 encoded RSA public key - used for encrypting customer browser cookies content. Minimal length of RSA public key must be 4096
CUSTOMER_COOKIE_PRIVATE_KEY Base64 encoded RSA private key - used for decrypting customer browser cookies content. Minimal length of RSA private key must be 4096
REDIS_HOST Redis server host
REDIS_PASSWORD Password to access to Redis server
CENTRIFUGO_MERCHANT_CHANNEL Centrifugo channel name to send notifications to merchant
CENTRIFUGO_FINANCIER_CHANNEL Centrifugo channel name to send notifications to financier
EMAIL_NOTIFICATION_FINANCIER_RECIPIENT Email of financier, to get VAT reports notification
EMAIL_CONFIRM_URL URL to use in a template of the confirmation email
EMAIL_CONFIRM_TEMPLATE Confirmation email template name
EMAIL_NEW_ROYALTY_REPORT_TEMPLATE New royalty report notification email template name
EMAIL_UPDATE_ROYALTY_REPORT_TEMPLATE Royalty report update notification email template name
EMAIL_VAT_REPORT_TEMPLATE New VAT report notification email template name
EMAIL_NEW_PAYOUT_TEMPLATE New payout notification email template name
HELLO_SIGN_DEFAULT_TEMPLATE License agreement template identifier in HelloSign
HELLO_SIGN_AGREEMENT_CLIENT_ID Client application identifier in HelloSign for a Merchant Agreement sign
KEY_DAEMON_RESTART_INTERVAL Starting frequency in seconds of the script to check the locked keys and return them to the stack
EMAIL_ACTIVATION_CODE_TEMPLATE Postmark Email template ID for sending to user with an activation code
PAYLINK_MIN_PRODUCTS Minimum number of products allowed for one payment link (must be >= 1)
PAYLINK_MAX_PRODUCTS Maximum number of products allowed for one payment link
EMAIL_MERCHANT_NEW_ONBOARDING_REQUEST_TEMPLATE New onboarding request letter to a merchant template
EMAIL_ADMIN_NEW_ONBOARDING_REQUEST_TEMPLATE New onboarding request letter to an admin template
EMAIL_MERCHANT_ONBOARDING_REQUEST_COMPLETE_TEMPLATE Onboarding request completed letter to a merchant template
EMAIL_ONBOARDING_ADMIN_RECIPIENT Email of onboarding administrator
MIGRATIONS_LOCK_TIMEOUT Timeout for processing DB migrations on the app start
USER_INVITE_TOKEN_SECRET Secret key for generation invitation token of user
USER_INVITE_TOKEN_TIMEOUT Timeout in hours for lifetime of invitation token of user
DASHBOARD_URL URL of dashboard for generating links in notifications

Contributing, Support, Feature Requests

If you like this project then you can put a ⭐️ on it. It means a lot to us.

If you have an idea of how to improve PaySuper (or any of the product parts) or have general feedback, you're welcome to submit a feature request.

Chances are, you like what we have already but you may require a custom integration, a special license or something else big and specific to your needs. We're generally open to such conversations.

If you have a question and can't find the answer yourself, you can raise an issue and describe what exactly you're trying to do. We'll do our best to reply in a meaningful time.

We feel that a welcoming community is important and we ask that you follow PaySuper's Open Source Code of Conduct in all interactions with the community.

PaySuper welcomes contributions from anyone and everyone. Please refer to our contribution guide to learn more.

License

The project is available as open source under the terms of the GPL v3 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].