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>
This commit is contained in:
		
							parent
							
								
									624cb96239
								
							
						
					
					
						commit
						b7195b364f
					
				| 
						 | 
					@ -64,3 +64,16 @@ type ORResult struct {
 | 
				
			||||||
	OrId   int    `json:"or_id"`
 | 
						OrId   int    `json:"or_id"`
 | 
				
			||||||
	Status string `json:"status"`
 | 
						Status string `json:"status"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type Webhook struct {
 | 
				
			||||||
 | 
						Data WebhookData `json:"data"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type WebhookData struct {
 | 
				
			||||||
 | 
						OrId          int     `json:"or_id"`
 | 
				
			||||||
 | 
						OrCode        string  `json:"or_code"`
 | 
				
			||||||
 | 
						PartnerOrCode string  `json:"partner_or_code"`
 | 
				
			||||||
 | 
						Status        string  `json:"status"`
 | 
				
			||||||
 | 
						TotalPrice    float64 `json:"total_price"`
 | 
				
			||||||
 | 
						ShippingFee   int     `json:"shipping_fee"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue