Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stars payment error:PAYMENT_PROVIDER_INVALID #1445

Open
zkywalker opened this issue Oct 13, 2024 · 3 comments
Open

stars payment error:PAYMENT_PROVIDER_INVALID #1445

zkywalker opened this issue Oct 13, 2024 · 3 comments

Comments

@zkywalker
Copy link

version:7.10.0
code:
val build = SendInvoice.builder() .chatId(it.chatId()) .title("test") .description("test") .payload("test") .currency("TXR") .providerToken("") .price(LabeledPrice("Label", 100)) .startParameter("test") .build() silent.execute(build)
log:
`
Could not execute bot API method

org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException: Error executing org.telegram.telegrambots.meta.api.methods.invoices.SendInvoice query: [400] Bad Request: PAYMENT_PROVIDER_INVALID
at org.telegram.telegrambots.meta.api.methods.botapimethods.PartialBotApiMethod.deserializeResponseInternal(PartialBotApiMethod.java:61) ~[telegrambots-meta-7.10.0.jar!/:na]
at org.telegram.telegrambots.meta.api.methods.botapimethods.PartialBotApiMethod.deserializeResponse(PartialBotApiMethod.java:41) ~[telegrambots-meta-7.10.0.jar!/:na]
at org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethodMessage.deserializeResponse(BotApiMethodMessage.java:24) ~[telegrambots-meta-7.10.0.jar!/:na]
at org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethodMessage.deserializeResponse(BotApiMethodMessage.java:17) ~[telegrambots-meta-7.10.0.jar!/:na]
at org.telegram.telegrambots.client.okhttp.OkHttpFutureCallback.onResponse(OkHttpFutureCallback.java:35) ~[telegrambots-client-7.10.0.jar!/:na]
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) ~[okhttp-4.12.0.jar!/:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
`

@zkywalker zkywalker changed the title stars payment error:PAYMENT_PROVIDER_INVALID, stars payment error:PAYMENT_PROVIDER_INVALID Oct 13, 2024
@rubenlagus
Copy link
Owner

Have you tried not setting provider at all?

@logesh2496
Copy link

+1
tested with both setting the providerToken as empty string and without the property itself. same error

@rubenlagus
Copy link
Owner

Tested it myself right now with below request, working fine:

SendInvoice sendInvoice = SendInvoice
                .builder()
                .chatId(callbackQuery.getMessage().getChatId())
                .title("title")
                .description("Description ")
                .payload(callbackQuery.getId() + "-" + System.currentTimeMillis())
                .currency("XTR")
                .price(LabeledPrice
                        .builder()
                        .label("Price")
                        .amount(100)
                        .build()
                )
                .build();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants