38 Commits

Author SHA1 Message Date
zhl
94cdea34ca feat: Refactor Alchemy service to improve payment flow.
- Remove `callbackUrl` from `dataOrigin` object and add it to `dataSign` object in `beginPay` function in `alchemy.controller.ts`
- Improve typing of `dataSign` object in `beginPay` function in `alchemy.controller.ts`
- Add new `createOrder` function and functionality to send post request with token to merchant API in `alchemy.svr.ts`
- Update `ALCHEMY_PAY_CB_URL` in `.env.development` to point to a new domain
2023-03-27 15:30:27 +08:00
zhl
c3f81a825f feat: Refactor AlchemyController's callback function for usability and clarity.
- Add constant and callback URL to AlchemyController for Alchemy Pay
- Improve parameter validations and error handling in `alchemyCallback` function
- Remove unused variable `redirectUrl` in AlchemyController
- Update `.env.development` with Alchemy Pay callback URL
2023-03-27 14:19:37 +08:00
zhl
6ede0fd01a Add Alchemy server callback endpoint and PayRecord class
Add functionality to check pay result sign, create page sign, and refresh token
 Implement a new `POST /pay/alchemy/cb` endpoint in `alchemy.controller.ts`
 `alchemyCallback` method now checks `PayRecord` status and pay sign before changing status and returning empty body
- `ROLE_ANON` added to `alchemyCallback` method and import of `role` changed in `alchemy.controller.ts`
- `PayRecord.ts` added to modules with `PayRecord` class and payment property enums
2023-03-27 14:09:18 +08:00
zhl
26a27a837c refactor: Refactor role authorization to use constant in controllers
- Add `ROLE_ANON` constant for authorization to be used in multiple controllers
- Replace string constants with `process.env` variables for easier configuration
- Use `insertOrUpdate` method from `Account` module for user account creation and updates
- Remove unnecessary semicolons for improved code readability
- Add error handling to `checkFacebookJwt` function for missing or invalid data from Facebook API
2023-03-24 16:02:13 +08:00
zhl
96064ce215 fix: Refactor and standardize authentication check functions
- Improve data accuracy in checkGoogleJwt function
- Handle correct email data in apple login
2023-03-24 15:02:29 +08:00
zhl
a9feeda7b9 增加alchemy支付的功能 2023-03-17 19:22:23 +08:00
zhl
3aafc04f97 new:增加获取账号认证邮箱的借口 2023-03-17 13:57:50 +08:00
zhl
4c4879a06c 增加ejs模版, 用于渲染email验证结果 2023-03-15 16:49:34 +08:00
zhl
d39d4d3f10 将部分jwt第一部份相同的内容移除 2023-03-15 16:31:24 +08:00
zhl
6ff16cc4bf 增加email验证流程 2023-03-15 16:21:12 +08:00
zhl
a7c06558d0 将某个包移至dev dependencies 2023-03-15 13:18:55 +08:00
zhl
2b36cc865c change errcode for login expire 2023-03-14 16:41:02 +08:00
zhl
df085e9616 只有在测试环境才加上跨域组件 2023-03-02 15:59:30 +08:00
zhl
4258a7fd26 增加web端钱包登录相关接口 2023-03-02 11:56:48 +08:00
zhl
81ff8b5778 add facebook login api 2023-02-08 14:19:33 +08:00
zhl
a972435a8d simplify response of transaction records 2023-02-08 09:59:41 +08:00
zhl
5cb1322d80 增加对a.b类型的key的支持 2023-02-02 17:53:57 +08:00
zhl
a9c9012e32 修改历史记录的存储结构 2023-01-30 17:23:35 +08:00
zhl
7490b8012b 增加操作记录上的一些注释 2023-01-29 16:15:54 +08:00
zhl
7c9501d36e 交易记录增加开始和确认时间 2023-01-13 16:55:06 +08:00
zhl
57743fcb1c 交易记录增加gas和gasPrice 2023-01-13 14:20:29 +08:00
zhl
89ca63fd3f trans record add chain 2023-01-13 12:31:44 +08:00
zhl
f14a161384 change sth 2023-01-12 14:09:54 +08:00
zhl
f07bdcf575 tranrecord的save方法改为调用inertOrUpdate方法 2023-01-12 13:19:30 +08:00
zhl
9e8d14ba84 增加交易记录相关接口 2023-01-12 11:10:06 +08:00
cebgcontract
bf0e6c865a 增加tiktok登陆 2022-12-08 16:43:58 +08:00
cebgcontract
032e103c28 增加正式版的apple bundle id 2022-12-02 12:59:43 +08:00
cebgcontract
44d4a03431 增加sign with apple的验证 2022-11-28 17:34:28 +08:00
cebgcontract
1124ddb4fd 修改goolge oauth idtoken验证规则 2022-11-09 14:48:32 +08:00
cebgcontract
9eb50a3afd update confg 2022-10-28 10:54:04 +08:00
cebgcontract
98239bf324 update config 2022-10-28 10:43:01 +08:00
cebgcontract
56aa41ac67 add somt config 2022-10-28 10:32:09 +08:00
cebgcontract
cf3d451ebd 增加启动脚本 2022-10-26 14:38:04 +08:00
cebgcontract
b12565a346 调整项目结构 2022-10-25 15:33:11 +08:00
cebgcontract
7bebce5b7d 增加钱包信息相关接口 2022-10-25 15:27:17 +08:00
cebgcontract
ed9977cab8 add some code 2022-10-18 18:55:25 +08:00
cebgcontract
25637cac59 添加vscode运行脚本 2022-10-18 15:02:58 +08:00
cebgcontract
ac132ad2f0 project init 2022-10-18 15:00:38 +08:00