/* * Tpay.com Technical Documentation * *

Demo transaction/masspayments api key:

Demo cards api key:

The terms seller and merchant are used interchangeably and they both refer to a person or a company registered at tpay.com to accept online payments.
Whenever term merchant panel is used it refers to the part of tpay.com website located at secure.tpay.com/panel.

For sandbox purposes use merchant demo account

ID - 1010, Password - demo

Remember that this is a shared account, so all data passed through will be publicly visible.

* * The version of the OpenAPI document: 1.2.1 * Contact: pt@tpay.com * Generated by: https://openapi-generator.tech */ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PresaleFields { /// transaction description #[serde(rename = "desc")] pub desc: String, /// Client token #[serde(rename = "cli_auth")] pub cli_auth: String, /// transaction amount casted to float #[serde(rename = "amount")] pub amount: f32, /// API password. #[serde(rename = "api_password")] pub api_password: String, /// Sign is calculated from cryptographic hash function set in Merchant’s Panel (default SHA-1): hash_alg (method + cli_auth + desc + amount + currency + order_id + language + verification code) where + means concatenation with ampersand symbol. ie. amount + currency = 10.99&985 #[serde(rename = "sign")] pub sign: String, /// transaction currency in ISO numeric format #[serde(rename = "currency", skip_serializing_if = "Option::is_none")] pub currency: Option, /// merchant order ID used to recognise payment #[serde(rename = "order_id", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "language", skip_serializing_if = "Option::is_none")] pub language: Option, } impl PresaleFields { pub fn new( desc: String, cli_auth: String, amount: f32, api_password: String, sign: String, ) -> PresaleFields { PresaleFields { desc, cli_auth, amount, api_password, sign, currency: None, order_id: None, language: None, } } }