Payments API

This commit is contained in:
MrYadro 2017-06-03 03:18:42 +07:00
parent 5869b2f7f9
commit 42d132b90a
No known key found for this signature in database
GPG key ID: F46CD4085B2F9482
5 changed files with 242 additions and 35 deletions

View file

@ -640,3 +640,24 @@ func NewCallbackWithAlert(id, text string) CallbackConfig {
ShowAlert: true,
}
}
func NewInvoice(chatID int64, title, description, payload, providerToken, startParameter, currency string, prices *[]LabeledPrice, photoUrl string, photoSize, photoWidth, photoHeight int, needName, needPhoneNumber, needEmail, needShippingAddress, isFlexible bool) InvoiceConfig {
return InvoiceConfig{
BaseChat: BaseChat{ChatID: chatID},
Title: title,
Description: description,
Payload: payload,
ProviderToken: providerToken,
StartParameter: startParameter,
Currency: currency,
Prices: prices,
PhotoUrl: photoUrl,
PhotoSize: photoSize,
PhotoWidth: photoWidth,
PhotoHeight: photoHeight,
NeedName: needName,
NeedPhoneNumber: needPhoneNumber,
NeedEmail: needEmail,
NeedShippingAddress: needShippingAddress,
IsFlexible: isFlexible}
}