-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmoney.example.php
More file actions
241 lines (215 loc) · 7.71 KB
/
Copy pathmoney.example.php
File metadata and controls
241 lines (215 loc) · 7.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<?php
/**
* Red Jasmine Money 配置示例
*
* 此文件展示了各种常见场景的货币配置示例
*/
return [
/*
|--------------------------------------------------------------------------
| 默认货币
|--------------------------------------------------------------------------
*/
'default_currency' => env('MONEY_DEFAULT_CURRENCY', 'CNY'),
/*
|--------------------------------------------------------------------------
| 货币配置
|--------------------------------------------------------------------------
*/
'currencies' => [
/*
|--------------------------------------------------------------------------
| ISO 标准货币配置示例
|--------------------------------------------------------------------------
*/
// 方式一:指定具体货币(推荐,性能更好)
'iso' => [
'CNY', // 人民币
'USD', // 美元
'EUR', // 欧元
'GBP', // 英镑
'JPY', // 日元
'HKD', // 港币
'TWD', // 台币
'KRW', // 韩元
'SGD', // 新加坡元
'AUD', // 澳元
'CAD', // 加元
],
// 方式二:支持所有 ISO 货币(慎用,可能影响性能)
// 'iso' => 'all',
/*
|--------------------------------------------------------------------------
| 比特币货币
|--------------------------------------------------------------------------
*/
'bitcoin' => false,
// 'bitcoin' => true, // 启用比特币支持(XBT)
/*
|--------------------------------------------------------------------------
| 自定义货币配置示例
|--------------------------------------------------------------------------
*/
'custom' => [
/*
|----------------------------------------------------------------------
| 积分系统
|----------------------------------------------------------------------
*/
'POINTS' => [
'name' => '积分',
'code' => 'POINTS',
'subunit' => 0, // 积分通常没有小数
'numeric_code' => 999,
],
'BONUS' => [
'name' => '奖励积分',
'code' => 'BONUS',
'subunit' => 0,
'numeric_code' => 998,
],
/*
|----------------------------------------------------------------------
| 游戏货币
|----------------------------------------------------------------------
*/
'GOLD' => [
'name' => '金币',
'code' => 'GOLD',
'subunit' => 0,
'numeric_code' => 997,
],
'DIAMOND' => [
'name' => '钻石',
'code' => 'DIAMOND',
'subunit' => 0,
'numeric_code' => 996,
],
'SILVER' => [
'name' => '银币',
'code' => 'SILVER',
'subunit' => 0,
'numeric_code' => 995,
],
/*
|----------------------------------------------------------------------
| 电商平台虚拟货币
|----------------------------------------------------------------------
*/
'VOUCHER' => [
'name' => '代金券',
'code' => 'VOUCHER',
'subunit' => 2, // 代金券可能有小数
'numeric_code' => 994,
],
'COUPON' => [
'name' => '优惠券',
'code' => 'COUPON',
'subunit' => 2,
'numeric_code' => 993,
],
'CREDIT' => [
'name' => '店铺信用',
'code' => 'CREDIT',
'subunit' => 2,
'numeric_code' => 992,
],
/*
|----------------------------------------------------------------------
| 会员系统
|----------------------------------------------------------------------
*/
'MEMBER_POINTS' => [
'name' => '会员积分',
'code' => 'MEMBER_POINTS',
'subunit' => 0,
'numeric_code' => 991,
],
'VIP_POINTS' => [
'name' => 'VIP积分',
'code' => 'VIP_POINTS',
'subunit' => 0,
'numeric_code' => 990,
],
/*
|----------------------------------------------------------------------
| 能源/资源型虚拟货币
|----------------------------------------------------------------------
*/
'ENERGY' => [
'name' => '能量',
'code' => 'ENERGY',
'subunit' => 0,
'numeric_code' => 989,
],
'MANA' => [
'name' => '魔法值',
'code' => 'MANA',
'subunit' => 0,
'numeric_code' => 988,
],
/*
|----------------------------------------------------------------------
| 社交平台虚拟货币
|----------------------------------------------------------------------
*/
'LIKE' => [
'name' => '点赞',
'code' => 'LIKE',
'subunit' => 0,
'numeric_code' => 987,
],
'COIN' => [
'name' => '平台币',
'code' => 'COIN',
'subunit' => 2, // 平台币可能支持小数充值
'numeric_code' => 986,
],
/*
|----------------------------------------------------------------------
| 教育平台虚拟货币
|----------------------------------------------------------------------
*/
'STUDY_POINTS' => [
'name' => '学习积分',
'code' => 'STUDY_POINTS',
'subunit' => 0,
'numeric_code' => 985,
],
'KNOWLEDGE' => [
'name' => '知识币',
'code' => 'KNOWLEDGE',
'subunit' => 0,
'numeric_code' => 984,
],
/*
|----------------------------------------------------------------------
| 区块链/加密货币(示例,实际使用需谨慎)
|----------------------------------------------------------------------
*/
// 'USDT' => [
// 'name' => 'Tether',
// 'code' => 'USDT',
// 'subunit' => 6, // USDT 通常精确到 6 位小数
// 'numeric_code' => 983,
// ],
// 'ETH' => [
// 'name' => 'Ethereum',
// 'code' => 'ETH',
// 'subunit' => 18, // ETH 精确到 18 位小数(wei)
// 'numeric_code' => 982,
// ],
/*
|----------------------------------------------------------------------
| 企业内部货币
|----------------------------------------------------------------------
*/
// 'INTERNAL' => [
// 'name' => '内部结算币',
// 'code' => 'INTERNAL',
// 'subunit' => 2,
// 'numeric_code' => 981,
// ],
],
],
];