Add payment type documentation
parent
5844ea113e
commit
1e3171403a
35
types.go
35
types.go
|
@ -1642,7 +1642,7 @@ type Invoice struct {
|
||||||
// Currency three-letter ISO 4217 currency code
|
// Currency three-letter ISO 4217 currency code
|
||||||
// (see https://core.telegram.org/bots/payments#supported-currencies)
|
// (see https://core.telegram.org/bots/payments#supported-currencies)
|
||||||
Currency string `json:"currency"`
|
Currency string `json:"currency"`
|
||||||
// TotalAmount otal price in the smallest units of the currency (integer, not float/double).
|
// TotalAmount total price in the smallest units of the currency (integer, not float/double).
|
||||||
// For example, for a price of US$ 1.45 pass amount = 145.
|
// For example, for a price of US$ 1.45 pass amount = 145.
|
||||||
// See the exp parameter in currencies.json
|
// See the exp parameter in currencies.json
|
||||||
// (https://core.telegram.org/bots/payments/currencies.json),
|
// (https://core.telegram.org/bots/payments/currencies.json),
|
||||||
|
@ -1672,7 +1672,7 @@ type ShippingAddress struct {
|
||||||
State string `json:"state"`
|
State string `json:"state"`
|
||||||
// City city
|
// City city
|
||||||
City string `json:"city"`
|
City string `json:"city"`
|
||||||
// StreetLine1 fFirst line for the address
|
// StreetLine1 first line for the address
|
||||||
StreetLine1 string `json:"street_line1"`
|
StreetLine1 string `json:"street_line1"`
|
||||||
// StreetLine2 second line for the address
|
// StreetLine2 second line for the address
|
||||||
StreetLine2 string `json:"street_line2"`
|
StreetLine2 string `json:"street_line2"`
|
||||||
|
@ -1712,13 +1712,30 @@ type ShippingOption struct {
|
||||||
|
|
||||||
// SuccessfulPayment contains basic information about a successful payment.
|
// SuccessfulPayment contains basic information about a successful payment.
|
||||||
type SuccessfulPayment struct {
|
type SuccessfulPayment struct {
|
||||||
Currency string `json:"currency"`
|
// Currency three-letter ISO 4217 currency code
|
||||||
TotalAmount int `json:"total_amount"`
|
// (see https://core.telegram.org/bots/payments#supported-currencies)
|
||||||
InvoicePayload string `json:"invoice_payload"`
|
Currency string `json:"currency"`
|
||||||
ShippingOptionID string `json:"shipping_option_id,omitempty"`
|
// TotalAmount total price in the smallest units of the currency (integer, not float/double).
|
||||||
OrderInfo *OrderInfo `json:"order_info,omitempty"`
|
// For example, for a price of US$ 1.45 pass amount = 145.
|
||||||
TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
|
// See the exp parameter in currencies.json,
|
||||||
ProviderPaymentChargeID string `json:"provider_payment_charge_id"`
|
// (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 int `json:"total_amount"`
|
||||||
|
// InvoicePayload bot specified invoice payload
|
||||||
|
InvoicePayload string `json:"invoice_payload"`
|
||||||
|
// ShippingOptionID identifier of the shipping option chosen by the user
|
||||||
|
//
|
||||||
|
// optional
|
||||||
|
ShippingOptionID string `json:"shipping_option_id,omitempty"`
|
||||||
|
// OrderInfo order info provided by the user
|
||||||
|
//
|
||||||
|
// optional
|
||||||
|
OrderInfo *OrderInfo `json:"order_info,omitempty"`
|
||||||
|
// TelegramPaymentChargeID telegram payment identifier
|
||||||
|
TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
|
||||||
|
// ProviderPaymentChargeID provider payment identifier
|
||||||
|
ProviderPaymentChargeID string `json:"provider_payment_charge_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ShippingQuery contains information about an incoming shipping query.
|
// ShippingQuery contains information about an incoming shipping query.
|
||||||
|
|
Loading…
Reference in New Issue