viettel-ffm #19

Merged
sinhluu merged 10 commits from viettel-ffm into master 2024-07-11 03:04:15 +00:00
Owner
No description provided.
sinhluu added 10 commits 2024-07-11 03:04:08 +00:00
1034d2e077 feat: refactor ViettelFFM partner API integration
- Add the `const.go` file defining `ENV` type and constants `EnvStaging` and `EnvProd`
- Update `go.mod` to use `go 1.20` instead of `go 1.17`
- Introduce `model.go` file for ViettelFFM partner API structs
- Implement client methods for creating outbound requests and updating logistics information
- Implement an authentication method for the client with `AuthRes` struct
- Define constants for base URLs and authentication paths in ViettelFFM client
- Implement helper methods for getting base URL and making HTTP requests via NATS
- Update `util/httputil/const.go` to include `HeaderKeyAuthorization` constant

Signed-off-by: Sinh <luuvansinh555@gmail.com>
178652fcef feat: refactor logistics functions in Viettel FFM module
- Add a new type `CancelORPayload` to the file `model.go`
- Add a new constant `pathCancelOR` in the `viettel_ffm.go` file
- Change the method from `POST` to `PUT` in the `UpdateORLogisticInfo` function in `viettel_ffm.go`
- Add a new function `CancelOR` in the `viettel_ffm.go` file

Signed-off-by: Sinh <luuvansinh555@gmail.com>
b7195b364f feat: refactor webhook handling for ViettelFFM partner API
- Add structs `Webhook`, `WebhookData` to handle webhook data in ViettelFFM partner API

Signed-off-by: Sinh <luuvansinh555@gmail.com>
sinhluu merged commit 91e69993af into master 2024-07-11 03:04:15 +00:00
sinhluu deleted branch viettel-ffm 2024-07-11 03:04:15 +00:00
Sign in to join this conversation.
No description provided.