hackware/hawese-wallet 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hackware/hawese-wallet

Composer 安装命令:

composer require hackware/hawese-wallet

包简介

Digital wallet for Hawese.

README 文档

README

Overview

Digital wallet that associates transactions and balance to unique users.

Main goals

  • Add and subtract transactions
  • Lookup balance
  • Support any number of currencies (incluiding company's own currencies)
  • Transactions history

Generic requirements

  • Amounts must allow decimals
  • Use arbitrary precision (BCMath PHP)

User stories

  • As consumer I want to create a wallet so I can perform further transactions with the same uid. I should be able add an initial amount in any currency of money and this amount could be negative. Independent of which currency I'm using the transaction values should be reasonably consistent on different days.
  • As consumer I want to transact money by adding or subtracting balance from an existing wallet so a backer can pay for the services he consumes. Account balance must be consistent with the amount entered within transactions, even after a currency rate has changed. Negative amount transactions must include an expiration date if balance becomes negative after adding it.
  • As consumer I want to lookup for current state of a wallet so I can know how much money a backer has available.
  • As consumer I want to lookup for the current state of all wallets so I can have a general view.
  • As consumer I want to lookup for the transactions history of a wallet so I can know how I've reached the current account balance of a wallet. Should be ordered by descending datetime.
  • As consumer I want to filter by start and/or end time of transactions so I can be more granular on my transactions history lookup.
  • As consumer I want to optionally include the currency object of transactions history list, so I don't need to look it up with other request.
  • As consumer I want to list all existing currencies, so I can know which ones are available.
  • As consumer I want to lookup at the current rate of a currency so I can display that information to users.
  • As consumer I want to convert currency rates so I can perform operations based on this information.
  • As consumer I want to send a notification email to the backer when a transaction is performed so he can have immediate feedback. A payment link must be included if account balance becomes negative. Must include due date and default to the absolute value of account balance.

Database tables

  • currencies: id*, code (char 3), rate (decimal), step (decimal), created_at
  • wallets: uid* (string 100), currency_code (fk char 3), balance (decimal), created_at, updated_at, deleted_at
  • transactions: id*, wallet_uid (fk sting 100), currency_id (fk char 3), amount (decimal), type (string 100), description (string 255), detail (text), due_at (datetime), created_at, updated_at

Run it

Requirements

Installation

composer require hackware/hawese-wallet

Environment variables

  • WALLET_TRANSACTION_TYPES are used to identify the origin of a transaction, it's a comma separated string of choices for Transaction::$type. By default only system is defined. Required.
  • WALLET_DUE_AFTER a valid DateInterval::createFromDateString() string which defines the Transaction::$due_at date if a Wallet has negative balance. Defaults to 1 month.
  • WALLET_SOURCE_URL is the place where to download the source code of your version of this project. Required.
  • WALLET_ADD_FUNDS_URL Link to send with transaction notifications, which allows users to add new funds. Currently coupled to userland config, as will attach an auth_token query param (not more coupled than this). Required.
  • WALLET_REMIND_DUE valid DateInterval::createFromDateString() comma separated string for sending remainders of due transactions X days previous to due date. Defaults to 1 day, 2 days, 3 days, 1 week.

Copyright and licensing

Copyright 2019 Hackware SpA.

This project is licensed under the GNU Affero General Public License v3 or any later version.

How to comply with license terms?

To comply with license terms you must provide the means to access the source code of your version of the software easily and free of charge to any person that has access to the software, even users which access through a network (i.e. web browser). I've provided an easy way to accomplish this requirement by setting the WALLET_SOURCE_URL environment variable, this will show the link on the index page (/) under the JSON links.wallet_sourcecode property.

Any modification or inclusion of this source code will inherit the same license, that is, it can't be sublicensed. But since it's a REST API you can consume it with any other software. That means that this software must always respect users freedom, even if the HTTP API is consumed by a privative one.

Other licensing options

If you want to use the software but are afraid of or can't comply with the license terms we can arrange other license terms for your case. Though most probably I'll not accept if you don't provide your modifications to the software back.

hackware/hawese-wallet 适用场景与选型建议

hackware/hawese-wallet 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 27 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 07 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「wallet」 「lumen」 「hawese」 「hackware」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 hackware/hawese-wallet 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 hackware/hawese-wallet 我们能提供哪些服务?
定制开发 / 二次开发

基于 hackware/hawese-wallet 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 27
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2019-07-07