greed icon indicating copy to clipboard operation
greed copied to clipboard

Placing an order sometimes causes Telegram to return `Payment_provider_invalid`

Open DarrenWestwood opened this issue 4 years ago • 5 comments

After trying to complete an order with insufficient funds, clicking add funds returns an error. The error can be replicated on a new installation from the master branch.

Steps to replicate: Place order without enough credit > Add funds Full error: Payment_provider_invalid

DarrenWestwood avatar Jun 25 '20 04:06 DarrenWestwood

I couldn't reproduce this...

What payment provider is configured in your config file?

Steffo99 avatar Jun 25 '20 12:06 Steffo99

Both the default Credit Card token and using a Stripe testing token return the error. This appears related to the refill_on_checkout setting automatically creating a new Credit Card payment. I am actually experiencing the issue during send_invoice while making credit card payments.

2020-06-26 08:20:51 | Core | core | Received /start from: 619853453
2020-06-26 08:21:16 | Worker 619853453 | utils | Network error while calling send_invoice(), retrying in 5 secs...
Full error: Payment_provider_invalid

The refill_on_checkout functionality interferes with users who would still like to top up with cash or another payment method after ordering without enough credit. A simple solution would be to make refill_on_checkout = no by default or send the user to the add_funds menu instead of automatically running __make_payment(): https://github.com/Steffo99/greed/blob/master/worker.py#L560

DarrenWestwood avatar Jun 26 '20 07:06 DarrenWestwood

Can you reproduce this bug on the demo?

I have been trying for a while without any success...

Steffo99 avatar Jun 29 '20 01:06 Steffo99

this error also facing when user want to order but the balance is not enought and errror happened.. and the bot unrespond and error keep going on,,

when i comment this .. bot also error but still responding .. https://github.com/Steffo99/greed/blob/ee86092c60f2ae3bf11c141645f40fa8d57708b7/duckbot.py#L95-L97

btw the error in debug mode only show

Network error while calling send_invoice(), retrying in 5 secs...
Full error: Payment_provider_invalid

geeks121 avatar Nov 10 '21 15:11 geeks121

That's because of the following setting, implemented in #40: https://github.com/Steffo99/greed/blob/ee86092c60f2ae3bf11c141645f40fa8d57708b7/config/template_config.toml#L100-L101

Steffo99 avatar Nov 10 '21 16:11 Steffo99