SDK Descargas

Hay cuatro SDK: Node.js, Java, PHP y Go, con parámetros API, firmas, cuerpos JSON y verificación de callbacks consistentes.

Descarga el ZIP de tu lenguaje. Cada paquete incluye instrucciones de instalación, cliente, herramientas de firma y ejemplos.

Node.js SDK

Para proyectos Node.js 18+, con cuatro métodos API, firma de solicitud, verificación de devolución de llamada y un script de ejemplo mínimo.

Características
  • Incluye createPayinOrder, getPayinOrder, createExclusiveBinding y createPayoutOrder.
  • La firma de la solicitud coincide con la implementación del servidor comerciante-openapi-signature.
  • La verificación de devolución de llamada admite la verificación directa de la cadena de solicitud sin formato body.
  • Ejemplo de recarga: configuración, verificación de callbacks y abono transaccional sin duplicados
Instalación
npm install ./uugate-nodejs-sdk
Ejemplo rápido
import { UUGateClient } from 'uugate-openapi-sdk';

const client = new UUGateClient({
  baseUrl: 'https://api.uugate.com',
  merchantUid: process.env.UUGATE_MERCHANT_UID,
  apiKey: process.env.UUGATE_API_KEY,
});

const order = await client.createPayinOrder({
  chainCode: 'TRON',
  tokenSymbol: 'USDT',
  merchantOrderNo: 'M202604170001',
  amount: '100.00',
  notifyUrl: 'https://merchant.example.com/api/uugate/payin-notify',
});

Java SDK

Cliente Java 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-java-sdk
javac -encoding UTF-8 -d build src/uugate/UUGateClient.java examples/Example.java
java -cp build Example
Ejemplo rápido
import uugate.UUGateClient;
import java.util.Map;

UUGateClient client = new UUGateClient("https://api.uugate.com",
    System.getenv("UUGATE_MERCHANT_UID"), System.getenv("UUGATE_API_KEY"));
String order = client.createPayinOrder(Map.of(
    "chainCode", "TRON", "tokenSymbol", "USDT",
    "merchantOrderNo", "M202604170001", "amount", "100.00",
    "notifyUrl", "https://merchant.example.com/api/uugate/payin-notify"));

PHP / Laravel SDK

Para PHP 8.1+ y Laravel 11/10/12, con cliente, proveedor de servicios, Facade, archivo de configuración y verificador de devolución de llamada.

Características
  • Admite el descubrimiento automático Laravel para ServiceProvider y Facade.
  • Admite el envío de las cuatro solicitudes OpenAPI a través de UUGateClient o Facade.
  • Incluye verificación apiKey para devoluciones de llamadas de pagos y pagos.
Instalación
composer config repositories.uugate-sdk path ./uugate-php-laravel-sdk
composer require uugate/openapi-laravel-sdk:*@dev
Ejemplo rápido
use UUGate\OpenApi\Facades\UUGate;

$order = UUGate::createPayinOrder([
    'chainCode' => 'TRON',
    'tokenSymbol' => 'USDT',
    'merchantOrderNo' => 'M202604170001',
    'amount' => '100.00',
    'notifyUrl' => 'https://merchant.example.com/api/uugate/payin-notify',
]);

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/basic
Ejemplo 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) }
_ = order