@@ -23,6 +23,9 @@ type EventRepository interface {
2323 GetRegistrationEvent (ctx context.Context , orderNo string ) (data RegistrationEvent , err error )
2424 ListRegistration (ctx context.Context , filter EventFilter ) (tData int , data []RegistrationEvent , err error )
2525 ListEventPay (ctx context.Context , filter EventFilter ) (tData int , data []EventPay , err error )
26+ UpdateEventPay (ctx context.Context , event EventPay ) error
27+ GetEventPay (ctx context.Context , orderNo string ) (data EventPay , err error )
28+ UpdateRegistrationEvent (ctx context.Context , event RegistrationEvent ) error
2629}
2730
2831type EventUsecase interface {
@@ -34,6 +37,7 @@ type EventUsecase interface {
3437 RegistrationStatus (ctx context.Context , orderNo string ) (resp RegisterStatusResponse , err error )
3538 ListRegistration (ctx context.Context , filter EventFilter ) (resp []RegistrationEvent , pagination Pagination , err error )
3639 ListEventPay (ctx context.Context , filter EventFilter ) (data []EventPay , pagination Pagination , err error )
40+ PayProcess (ctx context.Context , payload PayProcessPayload ) error
3741}
3842
3943type EventHandler interface {
@@ -45,7 +49,7 @@ type EventHandler interface {
4549 RegistrationStatus (w http.ResponseWriter , r * http.Request )
4650 ListRegistration (w http.ResponseWriter , r * http.Request )
4751 ListEventPay (w http.ResponseWriter , r * http.Request )
48- // ApproveEventPay (w http.ResponseWriter, r *http.Request)
52+ PayProcess (w http.ResponseWriter , r * http.Request )
4953}
5054
5155type Event struct {
@@ -159,6 +163,7 @@ type EventPay struct {
159163 RegistrationEventID uint `json:"registration_event_id"`
160164 EventID uint `json:"event_id"`
161165 ImageProofPayment string `json:"image_proof_payment"`
166+ OrderNO string `json:"order_no"`
162167 NetAmount float64 `json:"net_amount"`
163168 Status string `json:"status"`
164169 RegistrationEvent RegistrationEvent `json:"registration_event" gorm:"foreignKey:RegistrationEventID"`
@@ -220,3 +225,9 @@ type RegisterStatusResponse struct {
220225 OrderNo string `json:"order_no"`
221226 Status string `json:"string"`
222227}
228+
229+ type PayProcessPayload struct {
230+ OrderNo string `json:"order_no"`
231+ Status string `json:"status"`
232+ Note string `json:"note"`
233+ }
0 commit comments