FMT and start implement create payment
This commit is contained in:
parent
940983d3f7
commit
9ea21c3276
17
README.md
17
README.md
@ -3,3 +3,20 @@
|
||||
### Order life cycle
|
||||
|
||||
<img src="./assets/order-lifecycle.svg" alt="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
|
||||
```
|
||||
|
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1 @@
|
||||
|
@ -1,10 +1,10 @@
|
||||
use config::UpdateConfig;
|
||||
|
||||
mod actions;
|
||||
mod context;
|
||||
mod db;
|
||||
mod mqtt;
|
||||
mod rpc;
|
||||
mod context;
|
||||
|
||||
pub struct Opts {}
|
||||
|
||||
|
1
crates/payment_adapter_pay_u/Cargo.lock
generated
1
crates/payment_adapter_pay_u/Cargo.lock
generated
@ -830,6 +830,7 @@ dependencies = [
|
||||
"pay_u",
|
||||
"payment_adapter",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"wapc-codec",
|
||||
"wapc-guest",
|
||||
]
|
||||
|
@ -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" }
|
||||
|
@ -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
|
||||
|
@ -0,0 +1 @@
|
||||
|
42
vendor/t_pay/src/apis/cards_api_api.rs
vendored
42
vendor/t_pay/src/apis/cards_api_api.rs
vendored
@ -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.<br/>A client can also do it himself from the link in an email after payment.<br/><br/>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.<br/><br/><b>NOTICE:</b> 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.<br/>A client can also do it himself from the link in an
|
||||
/// email after payment.<br/><br/>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.<br/><br/><b>NOTICE:</b> 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).<br/><br/> 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.<br/>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. <br><br/> In test mode this method has 50% probability of success and the status parameter is picked randomly. <br/>
|
||||
/// 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).<br/><br/> 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.<br/>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. <br><br/> In test mode this method has 50% probability
|
||||
/// of success and the status parameter is picked randomly. <br/>
|
||||
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. <br><br> Passed cli_auth has to match with cli_auth used while creating a sale in presale method. <br><br><b>Test mode notice!</b> 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. <br><br>
|
||||
/// Passed cli_auth has to match with cli_auth used while creating a sale in
|
||||
/// presale method. <br><br><b>Test mode notice!</b> 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. <br/><br/><b>NOTICE:</b> 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. <br/><br/><b>NOTICE:</b>
|
||||
/// 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,
|
||||
|
18
vendor/t_pay/src/apis/masspayments_api.rs
vendored
18
vendor/t_pay/src/apis/masspayments_api.rs
vendored
@ -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,
|
||||
|
3
vendor/t_pay/src/apis/mod.rs
vendored
3
vendor/t_pay/src/apis/mod.rs
vendored
@ -1,5 +1,4 @@
|
||||
use std::error;
|
||||
use std::fmt;
|
||||
use std::{error, fmt};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ResponseContent<T> {
|
||||
|
39
vendor/t_pay/src/apis/transaction_api_api.rs
vendored
39
vendor/t_pay/src/apis/transaction_api_api.rs
vendored
@ -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. <br/><br/><b>NOTICE:</b> This method works only in production mode!<br/>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.
|
||||
/// <br/><br/><b>NOTICE:</b> This method works only in production mode!<br/>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.<br/>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.<br/>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.<br/><br/><b>NOTICE:</b> This method works only in production mode!<br/>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.<br/><br/><b>NOTICE:</b> This method works only in production
|
||||
/// mode!<br/>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.)<br/><br/><b>NOTICE:</b> to test this method, you need to create the transaction with 'create' method and replace title parameter value with the returned title.<br/>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.)<br/><br/><b>NOTICE:</b> to test this method, you
|
||||
/// need to create the transaction with 'create' method and replace title
|
||||
/// parameter value with the returned title.<br/>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.<br/>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.<br/>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,
|
||||
|
3
vendor/t_pay/src/models/blik_alias.rs
vendored
3
vendor/t_pay/src/models/blik_alias.rs
vendored
@ -16,7 +16,8 @@ pub struct BlikAlias {
|
||||
/// Alias type
|
||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||
pub _type: Option<Type>,
|
||||
/// 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<String>,
|
||||
}
|
||||
|
@ -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<String>,
|
||||
/// Alias key which has to be send in case of using non-unique alias
|
||||
|
12
vendor/t_pay/src/models/blik_fields.rs
vendored
12
vendor/t_pay/src/models/blik_fields.rs
vendored
@ -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<String>,
|
||||
/// 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<Vec<crate::models::BlikAlias>>,
|
||||
/// 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<i32>,
|
||||
}
|
||||
|
3
vendor/t_pay/src/models/blik_response.rs
vendored
3
vendor/t_pay/src/models/blik_response.rs
vendored
@ -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<i32>,
|
||||
#[serde(rename = "availableUserApps", skip_serializing_if = "Option::is_none")]
|
||||
|
3
vendor/t_pay/src/models/cards_err_code.rs
vendored
3
vendor/t_pay/src/models/cards_err_code.rs
vendored
@ -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)]
|
||||
|
33
vendor/t_pay/src/models/create_fields.rs
vendored
33
vendor/t_pay/src/models/create_fields.rs
vendored
@ -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<String>,
|
||||
/// 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<String>,
|
||||
/// 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<String>,
|
||||
/// 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<String>,
|
||||
/// 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<String>,
|
||||
/// 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<String>,
|
||||
/// 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<String>,
|
||||
/// 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<String>,
|
||||
/// Two letters - see ISO 3166-1 document
|
||||
#[serde(rename = "country", skip_serializing_if = "Option::is_none")]
|
||||
pub country: Option<String>,
|
||||
/// 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<String>,
|
||||
/// Acceptance of Tpay.com regulations done by customer on Merchant site
|
||||
|
5
vendor/t_pay/src/models/deregister_fields.rs
vendored
5
vendor/t_pay/src/models/deregister_fields.rs
vendored
@ -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,
|
||||
}
|
||||
|
26
vendor/t_pay/src/models/get_response.rs
vendored
26
vendor/t_pay/src/models/get_response.rs
vendored
@ -14,7 +14,9 @@ pub struct GetResponse {
|
||||
pub result: Option<crate::models::Result>,
|
||||
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
|
||||
pub status: Option<Status>,
|
||||
/// 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<ErrorCode>,
|
||||
/// 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<String>,
|
||||
/// 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<i32>,
|
||||
/// 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<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<String>,
|
||||
/// 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<String>,
|
||||
/// 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<String>,
|
||||
/// 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<String>,
|
||||
/// Two letters - see ISO 3166-1 document
|
||||
@ -61,7 +68,8 @@ pub struct GetResponse {
|
||||
pub country: Option<String>,
|
||||
#[serde(rename = "err", skip_serializing_if = "Option::is_none")]
|
||||
pub err: Option<crate::models::TransactionErrorCodes>,
|
||||
/// 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<Vec<crate::models::PaymentAttempts>>,
|
||||
}
|
||||
@ -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")]
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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<i32>,
|
||||
/// 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<String>,
|
||||
#[serde(rename = "error", skip_serializing_if = "Option::is_none")]
|
||||
|
8
vendor/t_pay/src/models/onetimer.rs
vendored
8
vendor/t_pay/src/models/onetimer.rs
vendored
@ -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")]
|
||||
|
6
vendor/t_pay/src/models/payment_attempts.rs
vendored
6
vendor/t_pay/src/models/payment_attempts.rs
vendored
@ -13,7 +13,8 @@ pub struct PaymentAttempts {
|
||||
/// Time of payment attempt
|
||||
#[serde(rename = "date", skip_serializing_if = "Option::is_none")]
|
||||
pub date: Option<String>,
|
||||
/// 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<PaymentErrorCode>,
|
||||
}
|
||||
@ -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")]
|
||||
|
5
vendor/t_pay/src/models/presale_fields.rs
vendored
5
vendor/t_pay/src/models/presale_fields.rs
vendored
@ -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
|
||||
|
5
vendor/t_pay/src/models/refund_fields.rs
vendored
5
vendor/t_pay/src/models/refund_fields.rs
vendored
@ -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,
|
||||
}
|
||||
|
10
vendor/t_pay/src/models/refund_response.rs
vendored
10
vendor/t_pay/src/models/refund_response.rs
vendored
@ -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<String>,
|
||||
/// Transaction id in tpay.com system
|
||||
@ -31,10 +32,13 @@ pub struct RefundResponse {
|
||||
pub date: Option<String>,
|
||||
#[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<String>,
|
||||
/// 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")]
|
||||
|
@ -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
|
||||
|
@ -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<String>,
|
||||
/// 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<String>,
|
||||
#[serde(rename = "err_code", skip_serializing_if = "Option::is_none")]
|
||||
pub err_code: Option<crate::models::CardsErrCode>,
|
||||
/// 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<String>,
|
||||
}
|
||||
|
11
vendor/t_pay/src/models/report_response.rs
vendored
11
vendor/t_pay/src/models/report_response.rs
vendored
@ -12,7 +12,16 @@
|
||||
pub struct ReportResponse {
|
||||
#[serde(rename = "result", skip_serializing_if = "Option::is_none")]
|
||||
pub result: Option<crate::models::Result>,
|
||||
/// Report content encoded in base64. Characters encoding is UTF8. After decoding the report you will get: <br> (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<br/> 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)) <br/> Columns are separated by ; (semicolon).
|
||||
/// Report content encoded in base64. Characters encoding is UTF8. After
|
||||
/// decoding the report you will get: <br> (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<br/> 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)) <br/> Columns are
|
||||
/// separated by ; (semicolon).
|
||||
#[serde(rename = "report", skip_serializing_if = "Option::is_none")]
|
||||
pub report: Option<String>,
|
||||
#[serde(rename = "err", skip_serializing_if = "Option::is_none")]
|
||||
|
7
vendor/t_pay/src/models/sale_fields.rs
vendored
7
vendor/t_pay/src/models/sale_fields.rs
vendored
@ -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,
|
||||
}
|
||||
|
9
vendor/t_pay/src/models/sale_response.rs
vendored
9
vendor/t_pay/src/models/sale_response.rs
vendored
@ -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<String>,
|
||||
/// Transaction id in tpay.com system
|
||||
@ -32,10 +33,12 @@ pub struct SaleResponse {
|
||||
pub date: Option<String>,
|
||||
#[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<String>,
|
||||
/// 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,
|
||||
}
|
||||
|
6
vendor/t_pay/src/models/securesale_fields.rs
vendored
6
vendor/t_pay/src/models/securesale_fields.rs
vendored
@ -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
|
||||
|
13
vendor/t_pay/src/models/securesale_response.rs
vendored
13
vendor/t_pay/src/models/securesale_response.rs
vendored
@ -14,7 +14,8 @@ pub struct SecuresaleResponse {
|
||||
pub var_3ds_url: Option<String>,
|
||||
#[serde(rename = "result", skip_serializing_if = "Option::is_none")]
|
||||
pub result: Option<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<String>,
|
||||
/// Transaction id in tpay.com system
|
||||
@ -34,18 +35,22 @@ pub struct SecuresaleResponse {
|
||||
pub date: Option<String>,
|
||||
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
|
||||
pub status: Option<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<String>,
|
||||
/// Card number last 4 digits - for example ****1234
|
||||
#[serde(rename = "card", skip_serializing_if = "Option::is_none")]
|
||||
pub card: Option<String>,
|
||||
/// 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<String>,
|
||||
#[serde(rename = "err_code", skip_serializing_if = "Option::is_none")]
|
||||
pub err_code: Option<crate::models::CardsErrCode>,
|
||||
/// 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<String>,
|
||||
}
|
||||
|
@ -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)]
|
||||
|
6
vendor/t_pay/src/models/transfers_object.rs
vendored
6
vendor/t_pay/src/models/transfers_object.rs
vendored
@ -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,
|
||||
|
4
vendor/t_pay/src/models/vc_prepare_fields.rs
vendored
4
vendor/t_pay/src/models/vc_prepare_fields.rs
vendored
@ -18,7 +18,9 @@ pub struct VcPrepareFields {
|
||||
pub call_id: String,
|
||||
#[serde(rename = "language", skip_serializing_if = "Option::is_none")]
|
||||
pub language: Option<crate::models::Language>,
|
||||
/// 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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user