Move payment form URL to paymentProviderOther.
This commit is contained in:
parent
132ccfb289
commit
f12da0fed5
|
@ -1536,14 +1536,16 @@ paymentProviderSmartGlocal public_token:string = PaymentProvider;
|
|||
//@description Stripe payment provider @publishable_key Stripe API publishable key @need_country True, if the user country must be provided @need_postal_code True, if the user ZIP/postal code must be provided @need_cardholder_name True, if the cardholder name must be provided
|
||||
paymentProviderStripe publishable_key:string need_country:Bool need_postal_code:Bool need_cardholder_name:Bool = PaymentProvider;
|
||||
|
||||
//@description Some other payment provider, for which a web payment form must be shown @url Payment form URL
|
||||
paymentProviderOther url:string = PaymentProvider;
|
||||
|
||||
|
||||
//@description Contains information about an invoice payment form
|
||||
//@id The payment form identifier
|
||||
//@invoice Full information about the invoice
|
||||
//@url Payment form URL
|
||||
//@seller_bot_user_id User identifier of the seller bot
|
||||
//@payment_provider_user_id User identifier of the payment provider bot
|
||||
//@payment_provider Information about the payment provider, if available, to support it natively without the need for opening the URL; may be null
|
||||
//@payment_provider Information about the payment provider
|
||||
//@saved_order_info Saved server-side order information; may be null
|
||||
//@saved_credentials Information about saved card credentials; may be null
|
||||
//@can_save_credentials True, if the user can choose to save credentials
|
||||
|
@ -1551,7 +1553,7 @@ paymentProviderStripe publishable_key:string need_country:Bool need_postal_code:
|
|||
//@product_title Product title
|
||||
//@product_description Product description
|
||||
//@product_photo Product photo; may be null
|
||||
paymentForm id:int64 invoice:invoice url:string seller_bot_user_id:int53 payment_provider_user_id:int53 payment_provider:PaymentProvider saved_order_info:orderInfo saved_credentials:savedCredentials can_save_credentials:Bool need_password:Bool product_title:string product_description:string product_photo:photo = PaymentForm;
|
||||
paymentForm id:int64 invoice:invoice seller_bot_user_id:int53 payment_provider_user_id:int53 payment_provider:PaymentProvider saved_order_info:orderInfo saved_credentials:savedCredentials can_save_credentials:Bool need_password:Bool product_title:string product_description:string product_photo:photo = PaymentForm;
|
||||
|
||||
//@description Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options @order_info_id Temporary identifier of the order information @shipping_options Available shipping options
|
||||
validatedOrderInfo order_info_id:string shipping_options:vector<shippingOption> = ValidatedOrderInfo;
|
||||
|
|
|
@ -375,12 +375,16 @@ class GetPaymentFormQuery final : public Td::ResultHandler {
|
|||
bool can_save_credentials = payment_form->can_save_credentials_;
|
||||
bool need_password = payment_form->password_missing_;
|
||||
auto photo = get_web_document_photo(td_->file_manager_.get(), std::move(payment_form->photo_), dialog_id_);
|
||||
auto payment_provider =
|
||||
convert_payment_provider(payment_form->native_provider_, std::move(payment_form->native_params_));
|
||||
if (payment_provider == nullptr) {
|
||||
payment_provider = td_api::make_object<td_api::paymentProviderOther>(std::move(payment_form->url_));
|
||||
}
|
||||
promise_.set_value(make_tl_object<td_api::paymentForm>(
|
||||
payment_form->form_id_, convert_invoice(std::move(payment_form->invoice_)), std::move(payment_form->url_),
|
||||
payment_form->form_id_, convert_invoice(std::move(payment_form->invoice_)),
|
||||
td_->contacts_manager_->get_user_id_object(seller_bot_user_id, "paymentForm seller"),
|
||||
td_->contacts_manager_->get_user_id_object(payments_provider_user_id, "paymentForm provider"),
|
||||
convert_payment_provider(payment_form->native_provider_, std::move(payment_form->native_params_)),
|
||||
convert_order_info(std::move(payment_form->saved_info_)),
|
||||
std::move(payment_provider), convert_order_info(std::move(payment_form->saved_info_)),
|
||||
convert_saved_credentials(std::move(payment_form->saved_credentials_)), can_save_credentials, need_password,
|
||||
payment_form->title_, payment_form->description_, get_photo_object(td_->file_manager_.get(), photo)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user