feat(pm_list): add pm required field info for crypto pay (#1891)

This commit is contained in:
Prasunna Soppa
2023-08-08 15:02:47 +05:30
committed by GitHub
parent 3cc4548eee
commit c205f064b9
3 changed files with 72 additions and 7 deletions

View File

@ -461,9 +461,9 @@ pub enum FieldType {
UserAddressState,
UserAddressCountry,
UserBlikCode,
FieldsComplete,
UserBillingName,
UserBank,
UserCurrency { options: Vec<String> },
Text,
DropDown { options: Vec<String> },
}

View File

@ -694,6 +694,55 @@ impl Default for super::settings::RequiredFields {
),
])),
),
(
enums::PaymentMethod::Crypto,
PaymentMethodType(HashMap::from([
(
enums::PaymentMethodType::CryptoCurrency,
ConnectorFields {
fields: HashMap::from([
(
enums::Connector::Cryptopay,
RequiredFieldFinal {
mandate : HashMap::new(),
non_mandate: HashMap::new(),
common : HashMap::from([
(
"payment_method_data.crypto.pay_currency".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.crypto.pay_currency".to_string(),
display_name: "currency".to_string(),
field_type: enums::FieldType::UserCurrency{
options: vec![
"BTC".to_string(),
"LTC".to_string(),
"ETH".to_string(),
"XRP".to_string(),
"XLM".to_string(),
"BCH".to_string(),
"ADA".to_string(),
"SOL".to_string(),
"SHIB".to_string(),
"TRX".to_string(),
"DOGE".to_string(),
"BNB".to_string(),
"BUSD".to_string(),
"USDT".to_string(),
"USDC".to_string(),
"DAI".to_string(),
]
},
value: None,
}
),
]),
}
),
]),
},
),
])),
),
(
enums::PaymentMethod::BankDebit,
PaymentMethodType(HashMap::from([(

View File

@ -4883,12 +4883,6 @@
"user_blik_code"
]
},
{
"type": "string",
"enum": [
"fields_complete"
]
},
{
"type": "string",
"enum": [
@ -4901,6 +4895,28 @@
"user_bank"
]
},
{
"type": "object",
"required": [
"user_currency"
],
"properties": {
"user_currency": {
"type": "object",
"required": [
"options"
],
"properties": {
"options": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
{
"type": "string",
"enum": [