Package for using Wallet Pay API https://docs.wallet.tg/pay/
Create order /wpay/store-api/v1/order
Get order preview /wpay/store-api/v1/order/preview
Get order list /wpay/store-api/v1/reconciliation/order-list
Get order amount /wpay/store-api/v1/reconciliation/order-amount
go get github.com/iscod/wallet
w, err := wallet.NewWallet("secret_api_key")
if err != nil {
fmt.printf("Error creating wallet: %s\n", err)
}
w, err := wallet.NewWallet("secret_api_key")
if err != nil {
fmt.printf("Error creating wallet: %s\n", err)
}
createResponse, err := w.Create(&wallet.CreateParams{
Description: "VPN for 1 month",
Amount: wallet.Amount{Amount: "1.00", CurrencyCode: "TON"},
ReturnUrl: "https://t.me/wallet/start?startapp",
TimeoutSeconds: 10800,
CustomerTelegramUserId: 0,
})
var order *wallet.Order = createResponse.Data
fmt.Println(order.PayLink)
/wpay/store-api/v1/order/preview
w, err := wallet.NewWallet("secret_api_key")
if err != nil {
fmt.printf("Error creating wallet: %s\n", err)
}
previewResponse, err := w.GetPreview("2703383946854401")
var order *wallet.Order = previewResponse.Data
fmt.Println(order.Id)