refactored orchestrator and callbacks service to use pkg messsaging + envelope factory / handler
This commit is contained in:
29
api/pkg/model/payment_orchestrator_status.go
Normal file
29
api/pkg/model/payment_orchestrator_status.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
PaymentStatusUpdatedType = "payment.status.updated"
|
||||
)
|
||||
|
||||
type PaymentStatusUpdated struct {
|
||||
EventID string `json:"event_id,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
ClientID string `json:"client_id,omitempty"`
|
||||
OccurredAt time.Time `json:"occurred_at,omitempty"`
|
||||
PublishedAt time.Time `json:"published_at,omitempty"`
|
||||
Data PaymentStatusUpdatedData `json:"data"`
|
||||
}
|
||||
|
||||
type PaymentStatusUpdatedData struct {
|
||||
OrganizationRef string `json:"organization_ref,omitempty"`
|
||||
PaymentRef string `json:"payment_ref,omitempty"`
|
||||
QuotationRef string `json:"quotation_ref,omitempty"`
|
||||
ClientPaymentRef string `json:"client_payment_ref,omitempty"`
|
||||
IdempotencyKey string `json:"idempotency_key,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
PreviousState string `json:"previous_state,omitempty"`
|
||||
Version uint64 `json:"version,omitempty"`
|
||||
IsTerminal bool `json:"is_terminal"`
|
||||
Event string `json:"event,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user