Merge pull request #30 from OvyFlash/bot-api-7.7 BotAPI 7.7 implementation
OvyFlash 46941696+OvyFlash@users.noreply.github.com
Sat, 13 Jul 2024 00:22:02 +0300
1 files changed,
25 insertions(+),
0 deletions(-)
jump to
M
types.go
→
types.go
@@ -826,6 +826,10 @@ // information about the payment;
// // optional SuccessfulPayment *SuccessfulPayment `json:"successful_payment,omitempty"` + // Message is a service message about a refunded payment, information about the payment + // + // optional + RefundedPayment *RefundedPayment `json:"refunded_payment,omitempty"` // UsersShared is a service message: the users were shared with the bot // // optional@@ -4953,6 +4957,27 @@ // TelegramPaymentChargeID telegram payment identifier
TelegramPaymentChargeID string `json:"telegram_payment_charge_id"` // ProviderPaymentChargeID provider payment identifier ProviderPaymentChargeID string `json:"provider_payment_charge_id"` +} + +// RefundPayment contains basic information about a refunded payment. +type RefundedPayment struct { + // Three-letter ISO 4217 currency code (https://core.telegram.org/bots/payments#supported-currencies), + // or “XTR” for payments in Telegram Stars. + // Currently, always “XTR” + Currency string `json:"currency"` + // Total refunded price in the smallest units of the currency (integer, not float/double). + // For example, for a price of US$ 1.45, total_amount = 145. + // See the exp parameter in https://core.telegram.org/bots/payments/currencies.json, + // it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + TotalAmount int64 `json:"total_amount"` + // Bot-specified invoice payload + InvoicePayload string `json:"invoice_payload"` + // Telegram payment identifier + TelegramPaymentChargeID string `json:"telegram_payment_charge_id"` + // Provider payment identifier + // + // optional + ProviderPaymentChargeID string `json:"provider_payment_charge_id,omitempty"` } // ShippingQuery contains information about an incoming shipping query.