Go SDK
Cliente Go de biblioteca estándar con cuatro métodos API, firma, verificación de callbacks y ejemplo de consulta de solo lectura.
Características
- Incluye CreatePayinOrder, GetPayinOrder, CreateExclusiveBinding y CreatePayoutOrder
- El éxito devuelve JSON de negocio original. Maneja por separado errores JSON y rechazos HTTP sin cuerpo.
- Verifica callbacks con la API Key del pedido original y los bytes originales del cuerpo.
Instalación
cd uugate-go-sdk
go test ./...
go run ./examples/basicEjemplo rápido
import (
"context"
"os"
uugate "uugate.local/openapi"
)
client, err := uugate.NewClient("https://api.uugate.com",
os.Getenv("UUGATE_MERCHANT_UID"), os.Getenv("UUGATE_API_KEY"))
if err != nil { panic(err) }
order, err := client.CreatePayinOrder(context.Background(), map[string]any{
"chainCode": "TRON", "tokenSymbol": "USDT",
"merchantOrderNo": "M202604170001", "amount": "100.00",
"notifyUrl": "https://merchant.example.com/api/uugate/payin-notify",
})
if err != nil { panic(err) }
_ = orderDescarga ZIP
Descargar Go SDK ZIPuugate-go-sdk.zip