diff --git a/README.md b/README.md index 37fc5e1..65fe02d 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,20 @@ ### Order life cycle order lifecycle + +## Adapters + +### API + + + +#### Building adapters + +Repository contains script which will build all adapters and copy wasm files to `./adapters` directory + +This script will treat all crates which starts with `payment_adapter_` as a payment adapter + +```bash +mkdir -p adapters +./scripts/build-adapters +``` diff --git a/crates/order_manager/src/actions/order_address.rs b/crates/order_manager/src/actions/order_address.rs index e69de29..8b13789 100644 --- a/crates/order_manager/src/actions/order_address.rs +++ b/crates/order_manager/src/actions/order_address.rs @@ -0,0 +1 @@ + diff --git a/crates/order_manager/src/actions/order_item.rs b/crates/order_manager/src/actions/order_item.rs index e69de29..8b13789 100644 --- a/crates/order_manager/src/actions/order_item.rs +++ b/crates/order_manager/src/actions/order_item.rs @@ -0,0 +1 @@ + diff --git a/crates/order_manager/src/context.rs b/crates/order_manager/src/context.rs index e69de29..8b13789 100644 --- a/crates/order_manager/src/context.rs +++ b/crates/order_manager/src/context.rs @@ -0,0 +1 @@ + diff --git a/crates/order_manager/src/main.rs b/crates/order_manager/src/main.rs index 0213972..edc341c 100644 --- a/crates/order_manager/src/main.rs +++ b/crates/order_manager/src/main.rs @@ -1,10 +1,10 @@ use config::UpdateConfig; mod actions; +mod context; mod db; mod mqtt; mod rpc; -mod context; pub struct Opts {} diff --git a/crates/payment_adapter_pay_u/Cargo.lock b/crates/payment_adapter_pay_u/Cargo.lock index b5dd90c..4043874 100644 --- a/crates/payment_adapter_pay_u/Cargo.lock +++ b/crates/payment_adapter_pay_u/Cargo.lock @@ -830,6 +830,7 @@ dependencies = [ "pay_u", "payment_adapter", "tokio", + "tracing", "wapc-codec", "wapc-guest", ] diff --git a/crates/payment_adapter_pay_u/Cargo.toml b/crates/payment_adapter_pay_u/Cargo.toml index 4aaba58..174f328 100644 --- a/crates/payment_adapter_pay_u/Cargo.toml +++ b/crates/payment_adapter_pay_u/Cargo.toml @@ -13,3 +13,4 @@ bincode = { version = "1.3.3" } wapc-codec = { version = "1.0.0" } wapc-guest = { version = "1.0.0" } tokio = { version="1.21.1", features=["rt","sync","time"] } +tracing = { version = "0.1.37" } diff --git a/crates/payment_adapter_pay_u/src/lib.rs b/crates/payment_adapter_pay_u/src/lib.rs index 84ae6c0..9fed1ce 100644 --- a/crates/payment_adapter_pay_u/src/lib.rs +++ b/crates/payment_adapter_pay_u/src/lib.rs @@ -1,7 +1,7 @@ use std::sync::{Arc, Mutex}; use pay_u::{ClientId, ClientSecret, MerchantPosId}; -use payment_adapter::{CreatePayment, PaymentProviderConfig, Status}; +use payment_adapter::*; use wapc_codec::messagepack::*; use wapc_guest as wapc; @@ -57,11 +57,66 @@ impl PayU { } fn create_payment(msg: &[u8]) -> wapc::CallResult { - let client = unsafe { CLIENT.as_ref().unwrap() }; let c: CreatePayment = match deserialize(msg) { Ok(c) => c, _ => return Err(Box::new(payment_adapter::Error::MalformedCreatePayment)), }; + + let CreatePayment { + client, + buyer, + customer_ip, + currency, + description, + cart_products, + mut items, + order_ext_id, + notify_uri, + continue_uri, + } = c; + + let pay_u::res::CreateOrder { + status: _, + redirect_uri, + order_id, + ext_order_id: _, + } = unsafe { RUNTIME.as_ref().unwrap() }.block_on(async { + let client = unsafe { CLIENT.as_ref().unwrap() }; + client + .create_order( + pay_u::req::OrderCreate::build( + buyer.into(), + customer_ip, + currency, + description, + ) + .map_err(|e| { + tracing::error!("{}", e); + Error::InvalidOrder + })? + .with_products(cart_products.into_iter().map(|p| { + pay_u::Product::new( + p.name.to_string(), + **p.price, + items + .remove(&p.id) + .map(|(quantity, _)| **quantity as u32) + .unwrap_or_default(), + ) + })) + .with_ext_order_id(order_ext_id) + .with_notify_url(notify_uri) + .with_continue_url(continue_uri), + ) + .await + .map_err(|e| { + tracing::error!("{}", e); + Error::PaymentFailed + }) + .unwrap() + }); + let _ = Ok((redirect_uri, ExtOrderId::new(order_id.0))); + wapc::console_log(&format!( "IN_WASM: Received request for `ping` operation with payload : {:?}", c diff --git a/crates/stock_manager/src/context.rs b/crates/stock_manager/src/context.rs index e69de29..8b13789 100644 --- a/crates/stock_manager/src/context.rs +++ b/crates/stock_manager/src/context.rs @@ -0,0 +1 @@ + diff --git a/vendor/t_pay/src/apis/cards_api_api.rs b/vendor/t_pay/src/apis/cards_api_api.rs index 4e86caf..e70ad7f 100644 --- a/vendor/t_pay/src/apis/cards_api_api.rs +++ b/vendor/t_pay/src/apis/cards_api_api.rs @@ -76,7 +76,8 @@ pub enum ApiCardsApiKeySecuresalePostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `api_cards_api_key_visacheckout_finish_post` +/// struct for typed errors of method +/// `api_cards_api_key_visacheckout_finish_post` #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ApiCardsApiKeyVisacheckoutFinishPostError { @@ -85,7 +86,8 @@ pub enum ApiCardsApiKeyVisacheckoutFinishPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `api_cards_api_key_visacheckout_prepare_post` +/// struct for typed errors of method +/// `api_cards_api_key_visacheckout_prepare_post` #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ApiCardsApiKeyVisacheckoutPreparePostError { @@ -94,7 +96,8 @@ pub enum ApiCardsApiKeyVisacheckoutPreparePostError { UnknownValue(serde_json::Value), } -/// Method, which can be used to ping our API server to establish a monitoring service on the Merchant system. +/// Method, which can be used to ping our API server to establish a monitoring +/// service on the Merchant system. pub async fn api_cards_api_key_check_post( configuration: &configuration::Configuration, api_key: &str, @@ -136,7 +139,13 @@ pub async fn api_cards_api_key_check_post( } } -/// The method used to deregister client credit card token from Tpay and Merchant system.
A client can also do it himself from the link in an email after payment.

After successful deregistration Merchant will not be able anymore to charge client's card. Tpay system sends notification about this deregistration to merchant endpoint, defined in merchant panel settings.

NOTICE: To test this method you need to generate client token and calculate sign with your own API access data. +/// The method used to deregister client credit card token from Tpay and +/// Merchant system.
A client can also do it himself from the link in an +/// email after payment.

After successful deregistration Merchant will +/// not be able anymore to charge client's card. Tpay system sends notification +/// about this deregistration to merchant endpoint, defined in merchant panel +/// settings.

NOTICE: To test this method you need to generate +/// client token and calculate sign with your own API access data. pub async fn api_cards_api_key_deregister_post( configuration: &configuration::Configuration, api_key: &str, @@ -220,7 +229,16 @@ pub async fn api_cards_api_key_presale_post( } } -/// The method used to transfer money back to the client. The refund can reference to chosen sale (sale_auth) or directly to the client (cli_auth).

In both cases, the amount is adjustable in parameter amount. If the only cli_auth is sent, the amount parameter is required. If sale_auth is passed amount and currency are not necessary - the system will take default values from the specified sale and make a full amount refund.
If you pass the amount parameter and specific sale_auth, you can create more than one refund until the sum of all refunds reach the transaction amount.

In test mode this method has 50% probability of success and the status parameter is picked randomly.
+/// The method used to transfer money back to the client. The refund can +/// reference to chosen sale (sale_auth) or directly to the client +/// (cli_auth).

In both cases, the amount is adjustable in parameter +/// amount. If the only cli_auth is sent, the amount parameter is required. If +/// sale_auth is passed amount and currency are not necessary - the system will +/// take default values from the specified sale and make a full amount +/// refund.
If you pass the amount parameter and specific sale_auth, you can +/// create more than one refund until the sum of all refunds reach the +/// transaction amount.

In test mode this method has 50% probability +/// of success and the status parameter is picked randomly.
pub async fn api_cards_api_key_refund_post( configuration: &configuration::Configuration, api_key: &str, @@ -304,7 +322,15 @@ pub async fn api_cards_api_key_register_sale_post( } } -/// The method used to execute created sale with presale method. Sale defined with sale_auth can be executed only once. If the method is called second time with the same parameters, the system returns actual sale status - in parameter status - done for correct payment and declined for rejected payment. In that case, client card is not charged the second time.

Passed cli_auth has to match with cli_auth used while creating a sale in presale method.

Test mode notice! The method will return correct status with 50% probability. The same concerns declined status. In this case, reason value is also randomly picked. +/// The method used to execute created sale with presale method. Sale defined +/// with sale_auth can be executed only once. If the method is called second +/// time with the same parameters, the system returns actual sale status - in +/// parameter status - done for correct payment and declined for rejected +/// payment. In that case, client card is not charged the second time.

+/// Passed cli_auth has to match with cli_auth used while creating a sale in +/// presale method.

Test mode notice! The method will return +/// correct status with 50% probability. The same concerns declined status. In +/// this case, reason value is also randomly picked. pub async fn api_cards_api_key_sale_post( configuration: &configuration::Configuration, api_key: &str, @@ -430,7 +456,9 @@ pub async fn api_cards_api_key_visacheckout_finish_post( } } -/// The method used to prepare Visa Checkout payment.

NOTICE: To use Visa Checkout methods, you need to have access to cards API at your account and pass Visa requirements (see Visa Checkout Integration section). +/// The method used to prepare Visa Checkout payment.

NOTICE: +/// To use Visa Checkout methods, you need to have access to cards API at your +/// account and pass Visa requirements (see Visa Checkout Integration section). pub async fn api_cards_api_key_visacheckout_prepare_post( configuration: &configuration::Configuration, api_key: &str, diff --git a/vendor/t_pay/src/apis/masspayments_api.rs b/vendor/t_pay/src/apis/masspayments_api.rs index a177fc5..1c2a2e2 100644 --- a/vendor/t_pay/src/apis/masspayments_api.rs +++ b/vendor/t_pay/src/apis/masspayments_api.rs @@ -13,7 +13,8 @@ use reqwest; use super::{configuration, Error}; use crate::apis::ResponseContent; -/// struct for typed errors of method `api_gw_api_key_masspayment_authorize_post` +/// struct for typed errors of method +/// `api_gw_api_key_masspayment_authorize_post` #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ApiGwApiKeyMasspaymentAuthorizePostError { @@ -40,7 +41,8 @@ pub enum ApiGwApiKeyMasspaymentPacksPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `api_gw_api_key_masspayment_transfers_post` +/// struct for typed errors of method +/// `api_gw_api_key_masspayment_transfers_post` #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ApiGwApiKeyMasspaymentTransfersPostError { @@ -137,7 +139,12 @@ pub async fn api_gw_api_key_masspayment_create_post( } } -/// This method allows browsing through created packages. If none of the parameters has been sent, all packages for the Merchant’s account will be returned. If any records exist, there will be pack objects in pack section representing respective transfer packages. You can send pack_id to browse contents of specific pack or send time range to browse all packages within time range +/// This method allows browsing through created packages. If none of the +/// parameters has been sent, all packages for the Merchant’s account will be +/// returned. If any records exist, there will be pack objects in pack section +/// representing respective transfer packages. You can send pack_id to browse +/// contents of specific pack or send time range to browse all packages within +/// time range pub async fn api_gw_api_key_masspayment_packs_post( configuration: &configuration::Configuration, api_key: &str, @@ -179,7 +186,10 @@ pub async fn api_gw_api_key_masspayment_packs_post( } } -/// This method allows browsing through transfers within one package. Required parameters (besides those described in mass payments main description), at least 1 is obligatory. If any records exist, there will be transfer objects in transfers section representing several transfers. +/// This method allows browsing through transfers within one package. Required +/// parameters (besides those described in mass payments main description), at +/// least 1 is obligatory. If any records exist, there will be transfer objects +/// in transfers section representing several transfers. pub async fn api_gw_api_key_masspayment_transfers_post( configuration: &configuration::Configuration, api_key: &str, diff --git a/vendor/t_pay/src/apis/mod.rs b/vendor/t_pay/src/apis/mod.rs index 7b4edf4..f780138 100644 --- a/vendor/t_pay/src/apis/mod.rs +++ b/vendor/t_pay/src/apis/mod.rs @@ -1,5 +1,4 @@ -use std::error; -use std::fmt; +use std::{error, fmt}; #[derive(Debug, Clone)] pub struct ResponseContent { diff --git a/vendor/t_pay/src/apis/transaction_api_api.rs b/vendor/t_pay/src/apis/transaction_api_api.rs index 210b1e9..8aa47ec 100644 --- a/vendor/t_pay/src/apis/transaction_api_api.rs +++ b/vendor/t_pay/src/apis/transaction_api_api.rs @@ -31,7 +31,8 @@ pub enum ApiGwApiKeyChargebackStatusPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `api_gw_api_key_chargeback_transaction_post` +/// struct for typed errors of method +/// `api_gw_api_key_chargeback_transaction_post` #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ApiGwApiKeyChargebackTransactionPostError { @@ -76,7 +77,10 @@ pub enum ApiGwApiKeyTransactionReportPostError { UnknownValue(serde_json::Value), } -/// The method used to refund part of the transaction amount.

NOTICE: This method works only in production mode!
To test this method, you need to create the transaction in production mode with your own API access. +/// The method used to refund part of the transaction amount. +///

NOTICE: This method works only in production mode!
To +/// test this method, you need to create the transaction in production mode with +/// your own API access. pub async fn api_gw_api_key_chargeback_any_post( configuration: &configuration::Configuration, api_key: &str, @@ -118,7 +122,9 @@ pub async fn api_gw_api_key_chargeback_any_post( } } -/// The method used to check transaction refunds statuses.
Some refunds statuses may be not available immediately after calling refund methods due to gathering refund details process. +/// The method used to check transaction refunds statuses.
Some refunds +/// statuses may be not available immediately after calling refund methods due +/// to gathering refund details process. pub async fn api_gw_api_key_chargeback_status_post( configuration: &configuration::Configuration, api_key: &str, @@ -160,7 +166,11 @@ pub async fn api_gw_api_key_chargeback_status_post( } } -/// The method used to refund full transaction amount. You can get transaction title from 'create' method when generating the transaction.

NOTICE: This method works only in production mode!
To test this method, you need to create the transaction in production mode with your own API access. +/// The method used to refund full transaction amount. You can get transaction +/// title from 'create' method when generating the +/// transaction.

NOTICE: This method works only in production +/// mode!
To test this method, you need to create the transaction in +/// production mode with your own API access. pub async fn api_gw_api_key_chargeback_transaction_post( configuration: &configuration::Configuration, api_key: &str, @@ -202,7 +212,18 @@ pub async fn api_gw_api_key_chargeback_transaction_post( } } -/// This method allows sending a BLIK code in direct communication between merchant and BLIK system. In ‘create’ method you should set 150 as a value for parameter ‘group’, this is a BLIK payment channel. Method returns parameter ‘result’ equal to 1 which means that payment popup has been successfully displayed at customer mobile application. After accepting payment by the customer, tpay.com system sends a standard notification to merchant's endpoint declared in wyn_url parameter (this parameter should be sent in 'create' method.)

NOTICE: to test this method, you need to create the transaction with 'create' method and replace title parameter value with the returned title.
Blik method works with the specific set of parameters depending on payment type case. Please see BLIK workflow section. +/// This method allows sending a BLIK code in direct communication between +/// merchant and BLIK system. In ‘create’ method you should set 150 as a value +/// for parameter ‘group’, this is a BLIK payment channel. Method returns +/// parameter ‘result’ equal to 1 which means that payment popup has been +/// successfully displayed at customer mobile application. After accepting +/// payment by the customer, tpay.com system sends a standard notification to +/// merchant's endpoint declared in wyn_url parameter (this parameter should be +/// sent in 'create' method.)

NOTICE: to test this method, you +/// need to create the transaction with 'create' method and replace title +/// parameter value with the returned title.
Blik method works with the +/// specific set of parameters depending on payment type case. Please see BLIK +/// workflow section. pub async fn api_gw_api_key_transaction_blik_post( configuration: &configuration::Configuration, api_key: &str, @@ -244,7 +265,10 @@ pub async fn api_gw_api_key_transaction_blik_post( } } -/// This method allows you to prepare transaction for a customer. The method returns transaction title required for other API methods and redirection link for a customer.
This method also returns account details for manual money transfers. +/// This method allows you to prepare transaction for a customer. The method +/// returns transaction title required for other API methods and redirection +/// link for a customer.
This method also returns account details for manual +/// money transfers. pub async fn api_gw_api_key_transaction_create_post( configuration: &configuration::Configuration, api_key: &str, @@ -286,7 +310,8 @@ pub async fn api_gw_api_key_transaction_create_post( } } -/// This method allows you to get all information about the transaction by sending previously generated title. +/// This method allows you to get all information about the transaction by +/// sending previously generated title. pub async fn api_gw_api_key_transaction_get_post( configuration: &configuration::Configuration, api_key: &str, diff --git a/vendor/t_pay/src/models/blik_alias.rs b/vendor/t_pay/src/models/blik_alias.rs index 55b5a1f..832f185 100644 --- a/vendor/t_pay/src/models/blik_alias.rs +++ b/vendor/t_pay/src/models/blik_alias.rs @@ -16,7 +16,8 @@ pub struct BlikAlias { /// Alias type #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub _type: Option, - /// This field should contain alias key (returned by first api call with error ERR82) in case of using non-unique alias + /// This field should contain alias key (returned by first api call with + /// error ERR82) in case of using non-unique alias #[serde(rename = "key", skip_serializing_if = "Option::is_none")] pub key: Option, } diff --git a/vendor/t_pay/src/models/blik_alias_response.rs b/vendor/t_pay/src/models/blik_alias_response.rs index 44d7982..b092287 100644 --- a/vendor/t_pay/src/models/blik_alias_response.rs +++ b/vendor/t_pay/src/models/blik_alias_response.rs @@ -8,11 +8,13 @@ * Generated by: https://openapi-generator.tech */ -/// BlikAliasResponse : Array containing list of banks associated with this alias +/// BlikAliasResponse : Array containing list of banks associated with this +/// alias #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct BlikAliasResponse { - /// Alias user friendly name saved at mobile app (blik request label parameter) + /// Alias user friendly name saved at mobile app (blik request label + /// parameter) #[serde(rename = "applicationName", skip_serializing_if = "Option::is_none")] pub application_name: Option, /// Alias key which has to be send in case of using non-unique alias diff --git a/vendor/t_pay/src/models/blik_fields.rs b/vendor/t_pay/src/models/blik_fields.rs index 8f53101..2f9cf53 100644 --- a/vendor/t_pay/src/models/blik_fields.rs +++ b/vendor/t_pay/src/models/blik_fields.rs @@ -13,16 +13,22 @@ pub struct BlikFields { /// Transaction title #[serde(rename = "title")] pub title: String, - /// 6 digit code generated in customer bank mobile app (required if customer does not have registered alias or when customer does not want to pay by regietered device). BLIK code contains only digits but can start with zero or multiple zeroes, so you must not cast this variable to int. + /// 6 digit code generated in customer bank mobile app (required if customer + /// does not have registered alias or when customer does not want to pay by + /// regietered device). BLIK code contains only digits but can start with + /// zero or multiple zeroes, so you must not cast this variable to int. #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, /// API password. #[serde(rename = "api_password")] pub api_password: String, - /// Mandatory field when creating oneClick transactions, optional for standart Blik transactions with 6 digit code. In case of alias registration attempt you can send only 1 alias per 1 request. + /// Mandatory field when creating oneClick transactions, optional for + /// standart Blik transactions with 6 digit code. In case of alias + /// registration attempt you can send only 1 alias per 1 request. #[serde(rename = "alias", skip_serializing_if = "Option::is_none")] pub alias: Option>, - /// Transaction type. 0 - WEB mode (default value). 1 - POS mode dedicated for payment terminals + /// Transaction type. 0 - WEB mode (default value). 1 - POS mode dedicated + /// for payment terminals #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub _type: Option, } diff --git a/vendor/t_pay/src/models/blik_response.rs b/vendor/t_pay/src/models/blik_response.rs index 6d1039a..aebadcc 100644 --- a/vendor/t_pay/src/models/blik_response.rs +++ b/vendor/t_pay/src/models/blik_response.rs @@ -10,7 +10,8 @@ #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct BlikResponse { - /// Attention! result: 1 does not indicate transfer of funds! This is successful user app popup indicator. + /// Attention! result: 1 does not indicate transfer of funds! This is + /// successful user app popup indicator. #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option, #[serde(rename = "availableUserApps", skip_serializing_if = "Option::is_none")] diff --git a/vendor/t_pay/src/models/cards_err_code.rs b/vendor/t_pay/src/models/cards_err_code.rs index 03b9747..4510f22 100644 --- a/vendor/t_pay/src/models/cards_err_code.rs +++ b/vendor/t_pay/src/models/cards_err_code.rs @@ -8,7 +8,8 @@ * Generated by: https://openapi-generator.tech */ -/// CardsErrCode : Error code number if an error occurs or not present in response. +/// CardsErrCode : Error code number if an error occurs or not present in +/// response. /// Error code number if an error occurs or not present in response. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] diff --git a/vendor/t_pay/src/models/create_fields.rs b/vendor/t_pay/src/models/create_fields.rs index 4e219ad..e3795e0 100644 --- a/vendor/t_pay/src/models/create_fields.rs +++ b/vendor/t_pay/src/models/create_fields.rs @@ -13,16 +13,21 @@ pub struct CreateFields { /// Merchant ID in Tpay.com system #[serde(rename = "id")] pub id: i32, - /// Transaction amount. Please always send the amount with two decimal places like 10.00 + /// Transaction amount. Please always send the amount with two decimal + /// places like 10.00 #[serde(rename = "amount")] pub amount: f32, /// Transaction description #[serde(rename = "description")] pub description: String, - /// Auxiliary parameter to identify the transaction on the merchant side. We do recommend to encode your crc value in base64. The exact value of crc used to create transaction will be returned in tpay payment notification as tr_crc parameter. + /// Auxiliary parameter to identify the transaction on the merchant side. We + /// do recommend to encode your crc value in base64. The exact value of crc + /// used to create transaction will be returned in tpay payment notification + /// as tr_crc parameter. #[serde(rename = "crc", skip_serializing_if = "Option::is_none")] pub crc: Option, - /// md5 sum calculated from id.'&'.amount.'&'.crc.'&'.security_code where dots means concatenation (security code can be found in merchant panel). + /// md5 sum calculated from id.'&'.amount.'&'.crc.'&'.security_code where + /// dots means concatenation (security code can be found in merchant panel). #[serde(rename = "md5sum")] pub md5sum: String, /// Transaction group number see the \"id\" element in https://secure.tpay.com/groups-{id}0.js . For example https://secure.tpay.com/groups-10100.js or https://secure.tpay.com/groups-10100.js?json @@ -31,16 +36,20 @@ pub struct CreateFields { /// Merchant endpoint for payment notification #[serde(rename = "result_url", skip_serializing_if = "Option::is_none")] pub result_url: Option, - /// Email address where notification after payment will be sent (overrides defined in merchant panel). You can add more addresses by comma concatenation. + /// Email address where notification after payment will be sent (overrides + /// defined in merchant panel). You can add more addresses by comma + /// concatenation. #[serde(rename = "result_email", skip_serializing_if = "Option::is_none")] pub result_email: Option, - /// Name of merchant displayed in transaction panel (overrides defined in merchant panel) + /// Name of merchant displayed in transaction panel (overrides defined in + /// merchant panel) #[serde( rename = "merchant_description", skip_serializing_if = "Option::is_none" )] pub merchant_description: Option, - /// Additional info to be displayed in transaction panel (overrides defined in merchant panel) + /// Additional info to be displayed in transaction panel (overrides defined + /// in merchant panel) #[serde(rename = "custom_description", skip_serializing_if = "Option::is_none")] pub custom_description: Option, /// url to redirect customer in case of payment success @@ -58,19 +67,23 @@ pub struct CreateFields { /// customer name #[serde(rename = "name")] pub name: String, - /// customer address (parameter is empty if this field was not send with create method) + /// customer address (parameter is empty if this field was not send with + /// create method) #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, - /// customer city (parameter is empty if this field was not send with create method) + /// customer city (parameter is empty if this field was not send with create + /// method) #[serde(rename = "city", skip_serializing_if = "Option::is_none")] pub city: Option, - /// customer postal code (parameter is empty if this field was not send with create method) + /// customer postal code (parameter is empty if this field was not send with + /// create method) #[serde(rename = "zip", skip_serializing_if = "Option::is_none")] pub zip: Option, /// Two letters - see ISO 3166-1 document #[serde(rename = "country", skip_serializing_if = "Option::is_none")] pub country: Option, - /// customer phone number (parameter is empty if this field was not send with create method) + /// customer phone number (parameter is empty if this field was not send + /// with create method) #[serde(rename = "phone", skip_serializing_if = "Option::is_none")] pub phone: Option, /// Acceptance of Tpay.com regulations done by customer on Merchant site diff --git a/vendor/t_pay/src/models/deregister_fields.rs b/vendor/t_pay/src/models/deregister_fields.rs index 199d751..0a5cfb6 100644 --- a/vendor/t_pay/src/models/deregister_fields.rs +++ b/vendor/t_pay/src/models/deregister_fields.rs @@ -18,7 +18,10 @@ pub struct DeregisterFields { /// 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 + language + verification code) where + means concatenation with ampersand symbol. ie. cli_auth + language = t59c2810d59285e3e0ee9d1f1eda1c2f4c554e24&pl + /// Sign is calculated from cryptographic hash function set in Merchant’s + /// Panel (default SHA-1): hash_alg (method + cli_auth + language + + /// verification code) where + means concatenation with ampersand symbol. + /// ie. cli_auth + language = t59c2810d59285e3e0ee9d1f1eda1c2f4c554e24&pl #[serde(rename = "sign")] pub sign: String, } diff --git a/vendor/t_pay/src/models/get_response.rs b/vendor/t_pay/src/models/get_response.rs index a7947eb..6a0bcb8 100644 --- a/vendor/t_pay/src/models/get_response.rs +++ b/vendor/t_pay/src/models/get_response.rs @@ -14,7 +14,9 @@ pub struct GetResponse { pub result: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, - /// Depending on setting in merchant panel, error_code may be different than none for correct status, when acceptance of overpays and surcharges has been set. + /// Depending on setting in merchant panel, error_code may be different than + /// none for correct status, when acceptance of overpays and surcharges has + /// been set. #[serde(rename = "error_code", skip_serializing_if = "Option::is_none")] pub error_code: Option, /// Transaction creation time @@ -26,7 +28,8 @@ pub struct GetResponse { /// Date of payment refund or empty for not refunded transactions #[serde(rename = "chargeback_time", skip_serializing_if = "Option::is_none")] pub chargeback_time: Option, - /// Payment channel ID can be recognised in merchant panel (your offer section) + /// Payment channel ID can be recognised in merchant panel (your offer + /// section) #[serde(rename = "channel", skip_serializing_if = "Option::is_none")] pub channel: Option, /// Returns 1 if transaction was in test mode @@ -44,16 +47,20 @@ pub struct GetResponse { /// customer email #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, - /// customer address (parameter is empty if this field was not send with create method) + /// customer address (parameter is empty if this field was not send with + /// create method) #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, - /// customer postal code (parameter is empty if this field was not send with create method) + /// customer postal code (parameter is empty if this field was not send with + /// create method) #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, - /// customer city (parameter is empty if this field was not send with create method) + /// customer city (parameter is empty if this field was not send with create + /// method) #[serde(rename = "city", skip_serializing_if = "Option::is_none")] pub city: Option, - /// customer phone number (parameter is empty if this field was not send with create method) + /// customer phone number (parameter is empty if this field was not send + /// with create method) #[serde(rename = "phone", skip_serializing_if = "Option::is_none")] pub phone: Option, /// Two letters - see ISO 3166-1 document @@ -61,7 +68,8 @@ pub struct GetResponse { pub country: Option, #[serde(rename = "err", skip_serializing_if = "Option::is_none")] pub err: Option, - /// List of payment attempts. Currently is returned only for BLIK payment method + /// List of payment attempts. Currently is returned only for BLIK payment + /// method #[serde(rename = "paymentAttempts", skip_serializing_if = "Option::is_none")] pub payment_attempts: Option>, } @@ -106,7 +114,9 @@ pub enum Status { #[serde(rename = "chargeback")] Chargeback, } -/// Depending on setting in merchant panel, error_code may be different than none for correct status, when acceptance of overpays and surcharges has been set. +/// Depending on setting in merchant panel, error_code may be different than +/// none for correct status, when acceptance of overpays and surcharges has been +/// set. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ErrorCode { #[serde(rename = "none")] diff --git a/vendor/t_pay/src/models/masspayment_create_fields.rs b/vendor/t_pay/src/models/masspayment_create_fields.rs index 050d3ca..feb64a6 100644 --- a/vendor/t_pay/src/models/masspayment_create_fields.rs +++ b/vendor/t_pay/src/models/masspayment_create_fields.rs @@ -10,13 +10,18 @@ #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct MasspaymentCreateFields { - /// Transfers list encoded with base64. Format has been described in metchod description + /// Transfers list encoded with base64. Format has been described in metchod + /// description #[serde(rename = "csv")] pub csv: String, /// API password. #[serde(rename = "api_password")] pub api_password: String, - /// Checksum to verify parameters received from Merchant. Generated according to outline below using SHA1 function: SHA1(seller_id + transfers list (before encrypting in base64) + Merchant confirmation code) Implementing checksum in PHP: sha1($seller_id. $csv . $confirmation_code) + /// Checksum to verify parameters received from Merchant. Generated + /// according to outline below using SHA1 function: SHA1(seller_id + + /// transfers list (before encrypting in base64) + Merchant confirmation + /// code) Implementing checksum in PHP: sha1($seller_id. $csv . + /// $confirmation_code) #[serde(rename = "sign")] pub sign: String, } diff --git a/vendor/t_pay/src/models/masspayment_create_response.rs b/vendor/t_pay/src/models/masspayment_create_response.rs index 0d6587f..d5b1341 100644 --- a/vendor/t_pay/src/models/masspayment_create_response.rs +++ b/vendor/t_pay/src/models/masspayment_create_response.rs @@ -21,7 +21,9 @@ pub struct MasspaymentCreateResponse { /// ID of created pack using method create. #[serde(rename = "pack_id", skip_serializing_if = "Option::is_none")] pub pack_id: Option, - /// Field visible if transfersID has been sent (see chap. \"Exemplary CSV file\") in JSON format as following: ID in transfer : ID of transfers in tpay.com system. This allows tracking single transfers. + /// Field visible if transfersID has been sent (see chap. \"Exemplary CSV + /// file\") in JSON format as following: ID in transfer : ID of transfers in + /// tpay.com system. This allows tracking single transfers. #[serde(rename = "referers", skip_serializing_if = "Option::is_none")] pub referers: Option, #[serde(rename = "error", skip_serializing_if = "Option::is_none")] diff --git a/vendor/t_pay/src/models/onetimer.rs b/vendor/t_pay/src/models/onetimer.rs index 88cffc4..80a0a28 100644 --- a/vendor/t_pay/src/models/onetimer.rs +++ b/vendor/t_pay/src/models/onetimer.rs @@ -8,9 +8,13 @@ * Generated by: https://openapi-generator.tech */ -/// Onetimer : Defines if customer wants to save his card for future use. If this parameter is sent, there will be no cli_auth parameter sent in system notificaion (see presale method) +/// Onetimer : Defines if customer wants to save his card for future use. If +/// this parameter is sent, there will be no cli_auth parameter sent in system +/// notificaion (see presale method) -/// Defines if customer wants to save his card for future use. If this parameter is sent, there will be no cli_auth parameter sent in system notificaion (see presale method) +/// Defines if customer wants to save his card for future use. If this parameter +/// is sent, there will be no cli_auth parameter sent in system notificaion (see +/// presale method) #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Onetimer { #[serde(rename = "1")] diff --git a/vendor/t_pay/src/models/payment_attempts.rs b/vendor/t_pay/src/models/payment_attempts.rs index f518b71..d6c4c21 100644 --- a/vendor/t_pay/src/models/payment_attempts.rs +++ b/vendor/t_pay/src/models/payment_attempts.rs @@ -13,7 +13,8 @@ pub struct PaymentAttempts { /// Time of payment attempt #[serde(rename = "date", skip_serializing_if = "Option::is_none")] pub date: Option, - /// Error code if any occurred. Null if payment was successful. See Transaction API error codes for more details. + /// Error code if any occurred. Null if payment was successful. See + /// Transaction API error codes for more details. #[serde(rename = "paymentErrorCode", skip_serializing_if = "Option::is_none")] pub payment_error_code: Option, } @@ -27,7 +28,8 @@ impl PaymentAttempts { } } -/// Error code if any occurred. Null if payment was successful. See Transaction API error codes for more details. +/// Error code if any occurred. Null if payment was successful. See Transaction +/// API error codes for more details. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PaymentErrorCode { #[serde(rename = "ERR100")] diff --git a/vendor/t_pay/src/models/presale_fields.rs b/vendor/t_pay/src/models/presale_fields.rs index a134d1b..0cde67a 100644 --- a/vendor/t_pay/src/models/presale_fields.rs +++ b/vendor/t_pay/src/models/presale_fields.rs @@ -22,7 +22,10 @@ pub struct PresaleFields { /// 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 + /// 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 diff --git a/vendor/t_pay/src/models/refund_fields.rs b/vendor/t_pay/src/models/refund_fields.rs index f3cd399..9ef94cf 100644 --- a/vendor/t_pay/src/models/refund_fields.rs +++ b/vendor/t_pay/src/models/refund_fields.rs @@ -29,7 +29,10 @@ pub struct RefundFields { /// 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 + sale_auth + desc + amount + currency + language + verification code); where + means concatenation with ampersand symbol. ie. currency + language = 985&pl + /// Sign is calculated from cryptographic hash function set in Merchant’s + /// Panel (default SHA-1): hash_alg (method + cli_auth + sale_auth + desc + + /// amount + currency + language + verification code); where + means + /// concatenation with ampersand symbol. ie. currency + language = 985&pl #[serde(rename = "sign")] pub sign: String, } diff --git a/vendor/t_pay/src/models/refund_response.rs b/vendor/t_pay/src/models/refund_response.rs index d46a9b7..db0f5cf 100644 --- a/vendor/t_pay/src/models/refund_response.rs +++ b/vendor/t_pay/src/models/refund_response.rs @@ -12,7 +12,8 @@ pub struct RefundResponse { #[serde(rename = "result")] pub result: crate::models::Result, - /// This parameter is present in response and included in sign calculation only when the merchant account is in test mode. + /// This parameter is present in response and included in sign calculation + /// only when the merchant account is in test mode. #[serde(rename = "test_mode", skip_serializing_if = "Option::is_none")] pub test_mode: Option, /// Transaction id in tpay.com system @@ -31,10 +32,13 @@ pub struct RefundResponse { pub date: Option, #[serde(rename = "status")] pub status: Status, - /// Acquirer (Elavon / eService) rejection code - see \"Card Payments Rejection Codes\" for more details + /// Acquirer (Elavon / eService) rejection code - see \"Card Payments + /// Rejection Codes\" for more details #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] pub reason: Option, - /// Response sign = hash_alg(test_mode + sale_auth + sale_ref + order_id + cli_auth + card + currency + amount + date + status + reason + verification code). + /// Response sign = hash_alg(test_mode + sale_auth + sale_ref + order_id + + /// cli_auth + card + currency + amount + date + status + reason + + /// verification code). #[serde(rename = "sign")] pub sign: String, #[serde(rename = "card", skip_serializing_if = "Option::is_none")] diff --git a/vendor/t_pay/src/models/register_sale_fields.rs b/vendor/t_pay/src/models/register_sale_fields.rs index ae28dba..082ac68 100644 --- a/vendor/t_pay/src/models/register_sale_fields.rs +++ b/vendor/t_pay/src/models/register_sale_fields.rs @@ -25,7 +25,11 @@ pub struct RegisterSaleFields { /// 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): sha1(method + name + email + desc + amount + currency + order_id + onetimer + language + verification code) where + means concatenation with ampersand symbol. ie. name + email = john done&john.doe@example.com + /// Sign is calculated from cryptographic hash function set in Merchant’s + /// Panel (default SHA-1): sha1(method + name + email + desc + amount + + /// currency + order_id + onetimer + language + verification code) where + + /// means concatenation with ampersand symbol. ie. name + email = john + /// done&john.doe@example.com #[serde(rename = "sign")] pub sign: String, /// transaction currency in ISO numeric format diff --git a/vendor/t_pay/src/models/register_sale_response.rs b/vendor/t_pay/src/models/register_sale_response.rs index 65ee95e..0a1ae04 100644 --- a/vendor/t_pay/src/models/register_sale_response.rs +++ b/vendor/t_pay/src/models/register_sale_response.rs @@ -17,12 +17,15 @@ pub struct RegisterSaleResponse { /// Transaction id in tpay.com system #[serde(rename = "sale_auth", skip_serializing_if = "Option::is_none")] pub sale_auth: Option, - /// Sign is calculated from cryptographic hash function set in Merchant’s Panel (default SHA-1): sha1(sale_auth + verification code) where + means concatenation. + /// Sign is calculated from cryptographic hash function set in Merchant’s + /// Panel (default SHA-1): sha1(sale_auth + verification code) where + means + /// concatenation. #[serde(rename = "sign", skip_serializing_if = "Option::is_none")] pub sign: Option, #[serde(rename = "err_code", skip_serializing_if = "Option::is_none")] pub err_code: Option, - /// Error code description if an error occurs or not present in response. - see \"Card Payments Rejection Codes\" for more details + /// Error code description if an error occurs or not present in response. - + /// see \"Card Payments Rejection Codes\" for more details #[serde(rename = "err_desc", skip_serializing_if = "Option::is_none")] pub err_desc: Option, } diff --git a/vendor/t_pay/src/models/report_response.rs b/vendor/t_pay/src/models/report_response.rs index cadbc1e..664aacb 100644 --- a/vendor/t_pay/src/models/report_response.rs +++ b/vendor/t_pay/src/models/report_response.rs @@ -12,7 +12,16 @@ pub struct ReportResponse { #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option, - /// Report content encoded in base64. Characters encoding is UTF8. After decoding the report you will get:
(header[NL], empty line[NL], columns description[NL], transactions list, each in new line, where [NL] is a new line indicator): Summary of transactions and refunds sorted by dates
LP;Transaction ID;Transaction amount;Paid amount;commission %;flat commission; commission taken;Transaction CRC;Transaction description;Payment date;Refund date;E-mail;Customer name;Address;Postal code;City;Country;Phone;Additional description (Acquirer (Elavon / eService));RRN (Acquirer (Elavon / eService))
Columns are separated by ; (semicolon). + /// Report content encoded in base64. Characters encoding is UTF8. After + /// decoding the report you will get:
(header[NL], empty line[NL], + /// columns description[NL], transactions list, each in new line, where [NL] + /// is a new line indicator): Summary of transactions and refunds sorted by + /// dates
LP;Transaction ID;Transaction amount;Paid amount;commission + /// %;flat commission; commission taken;Transaction CRC;Transaction + /// description;Payment date;Refund date;E-mail;Customer name;Address;Postal + /// code;City;Country;Phone;Additional description (Acquirer (Elavon / + /// eService));RRN (Acquirer (Elavon / eService))
Columns are + /// separated by ; (semicolon). #[serde(rename = "report", skip_serializing_if = "Option::is_none")] pub report: Option, #[serde(rename = "err", skip_serializing_if = "Option::is_none")] diff --git a/vendor/t_pay/src/models/sale_fields.rs b/vendor/t_pay/src/models/sale_fields.rs index cf3762c..4bc4927 100644 --- a/vendor/t_pay/src/models/sale_fields.rs +++ b/vendor/t_pay/src/models/sale_fields.rs @@ -19,7 +19,12 @@ pub struct SaleFields { /// API password. #[serde(rename = "api_password")] pub api_password: String, - /// Request sign is calculated from cryptographic hash function set in Merchant’s Panel (default SHA-1): hash_alg (method + cli_auth + sale_auth + verification code); where + means concatenation with ampersand symbol. ie. name + email = john done&john.doe@example.com. Passed cli_auth has to match with cli_auth used while creating sale in presale method. + /// Request sign is calculated from cryptographic hash function set in + /// Merchant’s Panel (default SHA-1): hash_alg (method + cli_auth + + /// sale_auth + verification code); where + means concatenation with + /// ampersand symbol. ie. name + email = john done&john.doe@example.com. + /// Passed cli_auth has to match with cli_auth used while creating sale in + /// presale method. #[serde(rename = "sign")] pub sign: String, } diff --git a/vendor/t_pay/src/models/sale_response.rs b/vendor/t_pay/src/models/sale_response.rs index eaffa3e..1c27a17 100644 --- a/vendor/t_pay/src/models/sale_response.rs +++ b/vendor/t_pay/src/models/sale_response.rs @@ -12,7 +12,8 @@ pub struct SaleResponse { #[serde(rename = "result")] pub result: crate::models::Result, - /// This parameter is present in response and included in sign calculation only when the merchant account is in test mode. + /// This parameter is present in response and included in sign calculation + /// only when the merchant account is in test mode. #[serde(rename = "test_mode", skip_serializing_if = "Option::is_none")] pub test_mode: Option, /// Transaction id in tpay.com system @@ -32,10 +33,12 @@ pub struct SaleResponse { pub date: Option, #[serde(rename = "status")] pub status: Status, - /// Acquirer (Elavon / eService) rejection code - see \"Card Payments Rejection Codes\" for more details + /// Acquirer (Elavon / eService) rejection code - see \"Card Payments + /// Rejection Codes\" for more details #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] pub reason: Option, - /// Response sign = hash_alg(test_mode + sale_auth + cli_auth + currency + amount + date + status + reason + verification code) + /// Response sign = hash_alg(test_mode + sale_auth + cli_auth + currency + + /// amount + date + status + reason + verification code) #[serde(rename = "sign")] pub sign: String, } diff --git a/vendor/t_pay/src/models/securesale_fields.rs b/vendor/t_pay/src/models/securesale_fields.rs index f2dc4fe..0c8adc9 100644 --- a/vendor/t_pay/src/models/securesale_fields.rs +++ b/vendor/t_pay/src/models/securesale_fields.rs @@ -25,7 +25,11 @@ pub struct SecuresaleFields { /// API password. #[serde(rename = "api_password")] pub api_password: String, - /// Sign is calculated from cryptographic hash function set in Merchant panel (default SHA-1) hash_alg (method + card + name + email + desc + amount + currency + order_id + onetimer + language + enable_pow_url + verification code) where + means concatenation with ampersand symbol. ie. name + email = john done&john.doe@example.com + /// Sign is calculated from cryptographic hash function set in Merchant + /// panel (default SHA-1) hash_alg (method + card + name + email + desc + + /// amount + currency + order_id + onetimer + language + enable_pow_url + + /// verification code) where + means concatenation with ampersand symbol. + /// ie. name + email = john done&john.doe@example.com #[serde(rename = "sign")] pub sign: String, /// transaction currency in ISO numeric format diff --git a/vendor/t_pay/src/models/securesale_response.rs b/vendor/t_pay/src/models/securesale_response.rs index 8936ac1..43ba7e4 100644 --- a/vendor/t_pay/src/models/securesale_response.rs +++ b/vendor/t_pay/src/models/securesale_response.rs @@ -14,7 +14,8 @@ pub struct SecuresaleResponse { pub var_3ds_url: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option, - /// This parameter is present in response and included in sign calculation only when the merchant account is in test mode. + /// This parameter is present in response and included in sign calculation + /// only when the merchant account is in test mode. #[serde(rename = "test_mode", skip_serializing_if = "Option::is_none")] pub test_mode: Option, /// Transaction id in tpay.com system @@ -34,18 +35,22 @@ pub struct SecuresaleResponse { pub date: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, - /// Acquirer (Elavon / eService) rejection code - see \"Card Payments Rejection Codes\" for more details + /// Acquirer (Elavon / eService) rejection code - see \"Card Payments + /// Rejection Codes\" for more details #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] pub reason: Option, /// Card number last 4 digits - for example ****1234 #[serde(rename = "card", skip_serializing_if = "Option::is_none")] pub card: Option, - /// sign is calculated from cryptographic hash function set in Merchant panel (default SHA-1) hash_alg(test_mode + sale_auth + cli_auth + card + currency + amount + date + status + verification code) + /// sign is calculated from cryptographic hash function set in Merchant + /// panel (default SHA-1) hash_alg(test_mode + sale_auth + cli_auth + card + + /// currency + amount + date + status + verification code) #[serde(rename = "sign", skip_serializing_if = "Option::is_none")] pub sign: Option, #[serde(rename = "err_code", skip_serializing_if = "Option::is_none")] pub err_code: Option, - /// Error code description if an error occurs or not present in response. - see \"Card Payments Rejection Codes\" for more details + /// Error code description if an error occurs or not present in response. - + /// see \"Card Payments Rejection Codes\" for more details #[serde(rename = "err_desc", skip_serializing_if = "Option::is_none")] pub err_desc: Option, } diff --git a/vendor/t_pay/src/models/transaction_error_codes.rs b/vendor/t_pay/src/models/transaction_error_codes.rs index e3ef5aa..d96b499 100644 --- a/vendor/t_pay/src/models/transaction_error_codes.rs +++ b/vendor/t_pay/src/models/transaction_error_codes.rs @@ -8,7 +8,8 @@ * Generated by: https://openapi-generator.tech */ -/// TransactionErrorCodes : error code (see transaction errors description table) +/// TransactionErrorCodes : error code (see transaction errors description +/// table) /// error code (see transaction errors description table) #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] diff --git a/vendor/t_pay/src/models/transfers_object.rs b/vendor/t_pay/src/models/transfers_object.rs index 8abd7c6..ad6709f 100644 --- a/vendor/t_pay/src/models/transfers_object.rs +++ b/vendor/t_pay/src/models/transfers_object.rs @@ -8,7 +8,8 @@ * Generated by: https://openapi-generator.tech */ -/// TransfersObject : Each transfer object represents one transfer within specific transfers pack. +/// TransfersObject : Each transfer object represents one transfer within +/// specific transfers pack. #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct TransfersObject { @@ -54,7 +55,8 @@ pub struct TransfersObject { } impl TransfersObject { - /// Each transfer object represents one transfer within specific transfers pack. + /// Each transfer object represents one transfer within specific transfers + /// pack. pub fn new() -> TransfersObject { TransfersObject { date: None, diff --git a/vendor/t_pay/src/models/vc_prepare_fields.rs b/vendor/t_pay/src/models/vc_prepare_fields.rs index abddfcd..95de2ac 100644 --- a/vendor/t_pay/src/models/vc_prepare_fields.rs +++ b/vendor/t_pay/src/models/vc_prepare_fields.rs @@ -18,7 +18,9 @@ pub struct VcPrepareFields { pub call_id: String, #[serde(rename = "language", skip_serializing_if = "Option::is_none")] pub language: Option, - /// Sign is calculated from cryptographic hash function set in Merchant’s Panel (default SHA-1): hash_alg (method + call_id + language + verification code) where + means concatenation. + /// Sign is calculated from cryptographic hash function set in Merchant’s + /// Panel (default SHA-1): hash_alg (method + call_id + language + + /// verification code) where + means concatenation. #[serde(rename = "sign")] pub sign: String, }