Closed denred0 closed 6 years ago
Better if you just fix your line:
List<LabeledPrice> price = new List<LabeledPrice>();
You can not create an instance of an interface
Thanks for fast answer.
Now works, but image not displayed. I use direct link (I try use gdrive links also) Please, give me advice about correct use setPhotoUrl. Below my code:
SendInvoice inv = new SendInvoice(Integer.parseInt(message.getChatId().toString()), "Hello", "Hello", "111", "#########:TEST:###",
"StartParam", "RUB", price).setPhotoUrl("https://1fichier.com/?m1grvfz34i");
Result:
Thank you!
Check your image, it doesn't point to an image/jpeg
file.
Why? If go to link https://1fichier.com/?m1grvfz34i downloaded .jpg file. Or I dont understand...
But it is not a correct image/jpeg
:
Another link with image/jpeg
content-type.
https://drive.google.com/uc?export=download&id=0BydBkApd9R5PQWdlQTcwWDh4SjA
Invoice disaplayed with white image also. When I click on image for display it on screen a catch error:
org.telegram.telegrambots.exceptions.TelegramApiRequestException: Error getting updates: [409] Conflict: terminated by other long poll or webhook
at org.telegram.telegrambots.api.methods.updates.GetUpdates.deserializeResponse(GetUpdates.java:119)
at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$ReaderThread.run(DefaultBotSession.java:208)
Sorry for stupid error((
Now error is dissapear, but image still white. When I tap on image it loaded endless. I test my internet connection - all works, I test invoice in bot @shopbot - image is displayed.
Its very strange. I dont understand whats wrong.
@DenisWpk still no way to show the images? Have you tried using some random image from internet as a test?
Hi! I try to use different image hosting but there is no result. The image is still white (
Same bug. Images are white on mobile, but normal on the desktop client.
Any suggestions? Thanks.
@DenisWpk
@shopbot - image is displayed
I tested now @shopbot on Android client and image in the invoice is not displayed. But on Desktop client all OK. Maybe there is a bug in Android client of Telegram?
Android:
Desktop:
plz give me full working code
Hi!
I try to use payments API. I catch error:
Below my code:
Do you have example code of payments or where is my mistake? Thank you!