mirror of
https://github.com/danog/MadelineProtoDocs.git
synced 2024-12-03 18:18:30 +01:00
1.6 KiB
1.6 KiB
title | description | grand_parent | parent | image | redirect_from |
---|---|---|---|---|---|
payments.getPaymentForm | Get a payment form | Telegram RPC API | Methods | https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png | /API_docs/methods/payments_getPaymentForm.html |
Method: payments.getPaymentForm
Get a payment form
Parameters:
Name | Type | Description | Required |
---|---|---|---|
invoice | InputInvoice | Invoice | Yes |
theme_params | DataJSON | A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages: bg_color - Background color text_color - Text color hint_color - Hint text color link_color - Link color button_color - Button color button_text_color - Button text color |
Optional |
Return type: payments.PaymentForm
Can bots use this method: NO
MadelineProto Example (now async for huge speed and parallelism!):
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$payments_PaymentForm = $MadelineProto->payments->getPaymentForm(invoice: $InputInvoice, theme_params: $DataJSON, );