-
Notifications
You must be signed in to change notification settings - Fork 30
feat: added order api request and response structs #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
types/order_types.go
Outdated
| type OrderRequest struct { | ||
| Amount int `json:"amount"` | ||
| Currency string `json:"currency"` | ||
| Receipt string `json:"receipt"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add all the request/resp params specified in docs as well?
https://razorpay.com/docs/api/orders/create
so, let's add first_payment_min_amount and partial_payment as well here.
types/order_types.go
Outdated
| package types | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add these definitions in the resources/order.go file itself but probably at the top of the file.
requests/request.go
Outdated
| // Call makes an HTTP request to the Razorpay API | ||
| func (request *Request) Call(method, path string, params interface{}, result interface{}) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's have separate fields for params and payload. POST can have both params and payload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call(method, path string, payload any, params interface{}, result interface{})
feat: add api request and response structs
OrderRequestandOrderResponsestruct forcreate order&fetching order by id