2024-05-24 20:47:15 +03:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class HistoryItem;
|
|
|
|
|
2024-07-18 16:41:18 +02:00
|
|
|
namespace Main {
|
|
|
|
class SessionShow;
|
|
|
|
} // namespace Main
|
|
|
|
|
2024-05-24 20:47:15 +03:00
|
|
|
namespace Window {
|
|
|
|
class SessionController;
|
|
|
|
} // namespace Window
|
|
|
|
|
|
|
|
namespace Payments {
|
|
|
|
|
2024-05-28 16:00:35 +03:00
|
|
|
enum class CheckoutResult;
|
2024-07-18 16:41:18 +02:00
|
|
|
struct CreditsFormData;
|
|
|
|
struct CreditsReceiptData;
|
2024-05-24 20:47:15 +03:00
|
|
|
struct NonPanelPaymentForm;
|
|
|
|
|
2024-06-18 18:55:07 +04:00
|
|
|
[[nodiscard]] bool IsCreditsInvoice(not_null<HistoryItem*> item);
|
|
|
|
|
2024-07-18 16:41:18 +02:00
|
|
|
void ProcessCreditsPayment(
|
|
|
|
std::shared_ptr<Main::SessionShow> show,
|
|
|
|
QPointer<QWidget> fireworks,
|
|
|
|
std::shared_ptr<CreditsFormData> form,
|
|
|
|
Fn<void(CheckoutResult)> maybeReturnToBot = nullptr);
|
|
|
|
|
|
|
|
void ProcessCreditsReceipt(
|
|
|
|
not_null<Window::SessionController*> controller,
|
|
|
|
std::shared_ptr<CreditsReceiptData> receipt,
|
|
|
|
Fn<void(CheckoutResult)> maybeReturnToBot = nullptr);
|
|
|
|
|
2024-05-24 20:47:15 +03:00
|
|
|
Fn<void(NonPanelPaymentForm)> ProcessNonPanelPaymentFormFactory(
|
2024-05-28 16:00:35 +03:00
|
|
|
not_null<Window::SessionController*> controller,
|
|
|
|
Fn<void(Payments::CheckoutResult)> maybeReturnToBot = nullptr);
|
2024-05-24 20:47:15 +03:00
|
|
|
|
|
|
|
Fn<void(NonPanelPaymentForm)> ProcessNonPanelPaymentFormFactory(
|
|
|
|
not_null<Window::SessionController*> controller,
|
|
|
|
not_null<HistoryItem*> item);
|
|
|
|
|
|
|
|
} // namespace Payments
|