martianatwork/roowallet 问题修复 & 功能扩展

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

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

martianatwork/roowallet

Composer 安装命令:

composer require martianatwork/roowallet

包简介

Digital Wallet for Laravel

README 文档

README

Wallet Package for Laravel that allows you to maintain credits for your users.

It supports multiple currencies and you can add your own curriences too. Fork of:

composer require patosmack/roowallet

Version 1.1

Installation

To install the package, include the following in your composer.json.

composer require martianatwork/roowallet

And then include the following service provider in your app.php.

martianatwork\RooWallet\Providers\RooWalletServiceProvider::class,

Also add Alias.

'RooWallet' => martianatwork\RooWallet\Facades\RooWallet::class,

Lastly, publish the config.

php artisan vendor:publish --provider="martianatwork\RooWallet\Providers\RooWalletServiceProvider"

NOTE: Remove database Migrations Files before publising

  • create_wallet_currencies_table.php
  • create_wallets_table.php
  • create_wallet_transactions_table.php

Methods

Currency

getCurrencyList()
  • Response: Currency iso Array
getCurrency($iso)
  • Response: WalletCurrency Model or null
addCurrency($iso, $name, $symbol, $conversion_rate, $enabled = 0)
  • Response: True or False
updateCurrency($iso, $name, $symbol, $conversion_rate, $enabled = 0)
  • Response: True or False

Wallet

getWallet($user_id,$currency_iso)
  • Response: Wallet Model or null
createWallet($user_id, $currency_iso)
  • Response: True or False

Transaction

getTransactions($user_id,$currency_iso)
  • Response: WalletTransaction Model or array()
funds($user_id,$currency_iso)
  • Response: User balance -> decimal(13, 4)
deposit($user_id,$currency_iso, $amount, $refence_id = null, $reference_description = null, $token = '')
  • Response: True or False
canWithdraw($user_id,$currency_iso, $amount)
  • Response: True or False
withdraw($user_id,$currency_iso, $amount, $refence_id = null, $reference_description = null, $token = '')
  • Response: True or False
getCredits($user_id,$currency_iso)
  • Response: decimal(13, 4)
getDebits($user_id,$currency_iso)
  • Response: decimal(13, 4)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-11-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固