Java Code Examples for org.telegram.tgnet.TLRPC#TL_payments_paymentForm
The following examples show how to use
org.telegram.tgnet.TLRPC#TL_payments_paymentForm .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PaymentFormActivity.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
public PaymentFormActivity(MessageObject message, TLRPC.TL_payments_paymentReceipt receipt) { currentStep = 5; paymentForm = new TLRPC.TL_payments_paymentForm(); paymentForm.bot_id = receipt.bot_id; paymentForm.invoice = receipt.invoice; paymentForm.provider_id = receipt.provider_id; paymentForm.users = receipt.users; shippingOption = receipt.shipping; messageObject = message; botUser = MessagesController.getInstance(currentAccount).getUser(receipt.bot_id); if (botUser != null) { currentBotName = botUser.first_name; } else { currentBotName = ""; } currentItemName = message.messageOwner.media.title; if (receipt.info != null) { validateRequest = new TLRPC.TL_payments_validateRequestedInfo(); validateRequest.info = receipt.info; } cardName = receipt.credentials_title; }
Example 2
Source File: PaymentFormActivity.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
public PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message) { int step; if (form.invoice.shipping_address_requested || form.invoice.email_requested || form.invoice.name_requested || form.invoice.phone_requested) { step = 0; } else if (form.saved_credentials != null) { if (UserConfig.getInstance(currentAccount).tmpPassword != null) { if (UserConfig.getInstance(currentAccount).tmpPassword.valid_until < ConnectionsManager.getInstance(currentAccount).getCurrentTime() + 60) { UserConfig.getInstance(currentAccount).tmpPassword = null; UserConfig.getInstance(currentAccount).saveConfig(false); } } if (UserConfig.getInstance(currentAccount).tmpPassword != null) { step = 4; } else { step = 3; } } else { step = 2; } init(form, message, step, null, null, null, null, null, false, null); }
Example 3
Source File: PaymentFormActivity.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
public PaymentFormActivity(MessageObject message, TLRPC.TL_payments_paymentReceipt receipt) { currentStep = 5; paymentForm = new TLRPC.TL_payments_paymentForm(); paymentForm.bot_id = receipt.bot_id; paymentForm.invoice = receipt.invoice; paymentForm.provider_id = receipt.provider_id; paymentForm.users = receipt.users; shippingOption = receipt.shipping; messageObject = message; botUser = MessagesController.getInstance(currentAccount).getUser(receipt.bot_id); if (botUser != null) { currentBotName = botUser.first_name; } else { currentBotName = ""; } currentItemName = message.messageOwner.media.title; if (receipt.info != null) { validateRequest = new TLRPC.TL_payments_validateRequestedInfo(); validateRequest.info = receipt.info; } cardName = receipt.credentials_title; }
Example 4
Source File: PaymentFormActivity.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
public PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message) { int step; if (form.invoice.shipping_address_requested || form.invoice.email_requested || form.invoice.name_requested || form.invoice.phone_requested) { step = 0; } else if (form.saved_credentials != null) { if (UserConfig.getInstance(currentAccount).tmpPassword != null) { if (UserConfig.getInstance(currentAccount).tmpPassword.valid_until < ConnectionsManager.getInstance(currentAccount).getCurrentTime() + 60) { UserConfig.getInstance(currentAccount).tmpPassword = null; UserConfig.getInstance(currentAccount).saveConfig(false); } } if (UserConfig.getInstance(currentAccount).tmpPassword != null) { step = 4; } else { step = 3; } } else { step = 2; } init(form, message, step, null, null, null, null, null, false, null); }
Example 5
Source File: PaymentFormActivity.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
public PaymentFormActivity(MessageObject message, TLRPC.TL_payments_paymentReceipt receipt) { currentStep = 5; paymentForm = new TLRPC.TL_payments_paymentForm(); paymentForm.bot_id = receipt.bot_id; paymentForm.invoice = receipt.invoice; paymentForm.provider_id = receipt.provider_id; paymentForm.users = receipt.users; shippingOption = receipt.shipping; messageObject = message; botUser = MessagesController.getInstance(currentAccount).getUser(receipt.bot_id); if (botUser != null) { currentBotName = botUser.first_name; } else { currentBotName = ""; } currentItemName = message.messageOwner.media.title; if (receipt.info != null) { validateRequest = new TLRPC.TL_payments_validateRequestedInfo(); validateRequest.info = receipt.info; } cardName = receipt.credentials_title; }
Example 6
Source File: PaymentFormActivity.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
public PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message) { int step; if (form.invoice.shipping_address_requested || form.invoice.email_requested || form.invoice.name_requested || form.invoice.phone_requested) { step = 0; } else if (form.saved_credentials != null) { if (UserConfig.getInstance(currentAccount).tmpPassword != null) { if (UserConfig.getInstance(currentAccount).tmpPassword.valid_until < ConnectionsManager.getInstance(currentAccount).getCurrentTime() + 60) { UserConfig.getInstance(currentAccount).tmpPassword = null; UserConfig.getInstance(currentAccount).saveConfig(false); } } if (UserConfig.getInstance(currentAccount).tmpPassword != null) { step = 4; } else { step = 3; } } else { step = 2; } init(form, message, step, null, null, null, null, null, false, null); }
Example 7
Source File: PaymentFormActivity.java From Telegram with GNU General Public License v2.0 | 6 votes |
public PaymentFormActivity(MessageObject message, TLRPC.TL_payments_paymentReceipt receipt) { currentStep = 5; paymentForm = new TLRPC.TL_payments_paymentForm(); paymentForm.bot_id = receipt.bot_id; paymentForm.invoice = receipt.invoice; paymentForm.provider_id = receipt.provider_id; paymentForm.users = receipt.users; shippingOption = receipt.shipping; messageObject = message; botUser = MessagesController.getInstance(currentAccount).getUser(receipt.bot_id); if (botUser != null) { currentBotName = botUser.first_name; } else { currentBotName = ""; } currentItemName = message.messageOwner.media.title; if (receipt.info != null) { validateRequest = new TLRPC.TL_payments_validateRequestedInfo(); validateRequest.info = receipt.info; } cardName = receipt.credentials_title; }
Example 8
Source File: PaymentFormActivity.java From Telegram with GNU General Public License v2.0 | 6 votes |
public PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message) { int step; if (form.invoice.shipping_address_requested || form.invoice.email_requested || form.invoice.name_requested || form.invoice.phone_requested) { step = 0; } else if (form.saved_credentials != null) { if (UserConfig.getInstance(currentAccount).tmpPassword != null) { if (UserConfig.getInstance(currentAccount).tmpPassword.valid_until < ConnectionsManager.getInstance(currentAccount).getCurrentTime() + 60) { UserConfig.getInstance(currentAccount).tmpPassword = null; UserConfig.getInstance(currentAccount).saveConfig(false); } } if (UserConfig.getInstance(currentAccount).tmpPassword != null) { step = 4; } else { step = 3; } } else { step = 2; } init(form, message, step, null, null, null, null, null, false, null); }
Example 9
Source File: PaymentFormActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private void init(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsAndroidPay androidPay) { currentStep = step; paymentJson = tokenJson; androidPayCredentials = androidPay; requestedInfo = validatedRequestedInfo; paymentForm = form; shippingOption = shipping; messageObject = message; saveCardInfo = saveCard; isWebView = !"stripe".equals(paymentForm.native_provider); botUser = MessagesController.getInstance(currentAccount).getUser(form.bot_id); if (botUser != null) { currentBotName = botUser.first_name; } else { currentBotName = ""; } currentItemName = message.messageOwner.media.title; validateRequest = request; saveShippingInfo = true; if (saveCard) { saveCardInfo = saveCard; } else { saveCardInfo = paymentForm.saved_credentials != null; } if (card == null) { if (form.saved_credentials != null) { cardName = form.saved_credentials.title; } } else { cardName = card; } }
Example 10
Source File: PaymentFormActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private void init(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsAndroidPay androidPay) { currentStep = step; paymentJson = tokenJson; androidPayCredentials = androidPay; requestedInfo = validatedRequestedInfo; paymentForm = form; shippingOption = shipping; messageObject = message; saveCardInfo = saveCard; isWebView = !"stripe".equals(paymentForm.native_provider); botUser = MessagesController.getInstance(currentAccount).getUser(form.bot_id); if (botUser != null) { currentBotName = botUser.first_name; } else { currentBotName = ""; } currentItemName = message.messageOwner.media.title; validateRequest = request; saveShippingInfo = true; if (saveCard) { saveCardInfo = saveCard; } else { saveCardInfo = paymentForm.saved_credentials != null; } if (card == null) { if (form.saved_credentials != null) { cardName = form.saved_credentials.title; } } else { cardName = card; } }
Example 11
Source File: PaymentFormActivity.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
private void init(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsAndroidPay androidPay) { currentStep = step; paymentJson = tokenJson; androidPayCredentials = androidPay; requestedInfo = validatedRequestedInfo; paymentForm = form; shippingOption = shipping; messageObject = message; saveCardInfo = saveCard; isWebView = !"stripe".equals(paymentForm.native_provider); botUser = MessagesController.getInstance(currentAccount).getUser(form.bot_id); if (botUser != null) { currentBotName = botUser.first_name; } else { currentBotName = ""; } currentItemName = message.messageOwner.media.title; validateRequest = request; saveShippingInfo = true; if (saveCard) { saveCardInfo = saveCard; } else { saveCardInfo = paymentForm.saved_credentials != null; } if (card == null) { if (form.saved_credentials != null) { cardName = form.saved_credentials.title; } } else { cardName = card; } }
Example 12
Source File: PaymentFormActivity.java From Telegram with GNU General Public License v2.0 | 5 votes |
private void init(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsAndroidPay androidPay) { currentStep = step; paymentJson = tokenJson; androidPayCredentials = androidPay; requestedInfo = validatedRequestedInfo; paymentForm = form; shippingOption = shipping; messageObject = message; saveCardInfo = saveCard; isWebView = !"stripe".equals(paymentForm.native_provider); botUser = MessagesController.getInstance(currentAccount).getUser(form.bot_id); if (botUser != null) { currentBotName = botUser.first_name; } else { currentBotName = ""; } currentItemName = message.messageOwner.media.title; validateRequest = request; saveShippingInfo = true; if (saveCard) { saveCardInfo = saveCard; } else { saveCardInfo = paymentForm.saved_credentials != null; } if (card == null) { if (form.saved_credentials != null) { cardName = form.saved_credentials.title; } } else { cardName = card; } }
Example 13
Source File: PaymentFormActivity.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
private PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsAndroidPay androidPay) { init(form, message, step, validatedRequestedInfo, shipping, tokenJson, card, request, saveCard, androidPay); }
Example 14
Source File: PaymentFormActivity.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
private PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsAndroidPay androidPay) { init(form, message, step, validatedRequestedInfo, shipping, tokenJson, card, request, saveCard, androidPay); }
Example 15
Source File: PaymentFormActivity.java From Telegram-FOSS with GNU General Public License v2.0 | 4 votes |
private PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsAndroidPay androidPay) { init(form, message, step, validatedRequestedInfo, shipping, tokenJson, card, request, saveCard, androidPay); }
Example 16
Source File: PaymentFormActivity.java From Telegram with GNU General Public License v2.0 | 4 votes |
private PaymentFormActivity(TLRPC.TL_payments_paymentForm form, MessageObject message, int step, TLRPC.TL_payments_validatedRequestedInfo validatedRequestedInfo, TLRPC.TL_shippingOption shipping, String tokenJson, String card, TLRPC.TL_payments_validateRequestedInfo request, boolean saveCard, TLRPC.TL_inputPaymentCredentialsAndroidPay androidPay) { init(form, message, step, validatedRequestedInfo, shipping, tokenJson, card, request, saveCard, androidPay); }