zhs007 / cc-payment

code challenge for payment services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cc-payment

Build Status

This is a coding challenge for payment.
You can start the unit test by executing startunittest.sh.
The unit test environment is in Dockerfile.unittest.

This project uses Gin, Protocol Buffers, and zap.
The database is mysql 5 .

The public structure definition uses Protocol Buffers, see proto/payment.proto.
The front end can use it.

The database script is in sql/ccpayment.sql.

You can build and deploy with Dockerfile.
You can build and deploy with builddocker.sh and startdocker.sh.
You need to configure cfg/config.yaml first.
We did not support https in the project, you can configure it in nginx.

About the numeric type of currency, we use int64 instead of floating point numbers.
For example, USD, 100 units means 1 US dollar.

There is no calculation fee for this version.

You can see the payment logic in model/paymentdb.go.

Payment API Document

About

code challenge for payment services

License:MIT License


Languages

Language:Go 97.4%Language:Dockerfile 1.6%Language:Shell 1.0%