- big big refactor.
This commit is contained in:
23
platformapi/elmapi/order.go
Normal file
23
platformapi/elmapi/order.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package elmapi
|
||||
|
||||
const (
|
||||
OrderStatusPending = "pending"
|
||||
OrderStatusUnprocessed = "unprocessed"
|
||||
OrderStatusRefunding = "refunding"
|
||||
OrderStatusValid = "valid"
|
||||
OrderStatusInvalid = "invalid"
|
||||
OrderStatusSettled = "settled"
|
||||
)
|
||||
|
||||
func (a *API) GetOrder(orderID string) (map[string]interface{}, error) {
|
||||
result, err := a.AccessAPI("eleme.order.getOrder", map[string]interface{}{
|
||||
"orderId": orderID,
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
innerResult := result.Result.(map[string]interface{})
|
||||
return innerResult, nil
|
||||
}
|
||||
|
||||
return nil, err
|
||||
}
|
||||
Reference in New Issue
Block a user