7 Commits

Author SHA1 Message Date
zhl
476da08a8f 完善支付流程 2023-06-01 13:04:38 +08:00
zhl
5220dd2232 增加查询crypto兑换美元价格的接口 2023-05-26 14:04:52 +08:00
zhl
8d0a054a44 feat: Refactor Alchemy endpoint and headers
- Add `access-token` header and update API endpoint in `createOrder` function of Alchemy service
- Improve logging functionality in logger module
- Miscellaneous updates and fixes in Alchemy controller
- Overall improvements to code quality and maintainability
2023-03-27 21:36:03 +08:00
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
a9feeda7b9 增加alchemy支付的功能 2023-03-17 19:22:23 +08:00