Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- diffs/pr_10081/0a99096/diff.json +131 -0
- diffs/pr_10136/b6e1be5/diff.json +0 -0
- diffs/pr_10143/e6e88cc/diff.json +151 -0
- diffs/pr_10143/e9fd028/diff.json +39 -0
- diffs/pr_10148/5f83969/diff.json +24 -0
- diffs/pr_10193/04c94f8/diff.json +6 -0
- diffs/pr_10193/06ea2a6/diff.json +82 -0
- diffs/pr_10193/0ff4674/diff.json +6 -0
- diffs/pr_10193/164582b/diff.json +0 -0
- diffs/pr_10193/1f5a3ac/diff.json +6 -0
- diffs/pr_10193/28fd837/diff.json +6 -0
- diffs/pr_10193/2df79c0/diff.json +0 -0
- diffs/pr_10193/332eef1/diff.json +6 -0
- diffs/pr_10193/37a7989/diff.json +124 -0
- diffs/pr_10193/38208de/diff.json +0 -0
- diffs/pr_10193/3c197e4/diff.json +69 -0
- diffs/pr_10193/8495310/diff.json +0 -0
- diffs/pr_10193/8a79ef2/diff.json +0 -0
- diffs/pr_10193/8e29005/diff.json +0 -0
- diffs/pr_10193/977d192/diff.json +0 -0
- diffs/pr_10193/a84b686/diff.json +10 -0
- diffs/pr_10193/c3ed46e/diff.json +54 -0
- diffs/pr_10193/c446190/diff.json +0 -0
- diffs/pr_10193/cbff3ce/diff.json +0 -0
- diffs/pr_10193/e70fea8/diff.json +6 -0
- diffs/pr_10193/ea8ce1f/diff.json +0 -0
- diffs/pr_10193/ed99da0/diff.json +6 -0
- diffs/pr_10193/f70611f/diff.json +56 -0
- diffs/pr_10193/f75b5dc/diff.json +8 -0
- diffs/pr_10224/7750d6b/diff.json +24 -0
- diffs/pr_10250/7d948a4/diff.json +0 -0
- diffs/pr_10250/7f3a049/diff.json +0 -0
- diffs/pr_10250/9930370/diff.json +0 -0
- diffs/pr_10250/bd1ce41/diff.json +0 -0
- diffs/pr_10628/4d52d93/diff.json +40 -0
- diffs/pr_10628/912586b/diff.json +24 -0
- diffs/pr_6728/b456ad6/diff.json +8 -0
- diffs/pr_6736/0a4b7ff/diff.json +24 -0
- diffs/pr_6736/1eb1130/diff.json +0 -0
- diffs/pr_6736/591e1a8/diff.json +6 -0
- diffs/pr_6736/60dab50/diff.json +8 -0
- diffs/pr_6736/6d1b71d/diff.json +6 -0
- diffs/pr_6736/cd8b867/diff.json +6 -0
- diffs/pr_6736/d6944da/diff.json +6 -0
- diffs/pr_6736/e520c54/diff.json +54 -0
- diffs/pr_6736/f165658/diff.json +6 -0
- diffs/pr_6792/c75dcfe/diff.json +8 -0
- diffs/pr_6792/f7a56ab/diff.json +40 -0
- diffs/pr_6837/2400482/diff.json +6 -0
- diffs/pr_6837/a015b15/diff.json +6 -0
diffs/pr_10081/0a99096/diff.json
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "0a990962461d1d41a873b6cabd921e4c8465c0f6",
|
| 3 |
+
"pr_number": 10081,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/analytics/src/opensearch.rs",
|
| 6 |
+
"crates/api_models/src/analytics/search.rs",
|
| 7 |
+
"crates/router/src/consts/opensearch.rs"
|
| 8 |
+
],
|
| 9 |
+
"diffs": [
|
| 10 |
+
{
|
| 11 |
+
"id": "crates/router/src/consts/opensearch.rs::const::SEARCH_INDEXES",
|
| 12 |
+
"file": "crates/router/src/consts/opensearch.rs",
|
| 13 |
+
"kind": "const_item",
|
| 14 |
+
"status": "modified",
|
| 15 |
+
"code_changed": true,
|
| 16 |
+
"imports_changed": false,
|
| 17 |
+
"before_code": "pub const SEARCH_INDEXES: [SearchIndex; 8] = get_search_indexes();",
|
| 18 |
+
"after_code": "pub const SEARCH_INDEXES: [SearchIndex; 9] = get_search_indexes();",
|
| 19 |
+
"diff_span": {
|
| 20 |
+
"before": "pub const SEARCH_INDEXES: [SearchIndex; 8] = get_search_indexes();",
|
| 21 |
+
"after": "pub const SEARCH_INDEXES: [SearchIndex; 9] = get_search_indexes();"
|
| 22 |
+
},
|
| 23 |
+
"commit_sha": "0a990962461d1d41a873b6cabd921e4c8465c0f6"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"id": "crates/analytics/src/opensearch.rs::OpenSearchIndexes::function::validate",
|
| 27 |
+
"file": "crates/analytics/src/opensearch.rs",
|
| 28 |
+
"kind": "function_item",
|
| 29 |
+
"status": "modified",
|
| 30 |
+
"code_changed": true,
|
| 31 |
+
"imports_changed": false,
|
| 32 |
+
"before_code": "pub fn validate(&self) -> Result<(), ApplicationError> {\n use common_utils::{ext_traits::ConfigExt, fp_utils::when};\n\n when(self.payment_attempts.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payment Attempts index must not be empty\".into(),\n ))\n })?;\n\n when(self.payment_intents.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payment Intents index must not be empty\".into(),\n ))\n })?;\n\n when(self.refunds.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Refunds index must not be empty\".into(),\n ))\n })?;\n\n when(self.disputes.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Disputes index must not be empty\".into(),\n ))\n })?;\n\n when(\n self.sessionizer_payment_attempts.is_default_or_empty(),\n || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Payment Attempts index must not be empty\".into(),\n ))\n },\n )?;\n\n when(\n self.sessionizer_payment_intents.is_default_or_empty(),\n || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Payment Intents index must not be empty\".into(),\n ))\n },\n )?;\n\n when(self.sessionizer_refunds.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Refunds index must not be empty\".into(),\n ))\n })?;\n\n when(self.sessionizer_disputes.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Disputes index must not be empty\".into(),\n ))\n })?;\n\n Ok(())\n }",
|
| 33 |
+
"after_code": "pub fn validate(&self) -> Result<(), ApplicationError> {\n use common_utils::{ext_traits::ConfigExt, fp_utils::when};\n\n when(self.payment_attempts.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payment Attempts index must not be empty\".into(),\n ))\n })?;\n\n when(self.payment_intents.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payment Intents index must not be empty\".into(),\n ))\n })?;\n\n when(self.refunds.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Refunds index must not be empty\".into(),\n ))\n })?;\n\n when(self.disputes.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Disputes index must not be empty\".into(),\n ))\n })?;\n\n when(self.payouts.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payouts index must not be empty\".into(),\n ))\n })?;\n\n when(\n self.sessionizer_payment_attempts.is_default_or_empty(),\n || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Payment Attempts index must not be empty\".into(),\n ))\n },\n )?;\n\n when(\n self.sessionizer_payment_intents.is_default_or_empty(),\n || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Payment Intents index must not be empty\".into(),\n ))\n },\n )?;\n\n when(self.sessionizer_refunds.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Refunds index must not be empty\".into(),\n ))\n })?;\n\n when(self.sessionizer_disputes.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Disputes index must not be empty\".into(),\n ))\n })?;\n\n Ok(())\n }",
|
| 34 |
+
"diff_span": {
|
| 35 |
+
"before": "",
|
| 36 |
+
"after": " Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Disputes index must not be empty\".into(),\n ))\n })?;\n\n when(self.payouts.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payouts index must not be empty\".into(),\n ))\n })?;"
|
| 37 |
+
},
|
| 38 |
+
"commit_sha": "0a990962461d1d41a873b6cabd921e4c8465c0f6"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"id": "crates/api_models/src/analytics/search.rs::enum::SearchIndex",
|
| 42 |
+
"file": "crates/api_models/src/analytics/search.rs",
|
| 43 |
+
"kind": "enum_item",
|
| 44 |
+
"status": "modified",
|
| 45 |
+
"code_changed": true,
|
| 46 |
+
"imports_changed": false,
|
| 47 |
+
"before_code": "pub enum SearchIndex {\n PaymentAttempts,\n PaymentIntents,\n Refunds,\n Disputes,\n SessionizerPaymentAttempts,\n SessionizerPaymentIntents,\n SessionizerRefunds,\n SessionizerDisputes,\n}",
|
| 48 |
+
"after_code": "pub enum SearchIndex {\n PaymentAttempts,\n PaymentIntents,\n Refunds,\n Disputes,\n Payouts,\n SessionizerPaymentAttempts,\n SessionizerPaymentIntents,\n SessionizerRefunds,\n SessionizerDisputes,\n}",
|
| 49 |
+
"diff_span": {
|
| 50 |
+
"before": "",
|
| 51 |
+
"after": " Refunds,\n Disputes,\n Payouts,\n SessionizerPaymentAttempts,\n SessionizerPaymentIntents,"
|
| 52 |
+
},
|
| 53 |
+
"commit_sha": "0a990962461d1d41a873b6cabd921e4c8465c0f6"
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"id": "crates/analytics/src/opensearch.rs::OpenSearchClient::function::search_index_to_opensearch_index",
|
| 57 |
+
"file": "crates/analytics/src/opensearch.rs",
|
| 58 |
+
"kind": "function_item",
|
| 59 |
+
"status": "modified",
|
| 60 |
+
"code_changed": true,
|
| 61 |
+
"imports_changed": false,
|
| 62 |
+
"before_code": "pub fn search_index_to_opensearch_index(&self, index: SearchIndex) -> String {\n match index {\n SearchIndex::PaymentAttempts => self.indexes.payment_attempts.clone(),\n SearchIndex::PaymentIntents => self.indexes.payment_intents.clone(),\n SearchIndex::Refunds => self.indexes.refunds.clone(),\n SearchIndex::Disputes => self.indexes.disputes.clone(),\n SearchIndex::SessionizerPaymentAttempts => {\n self.indexes.sessionizer_payment_attempts.clone()\n }\n SearchIndex::SessionizerPaymentIntents => {\n self.indexes.sessionizer_payment_intents.clone()\n }\n SearchIndex::SessionizerRefunds => self.indexes.sessionizer_refunds.clone(),\n SearchIndex::SessionizerDisputes => self.indexes.sessionizer_disputes.clone(),\n }\n }",
|
| 63 |
+
"after_code": "pub fn search_index_to_opensearch_index(&self, index: SearchIndex) -> String {\n match index {\n SearchIndex::PaymentAttempts => self.indexes.payment_attempts.clone(),\n SearchIndex::PaymentIntents => self.indexes.payment_intents.clone(),\n SearchIndex::Refunds => self.indexes.refunds.clone(),\n SearchIndex::Disputes => self.indexes.disputes.clone(),\n SearchIndex::Payouts => self.indexes.payouts.clone(),\n SearchIndex::SessionizerPaymentAttempts => {\n self.indexes.sessionizer_payment_attempts.clone()\n }\n SearchIndex::SessionizerPaymentIntents => {\n self.indexes.sessionizer_payment_intents.clone()\n }\n SearchIndex::SessionizerRefunds => self.indexes.sessionizer_refunds.clone(),\n SearchIndex::SessionizerDisputes => self.indexes.sessionizer_disputes.clone(),\n }\n }",
|
| 64 |
+
"diff_span": {
|
| 65 |
+
"before": "",
|
| 66 |
+
"after": " SearchIndex::Refunds => self.indexes.refunds.clone(),\n SearchIndex::Disputes => self.indexes.disputes.clone(),\n SearchIndex::Payouts => self.indexes.payouts.clone(),\n SearchIndex::SessionizerPaymentAttempts => {\n self.indexes.sessionizer_payment_attempts.clone()"
|
| 67 |
+
},
|
| 68 |
+
"commit_sha": "0a990962461d1d41a873b6cabd921e4c8465c0f6"
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"id": "crates/analytics/src/opensearch.rs::struct::OpenSearchIndexes",
|
| 72 |
+
"file": "crates/analytics/src/opensearch.rs",
|
| 73 |
+
"kind": "struct_item",
|
| 74 |
+
"status": "modified",
|
| 75 |
+
"code_changed": true,
|
| 76 |
+
"imports_changed": false,
|
| 77 |
+
"before_code": "pub struct OpenSearchIndexes {\n pub payment_attempts: String,\n pub payment_intents: String,\n pub refunds: String,\n pub disputes: String,\n pub sessionizer_payment_attempts: String,\n pub sessionizer_payment_intents: String,\n pub sessionizer_refunds: String,\n pub sessionizer_disputes: String,\n}",
|
| 78 |
+
"after_code": "pub struct OpenSearchIndexes {\n pub payment_attempts: String,\n pub payment_intents: String,\n pub refunds: String,\n pub disputes: String,\n pub payouts: String,\n pub sessionizer_payment_attempts: String,\n pub sessionizer_payment_intents: String,\n pub sessionizer_refunds: String,\n pub sessionizer_disputes: String,\n}",
|
| 79 |
+
"diff_span": {
|
| 80 |
+
"before": "",
|
| 81 |
+
"after": " pub refunds: String,\n pub disputes: String,\n pub payouts: String,\n pub sessionizer_payment_attempts: String,\n pub sessionizer_payment_intents: String,"
|
| 82 |
+
},
|
| 83 |
+
"commit_sha": "0a990962461d1d41a873b6cabd921e4c8465c0f6"
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"id": "crates/analytics/src/opensearch.rs::impl::OpenSearchIndexes",
|
| 87 |
+
"file": "crates/analytics/src/opensearch.rs",
|
| 88 |
+
"kind": "impl_item",
|
| 89 |
+
"status": "modified",
|
| 90 |
+
"code_changed": true,
|
| 91 |
+
"imports_changed": false,
|
| 92 |
+
"before_code": "impl OpenSearchIndexes {\n pub fn validate(&self) -> Result<(), ApplicationError> {\n use common_utils::{ext_traits::ConfigExt, fp_utils::when};\n\n when(self.payment_attempts.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payment Attempts index must not be empty\".into(),\n ))\n })?;\n\n when(self.payment_intents.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payment Intents index must not be empty\".into(),\n ))\n })?;\n\n when(self.refunds.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Refunds index must not be empty\".into(),\n ))\n })?;\n\n when(self.disputes.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Disputes index must not be empty\".into(),\n ))\n })?;\n\n when(\n self.sessionizer_payment_attempts.is_default_or_empty(),\n || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Payment Attempts index must not be empty\".into(),\n ))\n },\n )?;\n\n when(\n self.sessionizer_payment_intents.is_default_or_empty(),\n || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Payment Intents index must not be empty\".into(),\n ))\n },\n )?;\n\n when(self.sessionizer_refunds.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Refunds index must not be empty\".into(),\n ))\n })?;\n\n when(self.sessionizer_disputes.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Disputes index must not be empty\".into(),\n ))\n })?;\n\n Ok(())\n }\n}",
|
| 93 |
+
"after_code": "impl OpenSearchIndexes {\n pub fn validate(&self) -> Result<(), ApplicationError> {\n use common_utils::{ext_traits::ConfigExt, fp_utils::when};\n\n when(self.payment_attempts.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payment Attempts index must not be empty\".into(),\n ))\n })?;\n\n when(self.payment_intents.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payment Intents index must not be empty\".into(),\n ))\n })?;\n\n when(self.refunds.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Refunds index must not be empty\".into(),\n ))\n })?;\n\n when(self.disputes.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Disputes index must not be empty\".into(),\n ))\n })?;\n\n when(self.payouts.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payouts index must not be empty\".into(),\n ))\n })?;\n\n when(\n self.sessionizer_payment_attempts.is_default_or_empty(),\n || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Payment Attempts index must not be empty\".into(),\n ))\n },\n )?;\n\n when(\n self.sessionizer_payment_intents.is_default_or_empty(),\n || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Payment Intents index must not be empty\".into(),\n ))\n },\n )?;\n\n when(self.sessionizer_refunds.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Refunds index must not be empty\".into(),\n ))\n })?;\n\n when(self.sessionizer_disputes.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Sessionizer Disputes index must not be empty\".into(),\n ))\n })?;\n\n Ok(())\n }\n}",
|
| 94 |
+
"diff_span": {
|
| 95 |
+
"before": "",
|
| 96 |
+
"after": " Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Disputes index must not be empty\".into(),\n ))\n })?;\n\n when(self.payouts.is_default_or_empty(), || {\n Err(ApplicationError::InvalidConfigurationValueError(\n \"Opensearch Payouts index must not be empty\".into(),\n ))\n })?;"
|
| 97 |
+
},
|
| 98 |
+
"commit_sha": "0a990962461d1d41a873b6cabd921e4c8465c0f6"
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"id": "crates/analytics/src/opensearch.rs::OpenSearchConfig::function::default",
|
| 102 |
+
"file": "crates/analytics/src/opensearch.rs",
|
| 103 |
+
"kind": "function_item",
|
| 104 |
+
"status": "modified",
|
| 105 |
+
"code_changed": true,
|
| 106 |
+
"imports_changed": false,
|
| 107 |
+
"before_code": "fn default() -> Self {\n Self {\n host: \"https://localhost:9200\".to_string(),\n auth: OpenSearchAuth::Basic {\n username: \"admin\".to_string(),\n password: \"admin\".to_string(),\n },\n indexes: OpenSearchIndexes {\n payment_attempts: \"hyperswitch-payment-attempt-events\".to_string(),\n payment_intents: \"hyperswitch-payment-intent-events\".to_string(),\n refunds: \"hyperswitch-refund-events\".to_string(),\n disputes: \"hyperswitch-dispute-events\".to_string(),\n sessionizer_payment_attempts: \"sessionizer-payment-attempt-events\".to_string(),\n sessionizer_payment_intents: \"sessionizer-payment-intent-events\".to_string(),\n sessionizer_refunds: \"sessionizer-refund-events\".to_string(),\n sessionizer_disputes: \"sessionizer-dispute-events\".to_string(),\n },\n enabled: false,\n }\n }",
|
| 108 |
+
"after_code": "fn default() -> Self {\n Self {\n host: \"https://localhost:9200\".to_string(),\n auth: OpenSearchAuth::Basic {\n username: \"admin\".to_string(),\n password: \"admin\".to_string(),\n },\n indexes: OpenSearchIndexes {\n payment_attempts: \"hyperswitch-payment-attempt-events\".to_string(),\n payment_intents: \"hyperswitch-payment-intent-events\".to_string(),\n refunds: \"hyperswitch-refund-events\".to_string(),\n disputes: \"hyperswitch-dispute-events\".to_string(),\n payouts: \"hyperswitch-payout-events\".to_string(),\n sessionizer_payment_attempts: \"sessionizer-payment-attempt-events\".to_string(),\n sessionizer_payment_intents: \"sessionizer-payment-intent-events\".to_string(),\n sessionizer_refunds: \"sessionizer-refund-events\".to_string(),\n sessionizer_disputes: \"sessionizer-dispute-events\".to_string(),\n },\n enabled: false,\n }\n }",
|
| 109 |
+
"diff_span": {
|
| 110 |
+
"before": "",
|
| 111 |
+
"after": " refunds: \"hyperswitch-refund-events\".to_string(),\n disputes: \"hyperswitch-dispute-events\".to_string(),\n payouts: \"hyperswitch-payout-events\".to_string(),\n sessionizer_payment_attempts: \"sessionizer-payment-attempt-events\".to_string(),\n sessionizer_payment_intents: \"sessionizer-payment-intent-events\".to_string(),"
|
| 112 |
+
},
|
| 113 |
+
"commit_sha": "0a990962461d1d41a873b6cabd921e4c8465c0f6"
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"id": "crates/router/src/consts/opensearch.rs::function::get_search_indexes",
|
| 117 |
+
"file": "crates/router/src/consts/opensearch.rs",
|
| 118 |
+
"kind": "function_item",
|
| 119 |
+
"status": "modified",
|
| 120 |
+
"code_changed": true,
|
| 121 |
+
"imports_changed": false,
|
| 122 |
+
"before_code": "pub const fn get_search_indexes() -> [SearchIndex; 8] {\n [\n SearchIndex::PaymentAttempts,\n SearchIndex::PaymentIntents,\n SearchIndex::Refunds,\n SearchIndex::Disputes,\n SearchIndex::SessionizerPaymentAttempts,\n SearchIndex::SessionizerPaymentIntents,\n SearchIndex::SessionizerRefunds,\n SearchIndex::SessionizerDisputes,\n ]\n}",
|
| 123 |
+
"after_code": "pub const fn get_search_indexes() -> [SearchIndex; 9] {\n [\n SearchIndex::PaymentAttempts,\n SearchIndex::PaymentIntents,\n SearchIndex::Refunds,\n SearchIndex::Disputes,\n SearchIndex::Payouts,\n SearchIndex::SessionizerPaymentAttempts,\n SearchIndex::SessionizerPaymentIntents,\n SearchIndex::SessionizerRefunds,\n SearchIndex::SessionizerDisputes,\n ]\n}",
|
| 124 |
+
"diff_span": {
|
| 125 |
+
"before": "pub const fn get_search_indexes() -> [SearchIndex; 8] {\n [\n SearchIndex::PaymentAttempts,",
|
| 126 |
+
"after": "pub const fn get_search_indexes() -> [SearchIndex; 9] {\n [\n SearchIndex::PaymentAttempts,\n SearchIndex::PaymentIntents,\n SearchIndex::Refunds,\n SearchIndex::Disputes,\n SearchIndex::Payouts,\n SearchIndex::SessionizerPaymentAttempts,\n SearchIndex::SessionizerPaymentIntents,"
|
| 127 |
+
},
|
| 128 |
+
"commit_sha": "0a990962461d1d41a873b6cabd921e4c8465c0f6"
|
| 129 |
+
}
|
| 130 |
+
]
|
| 131 |
+
}
|
diffs/pr_10136/b6e1be5/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10143/e6e88cc/diff.json
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "e6e88cc0ffb537f80384d8313e79883ca677d08f",
|
| 3 |
+
"pr_number": 10143,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/connector_configs/src/connector.rs",
|
| 6 |
+
"crates/hyperswitch_connectors/src/connectors/peachpayments.rs",
|
| 7 |
+
"crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs"
|
| 8 |
+
],
|
| 9 |
+
"diffs": [
|
| 10 |
+
{
|
| 11 |
+
"id": "crates/connector_configs/src/connector.rs::struct::ConfigMetadata",
|
| 12 |
+
"file": "crates/connector_configs/src/connector.rs",
|
| 13 |
+
"kind": "struct_item",
|
| 14 |
+
"status": "modified",
|
| 15 |
+
"code_changed": true,
|
| 16 |
+
"imports_changed": false,
|
| 17 |
+
"before_code": "pub struct ConfigMetadata {\n pub merchant_config_currency: Option<InputData>,\n pub merchant_account_id: Option<InputData>,\n pub account_name: Option<InputData>,\n pub account_type: Option<InputData>,\n pub terminal_id: Option<InputData>,\n pub google_pay: Option<Vec<InputData>>,\n pub apple_pay: Option<Vec<InputData>>,\n pub merchant_id: Option<InputData>,\n pub endpoint_prefix: Option<InputData>,\n pub mcc: Option<InputData>,\n pub merchant_country_code: Option<InputData>,\n pub merchant_name: Option<InputData>,\n pub acquirer_bin: Option<InputData>,\n pub acquirer_merchant_id: Option<InputData>,\n pub acquirer_country_code: Option<InputData>,\n pub three_ds_requestor_name: Option<InputData>,\n pub three_ds_requestor_id: Option<InputData>,\n pub pull_mechanism_for_external_3ds_enabled: Option<InputData>,\n pub klarna_region: Option<InputData>,\n pub pricing_type: Option<InputData>,\n pub source_balance_account: Option<InputData>,\n pub brand_id: Option<InputData>,\n pub destination_account_number: Option<InputData>,\n pub dpa_id: Option<InputData>,\n pub dpa_name: Option<InputData>,\n pub locale: Option<InputData>,\n pub card_brands: Option<InputData>,\n pub merchant_category_code: Option<InputData>,\n pub merchant_configuration_id: Option<InputData>,\n pub currency_id: Option<InputData>,\n pub platform_id: Option<InputData>,\n pub ledger_account_id: Option<InputData>,\n pub tenant_id: Option<InputData>,\n pub platform_url: Option<InputData>,\n pub report_group: Option<InputData>,\n pub proxy_url: Option<InputData>,\n pub shop_name: Option<InputData>,\n pub merchant_funding_source: Option<InputData>,\n pub account_id: Option<AccountIDSupportedMethods>,\n pub name: Option<InputData>,\n pub client_merchant_reference_id: Option<InputData>,\n pub route: Option<InputData>,\n pub mid: Option<InputData>,\n pub tid: Option<InputData>,\n pub site: Option<InputData>,\n}",
|
| 18 |
+
"after_code": "pub struct ConfigMetadata {\n pub merchant_config_currency: Option<InputData>,\n pub merchant_account_id: Option<InputData>,\n pub account_name: Option<InputData>,\n pub account_type: Option<InputData>,\n pub terminal_id: Option<InputData>,\n pub google_pay: Option<Vec<InputData>>,\n pub apple_pay: Option<Vec<InputData>>,\n pub merchant_id: Option<InputData>,\n pub endpoint_prefix: Option<InputData>,\n pub mcc: Option<InputData>,\n pub merchant_country_code: Option<InputData>,\n pub merchant_name: Option<InputData>,\n pub acquirer_bin: Option<InputData>,\n pub acquirer_merchant_id: Option<InputData>,\n pub acquirer_country_code: Option<InputData>,\n pub three_ds_requestor_name: Option<InputData>,\n pub three_ds_requestor_id: Option<InputData>,\n pub pull_mechanism_for_external_3ds_enabled: Option<InputData>,\n pub klarna_region: Option<InputData>,\n pub pricing_type: Option<InputData>,\n pub source_balance_account: Option<InputData>,\n pub brand_id: Option<InputData>,\n pub destination_account_number: Option<InputData>,\n pub dpa_id: Option<InputData>,\n pub dpa_name: Option<InputData>,\n pub locale: Option<InputData>,\n pub card_brands: Option<InputData>,\n pub merchant_category_code: Option<InputData>,\n pub merchant_configuration_id: Option<InputData>,\n pub currency_id: Option<InputData>,\n pub platform_id: Option<InputData>,\n pub ledger_account_id: Option<InputData>,\n pub tenant_id: Option<InputData>,\n pub platform_url: Option<InputData>,\n pub report_group: Option<InputData>,\n pub proxy_url: Option<InputData>,\n pub shop_name: Option<InputData>,\n pub merchant_funding_source: Option<InputData>,\n pub account_id: Option<AccountIDSupportedMethods>,\n pub name: Option<InputData>,\n pub client_merchant_reference_id: Option<InputData>,\n pub merchant_payment_method_route_id: Option<InputData>,\n pub site: Option<InputData>,\n}",
|
| 19 |
+
"diff_span": {
|
| 20 |
+
"before": " pub name: Option<InputData>,\n pub client_merchant_reference_id: Option<InputData>,\n pub route: Option<InputData>,\n pub mid: Option<InputData>,\n pub tid: Option<InputData>,\n pub site: Option<InputData>,\n}",
|
| 21 |
+
"after": " pub name: Option<InputData>,\n pub client_merchant_reference_id: Option<InputData>,\n pub merchant_payment_method_route_id: Option<InputData>,\n pub site: Option<InputData>,\n}"
|
| 22 |
+
},
|
| 23 |
+
"commit_sha": "e6e88cc0ffb537f80384d8313e79883ca677d08f"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"id": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs::impl::PeachpaymentsPaymentsRequest",
|
| 27 |
+
"file": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs",
|
| 28 |
+
"kind": "impl_item",
|
| 29 |
+
"status": "modified",
|
| 30 |
+
"code_changed": true,
|
| 31 |
+
"imports_changed": false,
|
| 32 |
+
"before_code": "impl TryFrom<(&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card)>\n for PeachpaymentsPaymentsRequest\n{\n type Error = error_stack::Report<errors::ConnectorError>;\n fn try_from(\n (item, req_card): (&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card),\n ) -> Result<Self, Self::Error> {\n let amount_in_cents = item.amount;\n\n let connector_merchant_config =\n PeachPaymentsConnectorMetadataObject::try_from(&item.router_data.connector_meta_data)?;\n\n let merchant_information = MerchantInformation {\n client_merchant_reference_id: connector_merchant_config.client_merchant_reference_id,\n name: connector_merchant_config.name,\n mcc: connector_merchant_config.mcc,\n phone: connector_merchant_config.phone,\n email: connector_merchant_config.email,\n mobile: connector_merchant_config.mobile,\n address: connector_merchant_config.address,\n city: connector_merchant_config.city,\n postal_code: connector_merchant_config.postal_code,\n region_code: connector_merchant_config.region_code,\n merchant_type: connector_merchant_config.merchant_type,\n website_url: connector_merchant_config.website_url,\n };\n\n // Get routing configuration from metadata\n let routing = Routing {\n route: connector_merchant_config.route,\n mid: connector_merchant_config.mid,\n tid: connector_merchant_config.tid,\n visa_payment_facilitator_id: connector_merchant_config.visa_payment_facilitator_id,\n master_card_payment_facilitator_id: connector_merchant_config\n .master_card_payment_facilitator_id,\n sub_mid: connector_merchant_config.sub_mid,\n amex_id: connector_merchant_config.amex_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing,\n card,\n amount,\n rrn: item.router_data.request.merchant_order_reference_id.clone(),\n });\n\n // Generate current timestamp for sendDateTime (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)\n let send_date_time = OffsetDateTime::now_utc()\n .format(&time::format_description::well_known::Iso8601::DEFAULT)\n .map_err(|_| errors::ConnectorError::RequestEncodingFailed)?;\n\n Ok(Self::Card(PeachpaymentsPaymentsCardRequest {\n charge_method: \"ecommerce_card_payment_only\".to_string(),\n reference_id: item.router_data.connector_request_reference_id.clone(),\n ecommerce_card_payment_only_transaction_data: ecommerce_data,\n pos_data: None,\n send_date_time,\n }))\n }\n}",
|
| 33 |
+
"after_code": "impl TryFrom<(&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card)>\n for PeachpaymentsPaymentsRequest\n{\n type Error = error_stack::Report<errors::ConnectorError>;\n fn try_from(\n (item, req_card): (&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card),\n ) -> Result<Self, Self::Error> {\n let amount_in_cents = item.amount;\n\n let connector_merchant_config =\n PeachPaymentsConnectorMetadataObject::try_from(&item.router_data.connector_meta_data)?;\n\n let merchant_information = MerchantInformation {\n client_merchant_reference_id: connector_merchant_config.client_merchant_reference_id,\n };\n\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config.merchant_payment_method_route_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing_reference,\n card,\n amount,\n rrn: item.router_data.request.merchant_order_reference_id.clone(),\n });\n\n // Generate current timestamp for sendDateTime (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)\n let send_date_time = OffsetDateTime::now_utc()\n .format(&time::format_description::well_known::Iso8601::DEFAULT)\n .map_err(|_| errors::ConnectorError::RequestEncodingFailed)?;\n\n Ok(Self::Card(PeachpaymentsPaymentsCardRequest {\n charge_method: \"ecommerce_card_payment_only\".to_string(),\n reference_id: item.router_data.connector_request_reference_id.clone(),\n ecommerce_card_payment_only_transaction_data: ecommerce_data,\n pos_data: None,\n send_date_time,\n }))\n }\n}",
|
| 34 |
+
"diff_span": {
|
| 35 |
+
"before": " let merchant_information = MerchantInformation {\n client_merchant_reference_id: connector_merchant_config.client_merchant_reference_id,\n name: connector_merchant_config.name,\n mcc: connector_merchant_config.mcc,\n phone: connector_merchant_config.phone,\n email: connector_merchant_config.email,\n mobile: connector_merchant_config.mobile,\n address: connector_merchant_config.address,\n city: connector_merchant_config.city,\n postal_code: connector_merchant_config.postal_code,\n region_code: connector_merchant_config.region_code,\n merchant_type: connector_merchant_config.merchant_type,\n website_url: connector_merchant_config.website_url,\n };\n\n // Get routing configuration from metadata\n let routing = Routing {\n route: connector_merchant_config.route,\n mid: connector_merchant_config.mid,\n tid: connector_merchant_config.tid,\n visa_payment_facilitator_id: connector_merchant_config.visa_payment_facilitator_id,\n master_card_payment_facilitator_id: connector_merchant_config\n .master_card_payment_facilitator_id,\n sub_mid: connector_merchant_config.sub_mid,\n amex_id: connector_merchant_config.amex_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing,\n card,\n amount,",
|
| 36 |
+
"after": " };\n\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config.merchant_payment_method_route_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing_reference,\n card,\n amount,"
|
| 37 |
+
},
|
| 38 |
+
"commit_sha": "e6e88cc0ffb537f80384d8313e79883ca677d08f"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"id": "crates/hyperswitch_connectors/src/connectors/peachpayments.rs::static::PEACHPAYMENTS_CONNECTOR_INFO",
|
| 42 |
+
"file": "crates/hyperswitch_connectors/src/connectors/peachpayments.rs",
|
| 43 |
+
"kind": "static_item",
|
| 44 |
+
"status": "modified",
|
| 45 |
+
"code_changed": true,
|
| 46 |
+
"imports_changed": false,
|
| 47 |
+
"before_code": "static PEACHPAYMENTS_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {\n display_name: \"Peachpayments\",\n description: \"The secure African payment gateway with easy integrations, 365-day support, and advanced orchestration.\",\n connector_type: enums::HyperswitchConnectorCategory::PaymentGateway,\n integration_status: enums::ConnectorIntegrationStatus::Beta,\n};",
|
| 48 |
+
"after_code": "static PEACHPAYMENTS_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {\n display_name: \"Peach Payments\",\n description: \"The secure African payment gateway with easy integrations, 365-day support, and advanced orchestration.\",\n connector_type: enums::HyperswitchConnectorCategory::PaymentGateway,\n integration_status: enums::ConnectorIntegrationStatus::Beta,\n};",
|
| 49 |
+
"diff_span": {
|
| 50 |
+
"before": "static PEACHPAYMENTS_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {\n display_name: \"Peachpayments\",\n description: \"The secure African payment gateway with easy integrations, 365-day support, and advanced orchestration.\",\n connector_type: enums::HyperswitchConnectorCategory::PaymentGateway,",
|
| 51 |
+
"after": "static PEACHPAYMENTS_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {\n display_name: \"Peach Payments\",\n description: \"The secure African payment gateway with easy integrations, 365-day support, and advanced orchestration.\",\n connector_type: enums::HyperswitchConnectorCategory::PaymentGateway,"
|
| 52 |
+
},
|
| 53 |
+
"commit_sha": "e6e88cc0ffb537f80384d8313e79883ca677d08f"
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"id": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs::struct::PeachPaymentsConnectorMetadataObject",
|
| 57 |
+
"file": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs",
|
| 58 |
+
"kind": "struct_item",
|
| 59 |
+
"status": "modified",
|
| 60 |
+
"code_changed": true,
|
| 61 |
+
"imports_changed": false,
|
| 62 |
+
"before_code": "pub struct PeachPaymentsConnectorMetadataObject {\n pub client_merchant_reference_id: Secret<String>,\n pub name: Secret<String>,\n pub mcc: Secret<String>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub phone: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub email: Option<pii::Email>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub mobile: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub address: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub city: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub postal_code: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub region_code: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub merchant_type: Option<MerchantType>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub website_url: Option<url::Url>,\n pub route: Route,\n pub mid: Secret<String>,\n pub tid: Secret<String>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub visa_payment_facilitator_id: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub master_card_payment_facilitator_id: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub sub_mid: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub amex_id: Option<Secret<String>>,\n}",
|
| 63 |
+
"after_code": "pub struct PeachPaymentsConnectorMetadataObject {\n pub client_merchant_reference_id: Secret<String>,\n pub merchant_payment_method_route_id: Secret<String>,\n}",
|
| 64 |
+
"diff_span": {
|
| 65 |
+
"before": "pub struct PeachPaymentsConnectorMetadataObject {\n pub client_merchant_reference_id: Secret<String>,\n pub name: Secret<String>,\n pub mcc: Secret<String>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub phone: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub email: Option<pii::Email>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub mobile: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub address: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub city: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub postal_code: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub region_code: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub merchant_type: Option<MerchantType>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub website_url: Option<url::Url>,\n pub route: Route,\n pub mid: Secret<String>,\n pub tid: Secret<String>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub visa_payment_facilitator_id: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub master_card_payment_facilitator_id: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub sub_mid: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub amex_id: Option<Secret<String>>,\n}",
|
| 66 |
+
"after": "pub struct PeachPaymentsConnectorMetadataObject {\n pub client_merchant_reference_id: Secret<String>,\n pub merchant_payment_method_route_id: Secret<String>,\n}"
|
| 67 |
+
},
|
| 68 |
+
"commit_sha": "e6e88cc0ffb537f80384d8313e79883ca677d08f"
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"id": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs::struct::EcommerceNetworkTokenPaymentOnlyTransactionData",
|
| 72 |
+
"file": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs",
|
| 73 |
+
"kind": "struct_item",
|
| 74 |
+
"status": "modified",
|
| 75 |
+
"code_changed": true,
|
| 76 |
+
"imports_changed": false,
|
| 77 |
+
"before_code": "pub struct EcommerceNetworkTokenPaymentOnlyTransactionData {\n pub merchant_information: MerchantInformation,\n pub routing: Routing,\n pub network_token_data: NetworkTokenDetails,\n pub amount: AmountDetails,\n pub cof_data: CardOnFileData,\n}",
|
| 78 |
+
"after_code": "pub struct EcommerceNetworkTokenPaymentOnlyTransactionData {\n pub merchant_information: MerchantInformation,\n pub routing_reference: RoutingReference,\n pub network_token_data: NetworkTokenDetails,\n pub amount: AmountDetails,\n pub cof_data: CardOnFileData,\n}",
|
| 79 |
+
"diff_span": {
|
| 80 |
+
"before": "pub struct EcommerceNetworkTokenPaymentOnlyTransactionData {\n pub merchant_information: MerchantInformation,\n pub routing: Routing,\n pub network_token_data: NetworkTokenDetails,\n pub amount: AmountDetails,",
|
| 81 |
+
"after": "pub struct EcommerceNetworkTokenPaymentOnlyTransactionData {\n pub merchant_information: MerchantInformation,\n pub routing_reference: RoutingReference,\n pub network_token_data: NetworkTokenDetails,\n pub amount: AmountDetails,"
|
| 82 |
+
},
|
| 83 |
+
"commit_sha": "e6e88cc0ffb537f80384d8313e79883ca677d08f"
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"id": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs::struct::MerchantInformation",
|
| 87 |
+
"file": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs",
|
| 88 |
+
"kind": "struct_item",
|
| 89 |
+
"status": "modified",
|
| 90 |
+
"code_changed": true,
|
| 91 |
+
"imports_changed": false,
|
| 92 |
+
"before_code": "pub struct MerchantInformation {\n pub client_merchant_reference_id: Secret<String>,\n pub name: Secret<String>,\n pub mcc: Secret<String>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub phone: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub email: Option<pii::Email>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub mobile: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub address: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub city: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub postal_code: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub region_code: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub merchant_type: Option<MerchantType>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub website_url: Option<url::Url>,\n}",
|
| 93 |
+
"after_code": "pub struct MerchantInformation {\n pub client_merchant_reference_id: Secret<String>,\n}",
|
| 94 |
+
"diff_span": {
|
| 95 |
+
"before": "pub struct MerchantInformation {\n pub client_merchant_reference_id: Secret<String>,\n pub name: Secret<String>,\n pub mcc: Secret<String>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub phone: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub email: Option<pii::Email>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub mobile: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub address: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub city: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub postal_code: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub region_code: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub merchant_type: Option<MerchantType>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub website_url: Option<url::Url>,\n}",
|
| 96 |
+
"after": ""
|
| 97 |
+
},
|
| 98 |
+
"commit_sha": "e6e88cc0ffb537f80384d8313e79883ca677d08f"
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"id": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs::struct::EcommerceCardPaymentOnlyTransactionData",
|
| 102 |
+
"file": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs",
|
| 103 |
+
"kind": "struct_item",
|
| 104 |
+
"status": "modified",
|
| 105 |
+
"code_changed": true,
|
| 106 |
+
"imports_changed": false,
|
| 107 |
+
"before_code": "pub struct EcommerceCardPaymentOnlyTransactionData {\n pub merchant_information: MerchantInformation,\n pub routing: Routing,\n pub card: CardDetails,\n pub amount: AmountDetails,\n pub rrn: Option<String>,\n}",
|
| 108 |
+
"after_code": "pub struct EcommerceCardPaymentOnlyTransactionData {\n pub merchant_information: MerchantInformation,\n pub routing_reference: RoutingReference,\n pub card: CardDetails,\n pub amount: AmountDetails,\n pub rrn: Option<String>,\n}",
|
| 109 |
+
"diff_span": {
|
| 110 |
+
"before": "pub struct EcommerceCardPaymentOnlyTransactionData {\n pub merchant_information: MerchantInformation,\n pub routing: Routing,\n pub card: CardDetails,\n pub amount: AmountDetails,",
|
| 111 |
+
"after": "pub struct EcommerceCardPaymentOnlyTransactionData {\n pub merchant_information: MerchantInformation,\n pub routing_reference: RoutingReference,\n pub card: CardDetails,\n pub amount: AmountDetails,"
|
| 112 |
+
},
|
| 113 |
+
"commit_sha": "e6e88cc0ffb537f80384d8313e79883ca677d08f"
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"id": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs::PeachpaymentsPaymentsRequest::function::try_from",
|
| 117 |
+
"file": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs",
|
| 118 |
+
"kind": "function_item",
|
| 119 |
+
"status": "modified",
|
| 120 |
+
"code_changed": true,
|
| 121 |
+
"imports_changed": false,
|
| 122 |
+
"before_code": "fn try_from(\n (item, req_card): (&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card),\n ) -> Result<Self, Self::Error> {\n let amount_in_cents = item.amount;\n\n let connector_merchant_config =\n PeachPaymentsConnectorMetadataObject::try_from(&item.router_data.connector_meta_data)?;\n\n let merchant_information = MerchantInformation {\n client_merchant_reference_id: connector_merchant_config.client_merchant_reference_id,\n name: connector_merchant_config.name,\n mcc: connector_merchant_config.mcc,\n phone: connector_merchant_config.phone,\n email: connector_merchant_config.email,\n mobile: connector_merchant_config.mobile,\n address: connector_merchant_config.address,\n city: connector_merchant_config.city,\n postal_code: connector_merchant_config.postal_code,\n region_code: connector_merchant_config.region_code,\n merchant_type: connector_merchant_config.merchant_type,\n website_url: connector_merchant_config.website_url,\n };\n\n // Get routing configuration from metadata\n let routing = Routing {\n route: connector_merchant_config.route,\n mid: connector_merchant_config.mid,\n tid: connector_merchant_config.tid,\n visa_payment_facilitator_id: connector_merchant_config.visa_payment_facilitator_id,\n master_card_payment_facilitator_id: connector_merchant_config\n .master_card_payment_facilitator_id,\n sub_mid: connector_merchant_config.sub_mid,\n amex_id: connector_merchant_config.amex_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing,\n card,\n amount,\n rrn: item.router_data.request.merchant_order_reference_id.clone(),\n });\n\n // Generate current timestamp for sendDateTime (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)\n let send_date_time = OffsetDateTime::now_utc()\n .format(&time::format_description::well_known::Iso8601::DEFAULT)\n .map_err(|_| errors::ConnectorError::RequestEncodingFailed)?;\n\n Ok(Self::Card(PeachpaymentsPaymentsCardRequest {\n charge_method: \"ecommerce_card_payment_only\".to_string(),\n reference_id: item.router_data.connector_request_reference_id.clone(),\n ecommerce_card_payment_only_transaction_data: ecommerce_data,\n pos_data: None,\n send_date_time,\n }))\n }",
|
| 123 |
+
"after_code": "fn try_from(\n (item, req_card): (&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card),\n ) -> Result<Self, Self::Error> {\n let amount_in_cents = item.amount;\n\n let connector_merchant_config =\n PeachPaymentsConnectorMetadataObject::try_from(&item.router_data.connector_meta_data)?;\n\n let merchant_information = MerchantInformation {\n client_merchant_reference_id: connector_merchant_config.client_merchant_reference_id,\n };\n\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config.merchant_payment_method_route_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing_reference,\n card,\n amount,\n rrn: item.router_data.request.merchant_order_reference_id.clone(),\n });\n\n // Generate current timestamp for sendDateTime (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)\n let send_date_time = OffsetDateTime::now_utc()\n .format(&time::format_description::well_known::Iso8601::DEFAULT)\n .map_err(|_| errors::ConnectorError::RequestEncodingFailed)?;\n\n Ok(Self::Card(PeachpaymentsPaymentsCardRequest {\n charge_method: \"ecommerce_card_payment_only\".to_string(),\n reference_id: item.router_data.connector_request_reference_id.clone(),\n ecommerce_card_payment_only_transaction_data: ecommerce_data,\n pos_data: None,\n send_date_time,\n }))\n }",
|
| 124 |
+
"diff_span": {
|
| 125 |
+
"before": " let merchant_information = MerchantInformation {\n client_merchant_reference_id: connector_merchant_config.client_merchant_reference_id,\n name: connector_merchant_config.name,\n mcc: connector_merchant_config.mcc,\n phone: connector_merchant_config.phone,\n email: connector_merchant_config.email,\n mobile: connector_merchant_config.mobile,\n address: connector_merchant_config.address,\n city: connector_merchant_config.city,\n postal_code: connector_merchant_config.postal_code,\n region_code: connector_merchant_config.region_code,\n merchant_type: connector_merchant_config.merchant_type,\n website_url: connector_merchant_config.website_url,\n };\n\n // Get routing configuration from metadata\n let routing = Routing {\n route: connector_merchant_config.route,\n mid: connector_merchant_config.mid,\n tid: connector_merchant_config.tid,\n visa_payment_facilitator_id: connector_merchant_config.visa_payment_facilitator_id,\n master_card_payment_facilitator_id: connector_merchant_config\n .master_card_payment_facilitator_id,\n sub_mid: connector_merchant_config.sub_mid,\n amex_id: connector_merchant_config.amex_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing,\n card,\n amount,",
|
| 126 |
+
"after": " };\n\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config.merchant_payment_method_route_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing_reference,\n card,\n amount,"
|
| 127 |
+
},
|
| 128 |
+
"commit_sha": "e6e88cc0ffb537f80384d8313e79883ca677d08f"
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"id": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs::struct::RoutingReference",
|
| 132 |
+
"file": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs",
|
| 133 |
+
"kind": "struct_item",
|
| 134 |
+
"status": "added",
|
| 135 |
+
"before_code": null,
|
| 136 |
+
"after_code": "pub struct RoutingReference {\n pub merchant_payment_method_route_id: Secret<String>,\n}",
|
| 137 |
+
"diff_span": null,
|
| 138 |
+
"commit_sha": "e6e88cc0ffb537f80384d8313e79883ca677d08f"
|
| 139 |
+
},
|
| 140 |
+
{
|
| 141 |
+
"id": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs::struct::Routing",
|
| 142 |
+
"file": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs",
|
| 143 |
+
"kind": "struct_item",
|
| 144 |
+
"status": "removed",
|
| 145 |
+
"before_code": "pub struct Routing {\n pub route: Route,\n pub mid: Secret<String>,\n pub tid: Secret<String>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub visa_payment_facilitator_id: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub master_card_payment_facilitator_id: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub sub_mid: Option<Secret<String>>,\n #[serde(skip_serializing_if = \"Option::is_none\")]\n pub amex_id: Option<Secret<String>>,\n}",
|
| 146 |
+
"after_code": null,
|
| 147 |
+
"diff_span": null,
|
| 148 |
+
"commit_sha": "e6e88cc0ffb537f80384d8313e79883ca677d08f"
|
| 149 |
+
}
|
| 150 |
+
]
|
| 151 |
+
}
|
diffs/pr_10143/e9fd028/diff.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "e9fd0288b27028fb2825d291952b5ec7d9c7776c",
|
| 3 |
+
"pr_number": 10143,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": [
|
| 8 |
+
{
|
| 9 |
+
"id": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs::impl::PeachpaymentsPaymentsRequest",
|
| 10 |
+
"file": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs",
|
| 11 |
+
"kind": "impl_item",
|
| 12 |
+
"status": "modified",
|
| 13 |
+
"code_changed": true,
|
| 14 |
+
"imports_changed": false,
|
| 15 |
+
"before_code": "impl TryFrom<(&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card)>\n for PeachpaymentsPaymentsRequest\n{\n type Error = error_stack::Report<errors::ConnectorError>;\n fn try_from(\n (item, req_card): (&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card),\n ) -> Result<Self, Self::Error> {\n let amount_in_cents = item.amount;\n\n let connector_merchant_config =\n PeachPaymentsConnectorMetadataObject::try_from(&item.router_data.connector_meta_data)?;\n\n let merchant_information = MerchantInformation {\n client_merchant_reference_id: connector_merchant_config.client_merchant_reference_id,\n };\n\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config.merchant_payment_method_route_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing_reference,\n card,\n amount,\n rrn: item.router_data.request.merchant_order_reference_id.clone(),\n });\n\n // Generate current timestamp for sendDateTime (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)\n let send_date_time = OffsetDateTime::now_utc()\n .format(&time::format_description::well_known::Iso8601::DEFAULT)\n .map_err(|_| errors::ConnectorError::RequestEncodingFailed)?;\n\n Ok(Self::Card(PeachpaymentsPaymentsCardRequest {\n charge_method: \"ecommerce_card_payment_only\".to_string(),\n reference_id: item.router_data.connector_request_reference_id.clone(),\n ecommerce_card_payment_only_transaction_data: ecommerce_data,\n pos_data: None,\n send_date_time,\n }))\n }\n}",
|
| 16 |
+
"after_code": "impl TryFrom<(&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card)>\n for PeachpaymentsPaymentsRequest\n{\n type Error = error_stack::Report<errors::ConnectorError>;\n fn try_from(\n (item, req_card): (&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card),\n ) -> Result<Self, Self::Error> {\n let amount_in_cents = item.amount;\n\n let connector_merchant_config =\n PeachPaymentsConnectorMetadataObject::try_from(&item.router_data.connector_meta_data)?;\n\n let merchant_information = MerchantInformation {\n client_merchant_reference_id: connector_merchant_config.client_merchant_reference_id,\n };\n\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config\n .merchant_payment_method_route_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing_reference,\n card,\n amount,\n rrn: item.router_data.request.merchant_order_reference_id.clone(),\n });\n\n // Generate current timestamp for sendDateTime (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)\n let send_date_time = OffsetDateTime::now_utc()\n .format(&time::format_description::well_known::Iso8601::DEFAULT)\n .map_err(|_| errors::ConnectorError::RequestEncodingFailed)?;\n\n Ok(Self::Card(PeachpaymentsPaymentsCardRequest {\n charge_method: \"ecommerce_card_payment_only\".to_string(),\n reference_id: item.router_data.connector_request_reference_id.clone(),\n ecommerce_card_payment_only_transaction_data: ecommerce_data,\n pos_data: None,\n send_date_time,\n }))\n }\n}",
|
| 17 |
+
"diff_span": {
|
| 18 |
+
"before": "\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config.merchant_payment_method_route_id,\n };\n",
|
| 19 |
+
"after": "\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config\n .merchant_payment_method_route_id,\n };\n"
|
| 20 |
+
},
|
| 21 |
+
"commit_sha": "e9fd0288b27028fb2825d291952b5ec7d9c7776c"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"id": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs::PeachpaymentsPaymentsRequest::function::try_from",
|
| 25 |
+
"file": "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs",
|
| 26 |
+
"kind": "function_item",
|
| 27 |
+
"status": "modified",
|
| 28 |
+
"code_changed": true,
|
| 29 |
+
"imports_changed": false,
|
| 30 |
+
"before_code": "fn try_from(\n (item, req_card): (&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card),\n ) -> Result<Self, Self::Error> {\n let amount_in_cents = item.amount;\n\n let connector_merchant_config =\n PeachPaymentsConnectorMetadataObject::try_from(&item.router_data.connector_meta_data)?;\n\n let merchant_information = MerchantInformation {\n client_merchant_reference_id: connector_merchant_config.client_merchant_reference_id,\n };\n\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config.merchant_payment_method_route_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing_reference,\n card,\n amount,\n rrn: item.router_data.request.merchant_order_reference_id.clone(),\n });\n\n // Generate current timestamp for sendDateTime (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)\n let send_date_time = OffsetDateTime::now_utc()\n .format(&time::format_description::well_known::Iso8601::DEFAULT)\n .map_err(|_| errors::ConnectorError::RequestEncodingFailed)?;\n\n Ok(Self::Card(PeachpaymentsPaymentsCardRequest {\n charge_method: \"ecommerce_card_payment_only\".to_string(),\n reference_id: item.router_data.connector_request_reference_id.clone(),\n ecommerce_card_payment_only_transaction_data: ecommerce_data,\n pos_data: None,\n send_date_time,\n }))\n }",
|
| 31 |
+
"after_code": "fn try_from(\n (item, req_card): (&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card),\n ) -> Result<Self, Self::Error> {\n let amount_in_cents = item.amount;\n\n let connector_merchant_config =\n PeachPaymentsConnectorMetadataObject::try_from(&item.router_data.connector_meta_data)?;\n\n let merchant_information = MerchantInformation {\n client_merchant_reference_id: connector_merchant_config.client_merchant_reference_id,\n };\n\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config\n .merchant_payment_method_route_id,\n };\n\n let card = CardDetails {\n pan: req_card.card_number.clone(),\n cardholder_name: req_card.card_holder_name.clone(),\n expiry_year: req_card.get_card_expiry_year_2_digit()?,\n expiry_month: req_card.card_exp_month.clone(),\n cvv: Some(req_card.card_cvc.clone()),\n };\n\n let amount = AmountDetails {\n amount: amount_in_cents,\n currency_code: item.router_data.request.currency.to_string(),\n display_amount: None,\n };\n\n let ecommerce_data =\n EcommercePaymentOnlyTransactionData::Card(EcommerceCardPaymentOnlyTransactionData {\n merchant_information,\n routing_reference,\n card,\n amount,\n rrn: item.router_data.request.merchant_order_reference_id.clone(),\n });\n\n // Generate current timestamp for sendDateTime (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)\n let send_date_time = OffsetDateTime::now_utc()\n .format(&time::format_description::well_known::Iso8601::DEFAULT)\n .map_err(|_| errors::ConnectorError::RequestEncodingFailed)?;\n\n Ok(Self::Card(PeachpaymentsPaymentsCardRequest {\n charge_method: \"ecommerce_card_payment_only\".to_string(),\n reference_id: item.router_data.connector_request_reference_id.clone(),\n ecommerce_card_payment_only_transaction_data: ecommerce_data,\n pos_data: None,\n send_date_time,\n }))\n }",
|
| 32 |
+
"diff_span": {
|
| 33 |
+
"before": "\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config.merchant_payment_method_route_id,\n };\n",
|
| 34 |
+
"after": "\n let routing_reference = RoutingReference {\n merchant_payment_method_route_id: connector_merchant_config\n .merchant_payment_method_route_id,\n };\n"
|
| 35 |
+
},
|
| 36 |
+
"commit_sha": "e9fd0288b27028fb2825d291952b5ec7d9c7776c"
|
| 37 |
+
}
|
| 38 |
+
]
|
| 39 |
+
}
|
diffs/pr_10148/5f83969/diff.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "5f8396953304c2dede2e90aefd737aa6503657c8",
|
| 3 |
+
"pr_number": 10148,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/payment_methods/src/configs/payment_connector_required_fields.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": [
|
| 8 |
+
{
|
| 9 |
+
"id": "crates/payment_methods/src/configs/payment_connector_required_fields.rs::function::get_cards_required_fields",
|
| 10 |
+
"file": "crates/payment_methods/src/configs/payment_connector_required_fields.rs",
|
| 11 |
+
"kind": "function_item",
|
| 12 |
+
"status": "modified",
|
| 13 |
+
"code_changed": true,
|
| 14 |
+
"imports_changed": false,
|
| 15 |
+
"before_code": "fn get_cards_required_fields() -> HashMap<Connector, RequiredFieldFinal> {\n HashMap::from([\n (Connector::Aci, fields(vec![], vec![], card_with_name())),\n (Connector::Authipay, fields(vec![], vec![], card_basic())),\n (Connector::Adyen, fields(vec![], vec![], card_with_name())),\n (Connector::Airwallex, fields(vec![], card_basic(), vec![])),\n (\n Connector::Authorizedotnet,\n fields(vec![], vec![], card_basic()),\n ),\n (\n Connector::Bambora,\n fields(vec![], [card_with_name(), billing_email()].concat(), vec![]),\n ),\n (\n Connector::Bankofamerica,\n fields(\n vec![],\n vec![],\n [card_basic(), email(), full_name(), billing_address()].concat(),\n ),\n ),\n (\n Connector::Barclaycard,\n fields(\n vec![],\n vec![],\n [card_basic(), email(), full_name(), billing_address()].concat(),\n ),\n ),\n (Connector::Billwerk, fields(vec![], vec![], card_basic())),\n (\n Connector::Bluesnap,\n fields(\n vec![],\n [card_basic(), email(), full_name()].concat(),\n vec![],\n ),\n ),\n (Connector::Boku, fields(vec![], vec![], card_basic())),\n (Connector::Braintree, fields(vec![], vec![], card_basic())),\n (Connector::Celero, fields(vec![], vec![], card_basic())),\n (Connector::Checkout, fields(vec![], card_basic(), vec![])),\n (\n Connector::Coinbase,\n fields(vec![], vec![RequiredField::BillingUserFirstName], vec![]),\n ),\n (\n Connector::Cybersource,\n fields(\n vec![],\n vec![],\n [card_with_name(), billing_email(), billing_address()].concat(),\n ),\n ),\n (\n Connector::Datatrans,\n fields(vec![], vec![], [billing_email(), card_with_name()].concat()),\n ),\n (\n Connector::Deutschebank,\n fields(\n vec![],\n [\n card_basic(),\n email(),\n billing_address(),\n vec![\n RequiredField::BillingFirstName(\"first_name\", FieldType::UserFullName),\n RequiredField::BillingLastName(\"last_name\", FieldType::UserFullName),\n ],\n ]\n .concat(),\n vec![],\n ),\n ),\n (\n Connector::Dlocal,\n fields(\n vec![],\n [\n card_with_name(),\n vec![RequiredField::BillingAddressCountries(vec![\"ALL\"])],\n ]\n .concat(),\n vec![],\n ),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector1,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector2,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector3,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector4,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector5,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector6,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector7,\n fields(vec![], vec![], card_basic()),\n ),\n (\n Connector::Elavon,\n fields(vec![], [card_basic(), billing_email()].concat(), vec![]),\n ),\n (Connector::Fiserv, fields(vec![], card_basic(), vec![])),\n (\n Connector::Fiuu,\n fields(\n vec![\n RequiredField::BillingEmail,\n RequiredField::BillingUserFirstName,\n ],\n vec![],\n card_basic(),\n ),\n ),\n (Connector::Forte, fields(vec![], card_with_name(), vec![])),\n (Connector::Globalpay, fields(vec![], vec![], card_basic())),\n (\n Connector::Hipay,\n fields(\n vec![],\n vec![],\n [\n vec![RequiredField::BillingEmail],\n billing_address(),\n card_with_name(),\n ]\n .concat(),\n ),\n ),\n (\n Connector::Helcim,\n fields(\n vec![],\n [\n card_with_name(),\n vec![\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressLine1,\n ],\n ]\n .concat(),\n vec![],\n ),\n ),\n (Connector::Iatapay, fields(vec![], vec![], vec![])),\n (Connector::Mollie, fields(vec![], card_with_name(), vec![])),\n (Connector::Moneris, fields(vec![], card_basic(), vec![])),\n (\n Connector::Multisafepay,\n fields(\n vec![],\n vec![],\n [\n card_with_name(),\n vec![\n RequiredField::BillingAddressLine1,\n RequiredField::BillingAddressLine2,\n RequiredField::BillingAddressCity,\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressCountries(vec![\"ALL\"]),\n ],\n ]\n .concat(),\n ),\n ),\n (Connector::Nexinets, fields(vec![], vec![], card_basic())),\n (\n Connector::Nexixpay,\n RequiredFieldFinal {\n mandate: HashMap::new(),\n non_mandate: HashMap::new(),\n common: HashMap::from([\n RequiredField::CardNumber.to_tuple(),\n RequiredField::CardExpMonth.to_tuple(),\n RequiredField::CardExpYear.to_tuple(),\n RequiredField::BillingFirstName(\"first_name\", FieldType::UserFullName)\n .to_tuple(),\n RequiredField::BillingLastName(\"last_name\", FieldType::UserFullName).to_tuple(),\n ]),\n },\n ),\n (\n Connector::Nmi,\n fields(\n vec![],\n [card_with_name(), vec![RequiredField::BillingAddressZip]].concat(),\n vec![],\n ),\n ),\n (Connector::Noon, fields(vec![], vec![], card_with_name())),\n (\n Connector::Novalnet,\n fields(\n vec![],\n vec![],\n [\n vec![\n RequiredField::BillingFirstName(\"first_name\", FieldType::UserFullName),\n RequiredField::BillingLastName(\"last_name\", FieldType::UserFullName),\n ],\n billing_email(),\n ]\n .concat(),\n ),\n ),\n (\n Connector::Nuvei,\n fields(\n vec![],\n vec![],\n [\n card_basic(),\n vec![\n RequiredField::BillingEmail,\n RequiredField::BillingCountries(vec![\"ALL\"]),\n RequiredField::BillingFirstName(\"first_name\", FieldType::UserFullName),\n RequiredField::BillingLastName(\"last_name\", FieldType::UserFullName),\n ],\n ]\n .concat(),\n ),\n ),\n (\n Connector::Paybox,\n fields(\n vec![],\n vec![],\n [\n email(),\n card_with_name(),\n vec![\n RequiredField::BillingAddressLine1,\n RequiredField::BillingAddressCity,\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressCountries(vec![\"ALL\"]),\n ],\n ]\n .concat(),\n ),\n ),\n (\n Connector::Paysafe,\n fields(\n vec![\n RequiredField::BillingAddressCountries(vec![\"ALL\"]),\n RequiredField::BillingEmail,\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressState,\n ],\n vec![],\n vec![],\n ),\n ),\n (\n Connector::Payload,\n fields(\n vec![],\n vec![],\n [\n email(),\n card_with_name(),\n vec![\n RequiredField::BillingAddressLine1,\n RequiredField::BillingAddressCity,\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressState,\n RequiredField::BillingAddressCountries(vec![\"ALL\"]),\n ],\n ]\n .concat(),\n ),\n ),\n (\n Connector::Payme,\n fields(vec![], vec![], [email(), card_with_name()].concat()),\n ),\n (Connector::Paypal, fields(vec![], card_basic(), vec![])),\n (Connector::Payu, fields(vec![], card_basic(), vec![])),\n (\n Connector::Peachpayments,\n fields(vec![], vec![], card_with_name()),\n ),\n (\n Connector::Powertranz,\n fields(vec![], card_with_name(), vec![]),\n ),\n (Connector::Rapyd, fields(vec![], card_with_name(), vec![])),\n (Connector::Redsys, fields(vec![], card_basic(), vec![])),\n (Connector::Shift4, fields(vec![], card_basic(), vec![])),\n (Connector::Silverflow, fields(vec![], vec![], card_basic())),\n (Connector::Square, fields(vec![], vec![], card_basic())),\n (Connector::Stax, fields(vec![], card_with_name(), vec![])),\n (Connector::Stripe, fields(vec![], vec![], card_basic())),\n (\n Connector::Trustpay,\n fields(\n vec![],\n [\n card_with_name(),\n vec![\n RequiredField::BillingAddressLine1,\n RequiredField::BillingAddressCity,\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressCountries(vec![\"ALL\"]),\n ],\n ]\n .concat(),\n vec![],\n ),\n ),\n (\n Connector::Trustpayments,\n fields(vec![], vec![], card_basic()),\n ),\n (\n Connector::Tesouro,\n fields(\n vec![],\n vec![],\n vec![\n RequiredField::CardNumber,\n RequiredField::CardExpMonth,\n RequiredField::CardExpYear,\n RequiredField::CardCvc,\n ],\n ),\n ),\n (Connector::Tsys, fields(vec![], card_basic(), vec![])),\n (\n Connector::Wellsfargo,\n fields(\n vec![],\n vec![],\n [card_with_name(), email(), billing_address()].concat(),\n ),\n ),\n (\n Connector::Worldline,\n fields(\n vec![],\n [\n card_basic(),\n vec![RequiredField::BillingAddressCountries(vec![\"ALL\"])],\n ]\n .concat(),\n vec![],\n ),\n ),\n (\n Connector::Worldpay,\n fields(\n vec![],\n vec![],\n vec![\n RequiredField::CardNumber,\n RequiredField::CardExpMonth,\n RequiredField::CardExpYear,\n RequiredField::BillingUserFirstName,\n ],\n ),\n ),\n (\n Connector::Worldpayvantiv,\n fields(vec![], card_basic(), vec![]),\n ),\n (\n Connector::Xendit,\n fields(\n vec![],\n vec![],\n [\n card_basic(),\n vec![\n RequiredField::BillingEmail,\n RequiredField::BillingPhone,\n RequiredField::BillingPhoneCountryCode,\n RequiredField::BillingUserFirstName,\n RequiredField::BillingUserLastName,\n RequiredField::BillingAddressCountries(vec![\"ID,PH\"]),\n ],\n ]\n .concat(),\n ),\n ),\n (\n Connector::Zen,\n RequiredFieldFinal {\n mandate: HashMap::new(),\n non_mandate: HashMap::from([\n RequiredField::CardNumber.to_tuple(),\n RequiredField::CardExpMonth.to_tuple(),\n RequiredField::CardExpYear.to_tuple(),\n RequiredField::Email.to_tuple(),\n ]),\n common: HashMap::new(),\n },\n ),\n ])\n}",
|
| 16 |
+
"after_code": "fn get_cards_required_fields() -> HashMap<Connector, RequiredFieldFinal> {\n HashMap::from([\n (Connector::Aci, fields(vec![], vec![], card_with_name())),\n (Connector::Authipay, fields(vec![], vec![], card_basic())),\n (Connector::Adyen, fields(vec![], vec![], card_basic())),\n (Connector::Airwallex, fields(vec![], card_basic(), vec![])),\n (\n Connector::Authorizedotnet,\n fields(vec![], vec![], card_basic()),\n ),\n (\n Connector::Bambora,\n fields(vec![], [card_with_name(), billing_email()].concat(), vec![]),\n ),\n (\n Connector::Bankofamerica,\n fields(\n vec![],\n vec![],\n [card_basic(), email(), full_name(), billing_address()].concat(),\n ),\n ),\n (\n Connector::Barclaycard,\n fields(\n vec![],\n vec![],\n [card_basic(), email(), full_name(), billing_address()].concat(),\n ),\n ),\n (Connector::Billwerk, fields(vec![], vec![], card_basic())),\n (\n Connector::Bluesnap,\n fields(\n vec![],\n [card_basic(), email(), full_name()].concat(),\n vec![],\n ),\n ),\n (Connector::Boku, fields(vec![], vec![], card_basic())),\n (Connector::Braintree, fields(vec![], vec![], card_basic())),\n (Connector::Celero, fields(vec![], vec![], card_basic())),\n (Connector::Checkout, fields(vec![], card_basic(), vec![])),\n (\n Connector::Coinbase,\n fields(vec![], vec![RequiredField::BillingUserFirstName], vec![]),\n ),\n (\n Connector::Cybersource,\n fields(\n vec![],\n vec![],\n [card_with_name(), billing_email(), billing_address()].concat(),\n ),\n ),\n (\n Connector::Datatrans,\n fields(vec![], vec![], [billing_email(), card_with_name()].concat()),\n ),\n (\n Connector::Deutschebank,\n fields(\n vec![],\n [\n card_basic(),\n email(),\n billing_address(),\n vec![\n RequiredField::BillingFirstName(\"first_name\", FieldType::UserFullName),\n RequiredField::BillingLastName(\"last_name\", FieldType::UserFullName),\n ],\n ]\n .concat(),\n vec![],\n ),\n ),\n (\n Connector::Dlocal,\n fields(\n vec![],\n [\n card_with_name(),\n vec![RequiredField::BillingAddressCountries(vec![\"ALL\"])],\n ]\n .concat(),\n vec![],\n ),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector1,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector2,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector3,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector4,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector5,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector6,\n fields(vec![], vec![], card_basic()),\n ),\n #[cfg(feature = \"dummy_connector\")]\n (\n Connector::DummyConnector7,\n fields(vec![], vec![], card_basic()),\n ),\n (\n Connector::Elavon,\n fields(vec![], [card_basic(), billing_email()].concat(), vec![]),\n ),\n (Connector::Fiserv, fields(vec![], card_basic(), vec![])),\n (\n Connector::Fiuu,\n fields(\n vec![\n RequiredField::BillingEmail,\n RequiredField::BillingUserFirstName,\n ],\n vec![],\n card_basic(),\n ),\n ),\n (Connector::Forte, fields(vec![], card_with_name(), vec![])),\n (Connector::Globalpay, fields(vec![], vec![], card_basic())),\n (\n Connector::Hipay,\n fields(\n vec![],\n vec![],\n [\n vec![RequiredField::BillingEmail],\n billing_address(),\n card_with_name(),\n ]\n .concat(),\n ),\n ),\n (\n Connector::Helcim,\n fields(\n vec![],\n [\n card_with_name(),\n vec![\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressLine1,\n ],\n ]\n .concat(),\n vec![],\n ),\n ),\n (Connector::Iatapay, fields(vec![], vec![], vec![])),\n (Connector::Mollie, fields(vec![], card_with_name(), vec![])),\n (Connector::Moneris, fields(vec![], card_basic(), vec![])),\n (\n Connector::Multisafepay,\n fields(\n vec![],\n vec![],\n [\n card_with_name(),\n vec![\n RequiredField::BillingAddressLine1,\n RequiredField::BillingAddressLine2,\n RequiredField::BillingAddressCity,\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressCountries(vec![\"ALL\"]),\n ],\n ]\n .concat(),\n ),\n ),\n (Connector::Nexinets, fields(vec![], vec![], card_basic())),\n (\n Connector::Nexixpay,\n RequiredFieldFinal {\n mandate: HashMap::new(),\n non_mandate: HashMap::new(),\n common: HashMap::from([\n RequiredField::CardNumber.to_tuple(),\n RequiredField::CardExpMonth.to_tuple(),\n RequiredField::CardExpYear.to_tuple(),\n RequiredField::BillingFirstName(\"first_name\", FieldType::UserFullName)\n .to_tuple(),\n RequiredField::BillingLastName(\"last_name\", FieldType::UserFullName).to_tuple(),\n ]),\n },\n ),\n (\n Connector::Nmi,\n fields(\n vec![],\n [card_with_name(), vec![RequiredField::BillingAddressZip]].concat(),\n vec![],\n ),\n ),\n (Connector::Noon, fields(vec![], vec![], card_with_name())),\n (\n Connector::Novalnet,\n fields(\n vec![],\n vec![],\n [\n vec![\n RequiredField::BillingFirstName(\"first_name\", FieldType::UserFullName),\n RequiredField::BillingLastName(\"last_name\", FieldType::UserFullName),\n ],\n billing_email(),\n ]\n .concat(),\n ),\n ),\n (\n Connector::Nuvei,\n fields(\n vec![],\n vec![],\n [\n card_basic(),\n vec![\n RequiredField::BillingEmail,\n RequiredField::BillingCountries(vec![\"ALL\"]),\n RequiredField::BillingFirstName(\"first_name\", FieldType::UserFullName),\n RequiredField::BillingLastName(\"last_name\", FieldType::UserFullName),\n ],\n ]\n .concat(),\n ),\n ),\n (\n Connector::Paybox,\n fields(\n vec![],\n vec![],\n [\n email(),\n card_with_name(),\n vec![\n RequiredField::BillingAddressLine1,\n RequiredField::BillingAddressCity,\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressCountries(vec![\"ALL\"]),\n ],\n ]\n .concat(),\n ),\n ),\n (\n Connector::Paysafe,\n fields(\n vec![\n RequiredField::BillingAddressCountries(vec![\"ALL\"]),\n RequiredField::BillingEmail,\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressState,\n ],\n vec![],\n vec![],\n ),\n ),\n (\n Connector::Payload,\n fields(\n vec![],\n vec![],\n [\n email(),\n card_with_name(),\n vec![\n RequiredField::BillingAddressLine1,\n RequiredField::BillingAddressCity,\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressState,\n RequiredField::BillingAddressCountries(vec![\"ALL\"]),\n ],\n ]\n .concat(),\n ),\n ),\n (\n Connector::Payme,\n fields(vec![], vec![], [email(), card_with_name()].concat()),\n ),\n (Connector::Paypal, fields(vec![], card_basic(), vec![])),\n (Connector::Payu, fields(vec![], card_basic(), vec![])),\n (\n Connector::Peachpayments,\n fields(vec![], vec![], card_with_name()),\n ),\n (\n Connector::Powertranz,\n fields(vec![], card_with_name(), vec![]),\n ),\n (Connector::Rapyd, fields(vec![], card_with_name(), vec![])),\n (Connector::Redsys, fields(vec![], card_basic(), vec![])),\n (Connector::Shift4, fields(vec![], card_basic(), vec![])),\n (Connector::Silverflow, fields(vec![], vec![], card_basic())),\n (Connector::Square, fields(vec![], vec![], card_basic())),\n (Connector::Stax, fields(vec![], card_with_name(), vec![])),\n (Connector::Stripe, fields(vec![], vec![], card_basic())),\n (\n Connector::Trustpay,\n fields(\n vec![],\n [\n card_with_name(),\n vec![\n RequiredField::BillingAddressLine1,\n RequiredField::BillingAddressCity,\n RequiredField::BillingAddressZip,\n RequiredField::BillingAddressCountries(vec![\"ALL\"]),\n ],\n ]\n .concat(),\n vec![],\n ),\n ),\n (\n Connector::Trustpayments,\n fields(vec![], vec![], card_basic()),\n ),\n (\n Connector::Tesouro,\n fields(\n vec![],\n vec![],\n vec![\n RequiredField::CardNumber,\n RequiredField::CardExpMonth,\n RequiredField::CardExpYear,\n RequiredField::CardCvc,\n ],\n ),\n ),\n (Connector::Tsys, fields(vec![], card_basic(), vec![])),\n (\n Connector::Wellsfargo,\n fields(\n vec![],\n vec![],\n [card_with_name(), email(), billing_address()].concat(),\n ),\n ),\n (\n Connector::Worldline,\n fields(\n vec![],\n [\n card_basic(),\n vec![RequiredField::BillingAddressCountries(vec![\"ALL\"])],\n ]\n .concat(),\n vec![],\n ),\n ),\n (\n Connector::Worldpay,\n fields(\n vec![],\n vec![],\n vec![\n RequiredField::CardNumber,\n RequiredField::CardExpMonth,\n RequiredField::CardExpYear,\n RequiredField::BillingUserFirstName,\n ],\n ),\n ),\n (\n Connector::Worldpayvantiv,\n fields(vec![], card_basic(), vec![]),\n ),\n (\n Connector::Xendit,\n fields(\n vec![],\n vec![],\n [\n card_basic(),\n vec![\n RequiredField::BillingEmail,\n RequiredField::BillingPhone,\n RequiredField::BillingPhoneCountryCode,\n RequiredField::BillingUserFirstName,\n RequiredField::BillingUserLastName,\n RequiredField::BillingAddressCountries(vec![\"ID,PH\"]),\n ],\n ]\n .concat(),\n ),\n ),\n (\n Connector::Zen,\n RequiredFieldFinal {\n mandate: HashMap::new(),\n non_mandate: HashMap::from([\n RequiredField::CardNumber.to_tuple(),\n RequiredField::CardExpMonth.to_tuple(),\n RequiredField::CardExpYear.to_tuple(),\n RequiredField::Email.to_tuple(),\n ]),\n common: HashMap::new(),\n },\n ),\n ])\n}",
|
| 17 |
+
"diff_span": {
|
| 18 |
+
"before": " (Connector::Aci, fields(vec![], vec![], card_with_name())),\n (Connector::Authipay, fields(vec![], vec![], card_basic())),\n (Connector::Adyen, fields(vec![], vec![], card_with_name())),\n (Connector::Airwallex, fields(vec![], card_basic(), vec![])),\n (",
|
| 19 |
+
"after": " (Connector::Aci, fields(vec![], vec![], card_with_name())),\n (Connector::Authipay, fields(vec![], vec![], card_basic())),\n (Connector::Adyen, fields(vec![], vec![], card_basic())),\n (Connector::Airwallex, fields(vec![], card_basic(), vec![])),\n ("
|
| 20 |
+
},
|
| 21 |
+
"commit_sha": "5f8396953304c2dede2e90aefd737aa6503657c8"
|
| 22 |
+
}
|
| 23 |
+
]
|
| 24 |
+
}
|
diffs/pr_10193/04c94f8/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "04c94f81ebed0da7327a258b5d81a3be52af3fa9",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_10193/06ea2a6/diff.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "06ea2a63f27919f9def5e3b17c4c15c95b6acb9e",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/common_enums/src/enums.rs",
|
| 6 |
+
"crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs",
|
| 7 |
+
"crates/hyperswitch_domain_models/src/router_request_types.rs",
|
| 8 |
+
"crates/router/src/core/payments/types.rs"
|
| 9 |
+
],
|
| 10 |
+
"diffs": [
|
| 11 |
+
{
|
| 12 |
+
"id": "crates/hyperswitch_domain_models/src/router_request_types.rs::struct::AuthenticationData",
|
| 13 |
+
"file": "crates/hyperswitch_domain_models/src/router_request_types.rs",
|
| 14 |
+
"kind": "struct_item",
|
| 15 |
+
"status": "modified",
|
| 16 |
+
"code_changed": true,
|
| 17 |
+
"imports_changed": false,
|
| 18 |
+
"before_code": "pub struct AuthenticationData {\n pub eci: Option<common_enums::enums::Eci>,\n pub cavv: Secret<String>,\n pub threeds_server_transaction_id: Option<String>,\n pub message_version: Option<SemanticVersion>,\n pub ds_trans_id: Option<String>,\n pub created_at: time::PrimitiveDateTime,\n pub challenge_code: Option<String>,\n pub challenge_cancel: Option<String>,\n pub challenge_code_reason: Option<String>,\n pub message_extension: Option<pii::SecretSerdeValue>,\n pub acs_trans_id: Option<String>,\n pub authentication_type: Option<common_enums::DecoupledAuthenticationType>,\n pub cb_network_params: Option<api_models::payments::NetworkParams>,\n pub exemption_indicator: Option<common_enums::ExemptionIndicator>,\n}",
|
| 19 |
+
"after_code": "pub struct AuthenticationData {\n pub eci: Option<common_enums::enums::Eci>,\n pub cavv: Secret<String>,\n pub threeds_server_transaction_id: Option<String>,\n pub message_version: Option<SemanticVersion>,\n pub ds_trans_id: Option<String>,\n pub created_at: time::PrimitiveDateTime,\n pub challenge_code: Option<String>,\n pub challenge_cancel: Option<String>,\n pub challenge_code_reason: Option<String>,\n pub message_extension: Option<pii::SecretSerdeValue>,\n pub acs_trans_id: Option<String>,\n pub authentication_type: Option<common_enums::DecoupledAuthenticationType>,\n pub transaction_status: Option<common_enums::TransactionStatus>,\n pub cb_network_params: Option<api_models::payments::NetworkParams>,\n pub exemption_indicator: Option<common_enums::ExemptionIndicator>,\n}",
|
| 20 |
+
"diff_span": {
|
| 21 |
+
"before": "",
|
| 22 |
+
"after": " pub acs_trans_id: Option<String>,\n pub authentication_type: Option<common_enums::DecoupledAuthenticationType>,\n pub transaction_status: Option<common_enums::TransactionStatus>,\n pub cb_network_params: Option<api_models::payments::NetworkParams>,\n pub exemption_indicator: Option<common_enums::ExemptionIndicator>,"
|
| 23 |
+
},
|
| 24 |
+
"commit_sha": "06ea2a63f27919f9def5e3b17c4c15c95b6acb9e"
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"id": "crates/router/src/core/payments/types.rs::AuthenticationData::function::foreign_try_from",
|
| 28 |
+
"file": "crates/router/src/core/payments/types.rs",
|
| 29 |
+
"kind": "function_item",
|
| 30 |
+
"status": "modified",
|
| 31 |
+
"code_changed": true,
|
| 32 |
+
"imports_changed": false,
|
| 33 |
+
"before_code": "fn foreign_try_from(\n external_auth_data: &api_models::payments::ExternalThreeDsData,\n ) -> Result<Self, Self::Error> {\n let cavv = match &external_auth_data.authentication_cryptogram {\n api_models::payments::Cryptogram::Cavv {\n authentication_cryptogram,\n } => authentication_cryptogram.clone(),\n api_models::payments::Cryptogram::Tavv {\n token_authentication_cryptogram,\n } => token_authentication_cryptogram.clone(),\n };\n\n let authentication_type = match external_auth_data.transaction_status {\n common_enums::TransactionStatus::ChallengeRequired\n | common_enums::TransactionStatus::ChallengeRequiredDecoupledAuthentication => {\n Some(common_enums::DecoupledAuthenticationType::Challenge)\n }\n _ => Some(common_enums::DecoupledAuthenticationType::Frictionless),\n };\n\n Ok(Self {\n eci: Some(external_auth_data.eci.clone()),\n cavv,\n threeds_server_transaction_id: Some(external_auth_data.ds_trans_id.clone()),\n message_version: common_utils::types::SemanticVersion::from_str(\n &external_auth_data.version,\n )\n .ok(),\n ds_trans_id: Some(external_auth_data.ds_trans_id.clone()),\n created_at: time::PrimitiveDateTime::new(\n time::OffsetDateTime::now_utc().date(),\n time::OffsetDateTime::now_utc().time(),\n ),\n challenge_code: None,\n challenge_cancel: None,\n challenge_code_reason: None,\n message_extension: None,\n acs_trans_id: None,\n authentication_type,\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),\n })\n }",
|
| 34 |
+
"after_code": "fn foreign_try_from(\n external_auth_data: &api_models::payments::ExternalThreeDsData,\n ) -> Result<Self, Self::Error> {\n let cavv = match &external_auth_data.authentication_cryptogram {\n api_models::payments::Cryptogram::Cavv {\n authentication_cryptogram,\n } => authentication_cryptogram.clone(),\n api_models::payments::Cryptogram::Tavv {\n token_authentication_cryptogram,\n } => token_authentication_cryptogram.clone(),\n };\n\n Ok(Self {\n eci: Some(external_auth_data.eci.clone()),\n cavv,\n threeds_server_transaction_id: Some(external_auth_data.ds_trans_id.clone()),\n message_version: common_utils::types::SemanticVersion::from_str(\n &external_auth_data.version,\n )\n .ok(),\n ds_trans_id: Some(external_auth_data.ds_trans_id.clone()),\n created_at: time::PrimitiveDateTime::new(\n time::OffsetDateTime::now_utc().date(),\n time::OffsetDateTime::now_utc().time(),\n ),\n challenge_code: None,\n challenge_cancel: None,\n challenge_code_reason: None,\n message_extension: None,\n acs_trans_id: None,\n authentication_type: None,\n transaction_status: Some(external_auth_data.transaction_status.clone()),\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),\n })\n }",
|
| 35 |
+
"diff_span": {
|
| 36 |
+
"before": " token_authentication_cryptogram,\n } => token_authentication_cryptogram.clone(),\n };\n\n let authentication_type = match external_auth_data.transaction_status {\n common_enums::TransactionStatus::ChallengeRequired\n | common_enums::TransactionStatus::ChallengeRequiredDecoupledAuthentication => {\n Some(common_enums::DecoupledAuthenticationType::Challenge)\n }\n _ => Some(common_enums::DecoupledAuthenticationType::Frictionless),\n };\n\n Ok(Self {\n eci: Some(external_auth_data.eci.clone()),\n cavv,\n threeds_server_transaction_id: Some(external_auth_data.ds_trans_id.clone()),\n message_version: common_utils::types::SemanticVersion::from_str(\n &external_auth_data.version,\n )\n .ok(),\n ds_trans_id: Some(external_auth_data.ds_trans_id.clone()),\n created_at: time::PrimitiveDateTime::new(\n time::OffsetDateTime::now_utc().date(),\n time::OffsetDateTime::now_utc().time(),\n ),\n challenge_code: None,\n challenge_cancel: None,\n challenge_code_reason: None,\n message_extension: None,\n acs_trans_id: None,\n authentication_type,\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),",
|
| 37 |
+
"after": " message_extension: None,\n acs_trans_id: None,\n authentication_type: None,\n transaction_status: Some(external_auth_data.transaction_status.clone()),\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),"
|
| 38 |
+
},
|
| 39 |
+
"commit_sha": "06ea2a63f27919f9def5e3b17c4c15c95b6acb9e"
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"id": "crates/common_enums/src/enums.rs::impl::TransactionStatus",
|
| 43 |
+
"file": "crates/common_enums/src/enums.rs",
|
| 44 |
+
"kind": "impl_item",
|
| 45 |
+
"status": "modified",
|
| 46 |
+
"code_changed": true,
|
| 47 |
+
"imports_changed": false,
|
| 48 |
+
"before_code": "impl From<DecoupledAuthenticationType> for TransactionStatus {\n fn from(auth_type: DecoupledAuthenticationType) -> Self {\n match auth_type {\n DecoupledAuthenticationType::Challenge => Self::ChallengeRequired,\n DecoupledAuthenticationType::Frictionless => Self::Success,\n }\n }\n}",
|
| 49 |
+
"after_code": "impl TransactionStatus {\n pub fn is_pending(self) -> bool {\n matches!(\n self,\n Self::ChallengeRequired | Self::ChallengeRequiredDecoupledAuthentication\n )\n }\n\n pub fn is_terminal_state(self) -> bool {\n matches!(self, Self::Success | Self::Failure)\n }\n}",
|
| 50 |
+
"diff_span": {
|
| 51 |
+
"before": "impl From<DecoupledAuthenticationType> for TransactionStatus {\n fn from(auth_type: DecoupledAuthenticationType) -> Self {\n match auth_type {\n DecoupledAuthenticationType::Challenge => Self::ChallengeRequired,\n DecoupledAuthenticationType::Frictionless => Self::Success,\n }\n }\n}",
|
| 52 |
+
"after": "impl TransactionStatus {\n pub fn is_pending(self) -> bool {\n matches!(\n self,\n Self::ChallengeRequired | Self::ChallengeRequiredDecoupledAuthentication\n )\n }\n\n pub fn is_terminal_state(self) -> bool {\n matches!(self, Self::Success | Self::Failure)\n }\n}"
|
| 53 |
+
},
|
| 54 |
+
"commit_sha": "06ea2a63f27919f9def5e3b17c4c15c95b6acb9e"
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"id": "crates/router/src/core/payments/types.rs::impl::AuthenticationData",
|
| 58 |
+
"file": "crates/router/src/core/payments/types.rs",
|
| 59 |
+
"kind": "impl_item",
|
| 60 |
+
"status": "modified",
|
| 61 |
+
"code_changed": true,
|
| 62 |
+
"imports_changed": false,
|
| 63 |
+
"before_code": "impl ForeignTryFrom<&api_models::payments::ExternalThreeDsData> for AuthenticationData {\n type Error = error_stack::Report<errors::ApiErrorResponse>;\n\n fn foreign_try_from(\n external_auth_data: &api_models::payments::ExternalThreeDsData,\n ) -> Result<Self, Self::Error> {\n let cavv = match &external_auth_data.authentication_cryptogram {\n api_models::payments::Cryptogram::Cavv {\n authentication_cryptogram,\n } => authentication_cryptogram.clone(),\n api_models::payments::Cryptogram::Tavv {\n token_authentication_cryptogram,\n } => token_authentication_cryptogram.clone(),\n };\n\n let authentication_type = match external_auth_data.transaction_status {\n common_enums::TransactionStatus::ChallengeRequired\n | common_enums::TransactionStatus::ChallengeRequiredDecoupledAuthentication => {\n Some(common_enums::DecoupledAuthenticationType::Challenge)\n }\n _ => Some(common_enums::DecoupledAuthenticationType::Frictionless),\n };\n\n Ok(Self {\n eci: Some(external_auth_data.eci.clone()),\n cavv,\n threeds_server_transaction_id: Some(external_auth_data.ds_trans_id.clone()),\n message_version: common_utils::types::SemanticVersion::from_str(\n &external_auth_data.version,\n )\n .ok(),\n ds_trans_id: Some(external_auth_data.ds_trans_id.clone()),\n created_at: time::PrimitiveDateTime::new(\n time::OffsetDateTime::now_utc().date(),\n time::OffsetDateTime::now_utc().time(),\n ),\n challenge_code: None,\n challenge_cancel: None,\n challenge_code_reason: None,\n message_extension: None,\n acs_trans_id: None,\n authentication_type,\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),\n })\n }\n}",
|
| 64 |
+
"after_code": "impl ForeignTryFrom<&api_models::payments::ExternalThreeDsData> for AuthenticationData {\n type Error = error_stack::Report<errors::ApiErrorResponse>;\n\n fn foreign_try_from(\n external_auth_data: &api_models::payments::ExternalThreeDsData,\n ) -> Result<Self, Self::Error> {\n let cavv = match &external_auth_data.authentication_cryptogram {\n api_models::payments::Cryptogram::Cavv {\n authentication_cryptogram,\n } => authentication_cryptogram.clone(),\n api_models::payments::Cryptogram::Tavv {\n token_authentication_cryptogram,\n } => token_authentication_cryptogram.clone(),\n };\n\n Ok(Self {\n eci: Some(external_auth_data.eci.clone()),\n cavv,\n threeds_server_transaction_id: Some(external_auth_data.ds_trans_id.clone()),\n message_version: common_utils::types::SemanticVersion::from_str(\n &external_auth_data.version,\n )\n .ok(),\n ds_trans_id: Some(external_auth_data.ds_trans_id.clone()),\n created_at: time::PrimitiveDateTime::new(\n time::OffsetDateTime::now_utc().date(),\n time::OffsetDateTime::now_utc().time(),\n ),\n challenge_code: None,\n challenge_cancel: None,\n challenge_code_reason: None,\n message_extension: None,\n acs_trans_id: None,\n authentication_type: None,\n transaction_status: Some(external_auth_data.transaction_status.clone()),\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),\n })\n }\n}",
|
| 65 |
+
"diff_span": {
|
| 66 |
+
"before": " token_authentication_cryptogram,\n } => token_authentication_cryptogram.clone(),\n };\n\n let authentication_type = match external_auth_data.transaction_status {\n common_enums::TransactionStatus::ChallengeRequired\n | common_enums::TransactionStatus::ChallengeRequiredDecoupledAuthentication => {\n Some(common_enums::DecoupledAuthenticationType::Challenge)\n }\n _ => Some(common_enums::DecoupledAuthenticationType::Frictionless),\n };\n\n Ok(Self {\n eci: Some(external_auth_data.eci.clone()),\n cavv,\n threeds_server_transaction_id: Some(external_auth_data.ds_trans_id.clone()),\n message_version: common_utils::types::SemanticVersion::from_str(\n &external_auth_data.version,\n )\n .ok(),\n ds_trans_id: Some(external_auth_data.ds_trans_id.clone()),\n created_at: time::PrimitiveDateTime::new(\n time::OffsetDateTime::now_utc().date(),\n time::OffsetDateTime::now_utc().time(),\n ),\n challenge_code: None,\n challenge_cancel: None,\n challenge_code_reason: None,\n message_extension: None,\n acs_trans_id: None,\n authentication_type,\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),",
|
| 67 |
+
"after": " message_extension: None,\n acs_trans_id: None,\n authentication_type: None,\n transaction_status: Some(external_auth_data.transaction_status.clone()),\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),"
|
| 68 |
+
},
|
| 69 |
+
"commit_sha": "06ea2a63f27919f9def5e3b17c4c15c95b6acb9e"
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"id": "crates/common_enums/src/enums.rs::TransactionStatus::function::from",
|
| 73 |
+
"file": "crates/common_enums/src/enums.rs",
|
| 74 |
+
"kind": "function_item",
|
| 75 |
+
"status": "removed",
|
| 76 |
+
"before_code": "fn from(auth_type: DecoupledAuthenticationType) -> Self {\n match auth_type {\n DecoupledAuthenticationType::Challenge => Self::ChallengeRequired,\n DecoupledAuthenticationType::Frictionless => Self::Success,\n }\n }",
|
| 77 |
+
"after_code": null,
|
| 78 |
+
"diff_span": null,
|
| 79 |
+
"commit_sha": "06ea2a63f27919f9def5e3b17c4c15c95b6acb9e"
|
| 80 |
+
}
|
| 81 |
+
]
|
| 82 |
+
}
|
diffs/pr_10193/0ff4674/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "0ff467459e5ab3d3817cc8141d6bf03c9e21ef4c",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_10193/164582b/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10193/1f5a3ac/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "1f5a3ac8c25c687e8e20b79ca0815af0042dad71",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_10193/28fd837/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "28fd837545dab513da3ed4f57697369add0540a3",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_10193/2df79c0/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10193/332eef1/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "332eef1c04972aefe8c8f4470daae42240032b51",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_10193/37a7989/diff.json
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "37a79898b3af0702f437551eedbc7c5812272814",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/api_models/src/payments.rs",
|
| 6 |
+
"crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs",
|
| 7 |
+
"crates/router/src/core/payments/types.rs"
|
| 8 |
+
],
|
| 9 |
+
"diffs": [
|
| 10 |
+
{
|
| 11 |
+
"id": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs::impl::AdyenPaymentRequest<'_>",
|
| 12 |
+
"file": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs",
|
| 13 |
+
"kind": "impl_item",
|
| 14 |
+
"status": "modified",
|
| 15 |
+
"code_changed": true,
|
| 16 |
+
"imports_changed": false,
|
| 17 |
+
"before_code": "impl\n TryFrom<(\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n )> for AdyenPaymentRequest<'_>\n{\n type Error = Error;\n fn try_from(\n value: (\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n ),\n ) -> Result<Self, Self::Error> {\n let (item, token_data) = value;\n let amount = get_amount_data(item);\n let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;\n let shopper_interaction = AdyenShopperInteraction::from(item.router_data);\n let shopper_reference = build_shopper_reference(item.router_data);\n let (recurring_processing_model, store_payment_method, _) =\n get_recurring_processing_model(item.router_data)?;\n let browser_info = get_browser_info(item.router_data)?;\n let billing_address =\n get_address_info(item.router_data.get_optional_billing()).transpose()?;\n let country_code = get_country_code(item.router_data.get_optional_billing());\n let additional_data = get_additional_data(item.router_data);\n let return_url = item.router_data.request.get_router_return_url()?;\n let testing_data = item\n .router_data\n .request\n .get_connector_testing_data()\n .map(AdyenTestingData::try_from)\n .transpose()?;\n let test_holder_name = testing_data.and_then(|test_data| test_data.holder_name);\n let card_holder_name =\n test_holder_name.or(item.router_data.get_optional_billing_full_name());\n let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(\n AdyenPaymentMethod::try_from((token_data, card_holder_name))?,\n ));\n\n let shopper_email = item.router_data.request.email.clone();\n let shopper_name = get_shopper_name(item.router_data.get_optional_billing());\n let mpi_data = AdyenMpiData {\n directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n auth_value: Some(AuthenticationValue::Tavv {\n tavv: token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n }),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,\n three_ds_version: None,\n challenge_cancel: None,\n risk_score: None,\n cavv_algorithm: None,\n };\n let adyen_metadata = get_adyen_metadata(item.router_data.request.metadata.clone());\n\n let (store, splits) = match item.router_data.request.split_payments.as_ref() {\n Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(\n adyen_split_payment,\n )) => get_adyen_split_request(adyen_split_payment, item.router_data.request.currency),\n _ => (adyen_metadata.store.clone(), None),\n };\n let device_fingerprint = adyen_metadata.device_fingerprint.clone();\n let platform_chargeback_logic = adyen_metadata.platform_chargeback_logic.clone();\n\n let delivery_address =\n get_address_info(item.router_data.get_optional_shipping()).and_then(Result::ok);\n let telephone_number = item.router_data.get_optional_billing_phone_number();\n\n Ok(AdyenPaymentRequest {\n amount,\n merchant_account: auth_type.merchant_account,\n payment_method,\n reference: item.router_data.connector_request_reference_id.clone(),\n return_url,\n shopper_interaction,\n recurring_processing_model,\n browser_info,\n additional_data,\n telephone_number,\n shopper_name,\n shopper_email,\n shopper_locale: item.router_data.request.locale.clone(),\n social_security_number: None,\n billing_address,\n delivery_address,\n country_code,\n line_items: None,\n shopper_reference,\n store_payment_method,\n channel: None,\n shopper_statement: get_shopper_statement(item.router_data),\n shopper_ip: item.router_data.request.get_ip_address_as_optional(),\n merchant_order_reference: item.router_data.request.merchant_order_reference_id.clone(),\n mpi_data: Some(mpi_data),\n store,\n splits,\n device_fingerprint,\n session_validity: None,\n metadata: item\n .router_data\n .request\n .metadata\n .clone()\n .map(filter_adyen_metadata),\n platform_chargeback_logic,\n })\n }\n}",
|
| 18 |
+
"after_code": "impl\n TryFrom<(\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n )> for AdyenPaymentRequest<'_>\n{\n type Error = Error;\n fn try_from(\n value: (\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n ),\n ) -> Result<Self, Self::Error> {\n let (item, token_data) = value;\n let amount = get_amount_data(item);\n let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;\n let shopper_interaction = AdyenShopperInteraction::from(item.router_data);\n let shopper_reference = build_shopper_reference(item.router_data);\n let (recurring_processing_model, store_payment_method, _) =\n get_recurring_processing_model(item.router_data)?;\n let browser_info = get_browser_info(item.router_data)?;\n let billing_address =\n get_address_info(item.router_data.get_optional_billing()).transpose()?;\n let country_code = get_country_code(item.router_data.get_optional_billing());\n let additional_data = get_additional_data(item.router_data);\n let return_url = item.router_data.request.get_router_return_url()?;\n let testing_data = item\n .router_data\n .request\n .get_connector_testing_data()\n .map(AdyenTestingData::try_from)\n .transpose()?;\n let test_holder_name = testing_data.and_then(|test_data| test_data.holder_name);\n let card_holder_name =\n test_holder_name.or(item.router_data.get_optional_billing_full_name());\n let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(\n AdyenPaymentMethod::try_from((token_data, card_holder_name))?,\n ));\n\n let shopper_email = item.router_data.request.email.clone();\n let shopper_name = get_shopper_name(item.router_data.get_optional_billing());\n let mpi_data = AdyenMpiData {\n directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n cavv: None,\n token_authentication_verification_value: Some(\n token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n ),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,\n three_ds_version: None,\n challenge_cancel: None,\n risk_score: None,\n cavv_algorithm: None,\n };\n let adyen_metadata = get_adyen_metadata(item.router_data.request.metadata.clone());\n\n let (store, splits) = match item.router_data.request.split_payments.as_ref() {\n Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(\n adyen_split_payment,\n )) => get_adyen_split_request(adyen_split_payment, item.router_data.request.currency),\n _ => (adyen_metadata.store.clone(), None),\n };\n let device_fingerprint = adyen_metadata.device_fingerprint.clone();\n let platform_chargeback_logic = adyen_metadata.platform_chargeback_logic.clone();\n\n let delivery_address =\n get_address_info(item.router_data.get_optional_shipping()).and_then(Result::ok);\n let telephone_number = item.router_data.get_optional_billing_phone_number();\n\n Ok(AdyenPaymentRequest {\n amount,\n merchant_account: auth_type.merchant_account,\n payment_method,\n reference: item.router_data.connector_request_reference_id.clone(),\n return_url,\n shopper_interaction,\n recurring_processing_model,\n browser_info,\n additional_data,\n telephone_number,\n shopper_name,\n shopper_email,\n shopper_locale: item.router_data.request.locale.clone(),\n social_security_number: None,\n billing_address,\n delivery_address,\n country_code,\n line_items: None,\n shopper_reference,\n store_payment_method,\n channel: None,\n shopper_statement: get_shopper_statement(item.router_data),\n shopper_ip: item.router_data.request.get_ip_address_as_optional(),\n merchant_order_reference: item.router_data.request.merchant_order_reference_id.clone(),\n mpi_data: Some(mpi_data),\n store,\n splits,\n device_fingerprint,\n session_validity: None,\n metadata: item\n .router_data\n .request\n .metadata\n .clone()\n .map(filter_adyen_metadata),\n platform_chargeback_logic,\n })\n }\n}",
|
| 19 |
+
"diff_span": {
|
| 20 |
+
"before": " directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n auth_value: Some(AuthenticationValue::Tavv {\n tavv: token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n }),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,",
|
| 21 |
+
"after": " directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n cavv: None,\n token_authentication_verification_value: Some(\n token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n ),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,"
|
| 22 |
+
},
|
| 23 |
+
"commit_sha": "37a79898b3af0702f437551eedbc7c5812272814"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"id": "crates/api_models/src/payments.rs::enum::Cryptogram",
|
| 27 |
+
"file": "crates/api_models/src/payments.rs",
|
| 28 |
+
"kind": "enum_item",
|
| 29 |
+
"status": "modified",
|
| 30 |
+
"code_changed": true,
|
| 31 |
+
"imports_changed": false,
|
| 32 |
+
"before_code": "pub enum Cryptogram {\n /// Cardholder Authentication Verification Value (CAVV) cryptogram.\n Cavv {\n /// The authentication cryptogram provided by the issuer or ACS.\n #[schema(value_type = Option<String>)]\n authentication_cryptogram: Secret<String>,\n },\n /// Token Authentication Verification Value (TAVV) cryptogram for network token transactions.\n Tavv {\n /// The token authentication cryptogram used for tokenized cards.\n #[schema(value_type = Option<String>)]\n token_authentication_cryptogram: Secret<String>,\n },\n}",
|
| 33 |
+
"after_code": "pub enum Cryptogram {\n /// Cardholder Authentication Verification Value (CAVV) cryptogram.\n Cavv {\n /// The authentication cryptogram provided by the issuer or ACS.\n #[schema(value_type = Option<String>)]\n authentication_cryptogram: Secret<String>,\n },\n}",
|
| 34 |
+
"diff_span": {
|
| 35 |
+
"before": " authentication_cryptogram: Secret<String>,\n },\n /// Token Authentication Verification Value (TAVV) cryptogram for network token transactions.\n Tavv {\n /// The token authentication cryptogram used for tokenized cards.\n #[schema(value_type = Option<String>)]\n token_authentication_cryptogram: Secret<String>,\n },\n}",
|
| 36 |
+
"after": ""
|
| 37 |
+
},
|
| 38 |
+
"commit_sha": "37a79898b3af0702f437551eedbc7c5812272814"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"id": "crates/router/src/core/payments/types.rs::AuthenticationData::function::foreign_try_from",
|
| 42 |
+
"file": "crates/router/src/core/payments/types.rs",
|
| 43 |
+
"kind": "function_item",
|
| 44 |
+
"status": "modified",
|
| 45 |
+
"code_changed": true,
|
| 46 |
+
"imports_changed": false,
|
| 47 |
+
"before_code": "fn foreign_try_from(\n external_auth_data: &api_models::payments::ExternalThreeDsData,\n ) -> Result<Self, Self::Error> {\n let cavv = match &external_auth_data.authentication_cryptogram {\n api_models::payments::Cryptogram::Cavv {\n authentication_cryptogram,\n } => authentication_cryptogram.clone(),\n api_models::payments::Cryptogram::Tavv {\n token_authentication_cryptogram,\n } => token_authentication_cryptogram.clone(),\n };\n\n Ok(Self {\n eci: Some(external_auth_data.eci.clone()),\n cavv,\n threeds_server_transaction_id: Some(external_auth_data.ds_trans_id.clone()),\n message_version: common_utils::types::SemanticVersion::from_str(\n &external_auth_data.version,\n )\n .ok(),\n ds_trans_id: Some(external_auth_data.ds_trans_id.clone()),\n created_at: time::PrimitiveDateTime::new(\n time::OffsetDateTime::now_utc().date(),\n time::OffsetDateTime::now_utc().time(),\n ),\n challenge_code: None,\n challenge_cancel: None,\n challenge_code_reason: None,\n message_extension: None,\n acs_trans_id: None,\n authentication_type: None,\n transaction_status: Some(external_auth_data.transaction_status.clone()),\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),\n })\n }",
|
| 48 |
+
"after_code": "fn foreign_try_from(\n external_auth_data: &api_models::payments::ExternalThreeDsData,\n ) -> Result<Self, Self::Error> {\n let cavv = match &external_auth_data.authentication_cryptogram {\n api_models::payments::Cryptogram::Cavv {\n authentication_cryptogram,\n } => authentication_cryptogram.clone(),\n };\n\n Ok(Self {\n eci: Some(external_auth_data.eci.clone()),\n cavv,\n threeds_server_transaction_id: Some(external_auth_data.ds_trans_id.clone()),\n message_version: common_utils::types::SemanticVersion::from_str(\n &external_auth_data.version,\n )\n .ok(),\n ds_trans_id: Some(external_auth_data.ds_trans_id.clone()),\n created_at: time::PrimitiveDateTime::new(\n time::OffsetDateTime::now_utc().date(),\n time::OffsetDateTime::now_utc().time(),\n ),\n challenge_code: None,\n challenge_cancel: None,\n challenge_code_reason: None,\n message_extension: None,\n acs_trans_id: None,\n authentication_type: None,\n transaction_status: Some(external_auth_data.transaction_status.clone()),\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),\n })\n }",
|
| 49 |
+
"diff_span": {
|
| 50 |
+
"before": " authentication_cryptogram,\n } => authentication_cryptogram.clone(),\n api_models::payments::Cryptogram::Tavv {\n token_authentication_cryptogram,\n } => token_authentication_cryptogram.clone(),\n };\n",
|
| 51 |
+
"after": ""
|
| 52 |
+
},
|
| 53 |
+
"commit_sha": "37a79898b3af0702f437551eedbc7c5812272814"
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"id": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs::AdyenPaymentRequest<'_>::function::try_from",
|
| 57 |
+
"file": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs",
|
| 58 |
+
"kind": "function_item",
|
| 59 |
+
"status": "modified",
|
| 60 |
+
"code_changed": true,
|
| 61 |
+
"imports_changed": false,
|
| 62 |
+
"before_code": "fn try_from(\n value: (\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n ),\n ) -> Result<Self, Self::Error> {\n let (item, token_data) = value;\n let amount = get_amount_data(item);\n let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;\n let shopper_interaction = AdyenShopperInteraction::from(item.router_data);\n let shopper_reference = build_shopper_reference(item.router_data);\n let (recurring_processing_model, store_payment_method, _) =\n get_recurring_processing_model(item.router_data)?;\n let browser_info = get_browser_info(item.router_data)?;\n let billing_address =\n get_address_info(item.router_data.get_optional_billing()).transpose()?;\n let country_code = get_country_code(item.router_data.get_optional_billing());\n let additional_data = get_additional_data(item.router_data);\n let return_url = item.router_data.request.get_router_return_url()?;\n let testing_data = item\n .router_data\n .request\n .get_connector_testing_data()\n .map(AdyenTestingData::try_from)\n .transpose()?;\n let test_holder_name = testing_data.and_then(|test_data| test_data.holder_name);\n let card_holder_name =\n test_holder_name.or(item.router_data.get_optional_billing_full_name());\n let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(\n AdyenPaymentMethod::try_from((token_data, card_holder_name))?,\n ));\n\n let shopper_email = item.router_data.request.email.clone();\n let shopper_name = get_shopper_name(item.router_data.get_optional_billing());\n let mpi_data = AdyenMpiData {\n directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n auth_value: Some(AuthenticationValue::Tavv {\n tavv: token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n }),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,\n three_ds_version: None,\n challenge_cancel: None,\n risk_score: None,\n cavv_algorithm: None,\n };\n let adyen_metadata = get_adyen_metadata(item.router_data.request.metadata.clone());\n\n let (store, splits) = match item.router_data.request.split_payments.as_ref() {\n Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(\n adyen_split_payment,\n )) => get_adyen_split_request(adyen_split_payment, item.router_data.request.currency),\n _ => (adyen_metadata.store.clone(), None),\n };\n let device_fingerprint = adyen_metadata.device_fingerprint.clone();\n let platform_chargeback_logic = adyen_metadata.platform_chargeback_logic.clone();\n\n let delivery_address =\n get_address_info(item.router_data.get_optional_shipping()).and_then(Result::ok);\n let telephone_number = item.router_data.get_optional_billing_phone_number();\n\n Ok(AdyenPaymentRequest {\n amount,\n merchant_account: auth_type.merchant_account,\n payment_method,\n reference: item.router_data.connector_request_reference_id.clone(),\n return_url,\n shopper_interaction,\n recurring_processing_model,\n browser_info,\n additional_data,\n telephone_number,\n shopper_name,\n shopper_email,\n shopper_locale: item.router_data.request.locale.clone(),\n social_security_number: None,\n billing_address,\n delivery_address,\n country_code,\n line_items: None,\n shopper_reference,\n store_payment_method,\n channel: None,\n shopper_statement: get_shopper_statement(item.router_data),\n shopper_ip: item.router_data.request.get_ip_address_as_optional(),\n merchant_order_reference: item.router_data.request.merchant_order_reference_id.clone(),\n mpi_data: Some(mpi_data),\n store,\n splits,\n device_fingerprint,\n session_validity: None,\n metadata: item\n .router_data\n .request\n .metadata\n .clone()\n .map(filter_adyen_metadata),\n platform_chargeback_logic,\n })\n }",
|
| 63 |
+
"after_code": "fn try_from(\n value: (\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n ),\n ) -> Result<Self, Self::Error> {\n let (item, token_data) = value;\n let amount = get_amount_data(item);\n let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;\n let shopper_interaction = AdyenShopperInteraction::from(item.router_data);\n let shopper_reference = build_shopper_reference(item.router_data);\n let (recurring_processing_model, store_payment_method, _) =\n get_recurring_processing_model(item.router_data)?;\n let browser_info = get_browser_info(item.router_data)?;\n let billing_address =\n get_address_info(item.router_data.get_optional_billing()).transpose()?;\n let country_code = get_country_code(item.router_data.get_optional_billing());\n let additional_data = get_additional_data(item.router_data);\n let return_url = item.router_data.request.get_router_return_url()?;\n let testing_data = item\n .router_data\n .request\n .get_connector_testing_data()\n .map(AdyenTestingData::try_from)\n .transpose()?;\n let test_holder_name = testing_data.and_then(|test_data| test_data.holder_name);\n let card_holder_name =\n test_holder_name.or(item.router_data.get_optional_billing_full_name());\n let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(\n AdyenPaymentMethod::try_from((token_data, card_holder_name))?,\n ));\n\n let shopper_email = item.router_data.request.email.clone();\n let shopper_name = get_shopper_name(item.router_data.get_optional_billing());\n let mpi_data = AdyenMpiData {\n directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n cavv: None,\n token_authentication_verification_value: Some(\n token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n ),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,\n three_ds_version: None,\n challenge_cancel: None,\n risk_score: None,\n cavv_algorithm: None,\n };\n let adyen_metadata = get_adyen_metadata(item.router_data.request.metadata.clone());\n\n let (store, splits) = match item.router_data.request.split_payments.as_ref() {\n Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(\n adyen_split_payment,\n )) => get_adyen_split_request(adyen_split_payment, item.router_data.request.currency),\n _ => (adyen_metadata.store.clone(), None),\n };\n let device_fingerprint = adyen_metadata.device_fingerprint.clone();\n let platform_chargeback_logic = adyen_metadata.platform_chargeback_logic.clone();\n\n let delivery_address =\n get_address_info(item.router_data.get_optional_shipping()).and_then(Result::ok);\n let telephone_number = item.router_data.get_optional_billing_phone_number();\n\n Ok(AdyenPaymentRequest {\n amount,\n merchant_account: auth_type.merchant_account,\n payment_method,\n reference: item.router_data.connector_request_reference_id.clone(),\n return_url,\n shopper_interaction,\n recurring_processing_model,\n browser_info,\n additional_data,\n telephone_number,\n shopper_name,\n shopper_email,\n shopper_locale: item.router_data.request.locale.clone(),\n social_security_number: None,\n billing_address,\n delivery_address,\n country_code,\n line_items: None,\n shopper_reference,\n store_payment_method,\n channel: None,\n shopper_statement: get_shopper_statement(item.router_data),\n shopper_ip: item.router_data.request.get_ip_address_as_optional(),\n merchant_order_reference: item.router_data.request.merchant_order_reference_id.clone(),\n mpi_data: Some(mpi_data),\n store,\n splits,\n device_fingerprint,\n session_validity: None,\n metadata: item\n .router_data\n .request\n .metadata\n .clone()\n .map(filter_adyen_metadata),\n platform_chargeback_logic,\n })\n }",
|
| 64 |
+
"diff_span": {
|
| 65 |
+
"before": " directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n auth_value: Some(AuthenticationValue::Tavv {\n tavv: token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n }),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,",
|
| 66 |
+
"after": " directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n cavv: None,\n token_authentication_verification_value: Some(\n token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n ),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,"
|
| 67 |
+
},
|
| 68 |
+
"commit_sha": "37a79898b3af0702f437551eedbc7c5812272814"
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"id": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs::struct::AdyenMpiData",
|
| 72 |
+
"file": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs",
|
| 73 |
+
"kind": "struct_item",
|
| 74 |
+
"status": "modified",
|
| 75 |
+
"code_changed": true,
|
| 76 |
+
"imports_changed": true,
|
| 77 |
+
"before_code": "struct AdyenMpiData {\n directory_response: common_enums::TransactionStatus,\n authentication_response: common_enums::TransactionStatus,\n #[serde(flatten)]\n auth_value: Option<AuthenticationValue>,\n eci: Option<String>,\n #[serde(rename = \"dsTransID\")]\n ds_trans_id: Option<String>,\n #[serde(rename = \"threeDSVersion\")]\n three_ds_version: Option<String>,\n challenge_cancel: Option<String>,\n risk_score: Option<String>,\n cavv_algorithm: Option<enums::CavvAlgorithm>,\n}",
|
| 78 |
+
"after_code": "struct AdyenMpiData {\n directory_response: common_enums::TransactionStatus,\n authentication_response: common_enums::TransactionStatus,\n cavv: Option<Secret<String>>,\n token_authentication_verification_value: Option<Secret<String>>,\n eci: Option<String>,\n #[serde(rename = \"dsTransID\")]\n ds_trans_id: Option<String>,\n #[serde(rename = \"threeDSVersion\")]\n three_ds_version: Option<String>,\n challenge_cancel: Option<String>,\n risk_score: Option<String>,\n cavv_algorithm: Option<enums::CavvAlgorithm>,\n}",
|
| 79 |
+
"diff_span": {
|
| 80 |
+
"before": " directory_response: common_enums::TransactionStatus,\n authentication_response: common_enums::TransactionStatus,\n #[serde(flatten)]\n auth_value: Option<AuthenticationValue>,\n eci: Option<String>,\n #[serde(rename = \"dsTransID\")]",
|
| 81 |
+
"after": " directory_response: common_enums::TransactionStatus,\n authentication_response: common_enums::TransactionStatus,\n cavv: Option<Secret<String>>,\n token_authentication_verification_value: Option<Secret<String>>,\n eci: Option<String>,\n #[serde(rename = \"dsTransID\")]"
|
| 82 |
+
},
|
| 83 |
+
"commit_sha": "37a79898b3af0702f437551eedbc7c5812272814",
|
| 84 |
+
"before_imports": [
|
| 85 |
+
"use hyperswitch_interfaces::{\n consts::{NO_ERROR_CODE, NO_ERROR_MESSAGE},\n errors,\n};",
|
| 86 |
+
"use crate::{\n types::{\n AcceptDisputeRouterData, DefendDisputeRouterData, PaymentsCancelResponseRouterData,\n PaymentsCaptureResponseRouterData, PaymentsExtendAuthorizationResponseRouterData,\n PaymentsPreprocessingResponseRouterData, RefundsResponseRouterData, ResponseRouterData,\n SubmitEvidenceRouterData,\n },\n utils::{\n self, is_manual_capture, missing_field_err, AddressDetailsData, BrowserInformationData,\n CardData, ForeignTryFrom, NetworkTokenData as UtilsNetworkTokenData,\n PaymentsAuthorizeRequestData, PhoneDetailsData, RouterData as OtherRouterData,\n },\n};",
|
| 87 |
+
"use api_models::{\n enums,\n payments::{self, PollConfig, QrCodeInformation, VoucherNextStepData},\n};",
|
| 88 |
+
"use hyperswitch_domain_models::{\n network_tokenization::NetworkTokenNumber,\n payment_method_data::{\n BankDebitData, BankRedirectData, BankTransferData, Card, CardRedirectData, GiftCardData,\n NetworkTokenData, PayLaterData, PaymentMethodData, VoucherData, WalletData,\n },\n router_data::{\n ConnectorAuthType, ConnectorResponseData, ErrorResponse, ExtendedAuthorizationResponseData,\n PaymentMethodBalance, PaymentMethodToken, RouterData,\n },\n router_flow_types::GiftCardBalanceCheck,\n router_request_types::{\n GiftCardBalanceCheckRequestData, ResponseId, SubmitEvidenceRequestData,\n },\n router_response_types::{\n AcceptDisputeResponse, DefendDisputeResponse, GiftCardBalanceCheckResponseData,\n MandateReference, PaymentsResponseData, RedirectForm, RefundsResponseData,\n SubmitEvidenceResponse,\n },\n types::{\n PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,\n PaymentsExtendAuthorizationRouterData, PaymentsGiftCardBalanceCheckRouterData,\n PaymentsPreProcessingRouterData, RefundsRouterData,\n },\n};"
|
| 89 |
+
],
|
| 90 |
+
"after_imports": [
|
| 91 |
+
"use hyperswitch_interfaces::{\n consts::{NO_ERROR_CODE, NO_ERROR_MESSAGE},\n errors,\n};",
|
| 92 |
+
"use masking::{ExposeInterface, PeekInterface, Secret};",
|
| 93 |
+
"use crate::{\n types::{\n AcceptDisputeRouterData, DefendDisputeRouterData, PaymentsCancelResponseRouterData,\n PaymentsCaptureResponseRouterData, PaymentsExtendAuthorizationResponseRouterData,\n PaymentsPreprocessingResponseRouterData, RefundsResponseRouterData, ResponseRouterData,\n SubmitEvidenceRouterData,\n },\n utils::{\n self, is_manual_capture, missing_field_err, AddressDetailsData, BrowserInformationData,\n CardData, ForeignTryFrom, NetworkTokenData as UtilsNetworkTokenData,\n PaymentsAuthorizeRequestData, PhoneDetailsData, RouterData as OtherRouterData,\n },\n};",
|
| 94 |
+
"use api_models::{\n enums,\n payments::{self, PollConfig, QrCodeInformation, VoucherNextStepData},\n};",
|
| 95 |
+
"use hyperswitch_domain_models::{\n network_tokenization::NetworkTokenNumber,\n payment_method_data::{\n BankDebitData, BankRedirectData, BankTransferData, Card, CardRedirectData, GiftCardData,\n NetworkTokenData, PayLaterData, PaymentMethodData, VoucherData, WalletData,\n },\n router_data::{\n ConnectorAuthType, ConnectorResponseData, ErrorResponse, ExtendedAuthorizationResponseData,\n PaymentMethodBalance, PaymentMethodToken, RouterData,\n },\n router_flow_types::GiftCardBalanceCheck,\n router_request_types::{\n GiftCardBalanceCheckRequestData, ResponseId, SubmitEvidenceRequestData,\n },\n router_response_types::{\n AcceptDisputeResponse, DefendDisputeResponse, GiftCardBalanceCheckResponseData,\n MandateReference, PaymentsResponseData, RedirectForm, RefundsResponseData,\n SubmitEvidenceResponse,\n },\n types::{\n PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,\n PaymentsExtendAuthorizationRouterData, PaymentsGiftCardBalanceCheckRouterData,\n PaymentsPreProcessingRouterData, RefundsRouterData,\n },\n};"
|
| 96 |
+
]
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"id": "crates/router/src/core/payments/types.rs::impl::AuthenticationData",
|
| 100 |
+
"file": "crates/router/src/core/payments/types.rs",
|
| 101 |
+
"kind": "impl_item",
|
| 102 |
+
"status": "modified",
|
| 103 |
+
"code_changed": true,
|
| 104 |
+
"imports_changed": false,
|
| 105 |
+
"before_code": "impl ForeignTryFrom<&api_models::payments::ExternalThreeDsData> for AuthenticationData {\n type Error = error_stack::Report<errors::ApiErrorResponse>;\n\n fn foreign_try_from(\n external_auth_data: &api_models::payments::ExternalThreeDsData,\n ) -> Result<Self, Self::Error> {\n let cavv = match &external_auth_data.authentication_cryptogram {\n api_models::payments::Cryptogram::Cavv {\n authentication_cryptogram,\n } => authentication_cryptogram.clone(),\n api_models::payments::Cryptogram::Tavv {\n token_authentication_cryptogram,\n } => token_authentication_cryptogram.clone(),\n };\n\n Ok(Self {\n eci: Some(external_auth_data.eci.clone()),\n cavv,\n threeds_server_transaction_id: Some(external_auth_data.ds_trans_id.clone()),\n message_version: common_utils::types::SemanticVersion::from_str(\n &external_auth_data.version,\n )\n .ok(),\n ds_trans_id: Some(external_auth_data.ds_trans_id.clone()),\n created_at: time::PrimitiveDateTime::new(\n time::OffsetDateTime::now_utc().date(),\n time::OffsetDateTime::now_utc().time(),\n ),\n challenge_code: None,\n challenge_cancel: None,\n challenge_code_reason: None,\n message_extension: None,\n acs_trans_id: None,\n authentication_type: None,\n transaction_status: Some(external_auth_data.transaction_status.clone()),\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),\n })\n }\n}",
|
| 106 |
+
"after_code": "impl ForeignTryFrom<&api_models::payments::ExternalThreeDsData> for AuthenticationData {\n type Error = error_stack::Report<errors::ApiErrorResponse>;\n\n fn foreign_try_from(\n external_auth_data: &api_models::payments::ExternalThreeDsData,\n ) -> Result<Self, Self::Error> {\n let cavv = match &external_auth_data.authentication_cryptogram {\n api_models::payments::Cryptogram::Cavv {\n authentication_cryptogram,\n } => authentication_cryptogram.clone(),\n };\n\n Ok(Self {\n eci: Some(external_auth_data.eci.clone()),\n cavv,\n threeds_server_transaction_id: Some(external_auth_data.ds_trans_id.clone()),\n message_version: common_utils::types::SemanticVersion::from_str(\n &external_auth_data.version,\n )\n .ok(),\n ds_trans_id: Some(external_auth_data.ds_trans_id.clone()),\n created_at: time::PrimitiveDateTime::new(\n time::OffsetDateTime::now_utc().date(),\n time::OffsetDateTime::now_utc().time(),\n ),\n challenge_code: None,\n challenge_cancel: None,\n challenge_code_reason: None,\n message_extension: None,\n acs_trans_id: None,\n authentication_type: None,\n transaction_status: Some(external_auth_data.transaction_status.clone()),\n exemption_indicator: external_auth_data.exemption_indicator.clone(),\n cb_network_params: external_auth_data.network_params.clone(),\n })\n }\n}",
|
| 107 |
+
"diff_span": {
|
| 108 |
+
"before": " authentication_cryptogram,\n } => authentication_cryptogram.clone(),\n api_models::payments::Cryptogram::Tavv {\n token_authentication_cryptogram,\n } => token_authentication_cryptogram.clone(),\n };\n",
|
| 109 |
+
"after": ""
|
| 110 |
+
},
|
| 111 |
+
"commit_sha": "37a79898b3af0702f437551eedbc7c5812272814"
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"id": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs::enum::AuthenticationValue",
|
| 115 |
+
"file": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs",
|
| 116 |
+
"kind": "enum_item",
|
| 117 |
+
"status": "removed",
|
| 118 |
+
"before_code": "pub enum AuthenticationValue {\n Cavv {\n cavv: Secret<String>,\n },\n Tavv {\n #[serde(rename = \"token_authentication_verification_value\")]\n tavv: Secret<String>,\n },\n}",
|
| 119 |
+
"after_code": null,
|
| 120 |
+
"diff_span": null,
|
| 121 |
+
"commit_sha": "37a79898b3af0702f437551eedbc7c5812272814"
|
| 122 |
+
}
|
| 123 |
+
]
|
| 124 |
+
}
|
diffs/pr_10193/38208de/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10193/3c197e4/diff.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "3c197e4bf849b045ffb0356d108a60ecdee9495a",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/router/src/services/api.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": [
|
| 8 |
+
{
|
| 9 |
+
"id": "crates/router/src/services/api.rs::trait::Authenticate",
|
| 10 |
+
"file": "crates/router/src/services/api.rs",
|
| 11 |
+
"kind": "trait_item",
|
| 12 |
+
"status": "modified",
|
| 13 |
+
"code_changed": true,
|
| 14 |
+
"imports_changed": false,
|
| 15 |
+
"before_code": "pub trait Authenticate {\n fn get_client_secret(&self) -> Option<&String> {\n None\n }\n\n fn should_return_raw_response(&self) -> Option<bool> {\n None\n }\n\n fn is_external_three_ds_data_passed_by_merchant(\n &self,\n _connector_details: &ConnectorCallType,\n ) -> () {\n ()\n }\n}",
|
| 16 |
+
"after_code": "pub trait Authenticate {\n fn get_client_secret(&self) -> Option<&String> {\n None\n }\n\n fn should_return_raw_response(&self) -> Option<bool> {\n None\n }\n\n fn is_external_three_ds_data_passed_by_merchant(&self, _connector_details: &ConnectorCallType) {\n }\n}",
|
| 17 |
+
"diff_span": {
|
| 18 |
+
"before": " }\n\n fn is_external_three_ds_data_passed_by_merchant(\n &self,\n _connector_details: &ConnectorCallType,\n ) -> () {\n ()\n }\n}",
|
| 19 |
+
"after": " }\n\n fn is_external_three_ds_data_passed_by_merchant(&self, _connector_details: &ConnectorCallType) {\n }\n}"
|
| 20 |
+
},
|
| 21 |
+
"commit_sha": "3c197e4bf849b045ffb0356d108a60ecdee9495a"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"id": "crates/router/src/services/api.rs::Authenticate::function::is_external_three_ds_data_passed_by_merchant",
|
| 25 |
+
"file": "crates/router/src/services/api.rs",
|
| 26 |
+
"kind": "function_item",
|
| 27 |
+
"status": "modified",
|
| 28 |
+
"code_changed": true,
|
| 29 |
+
"imports_changed": false,
|
| 30 |
+
"before_code": "fn is_external_three_ds_data_passed_by_merchant(\n &self,\n _connector_details: &ConnectorCallType,\n ) -> () {\n ()\n }",
|
| 31 |
+
"after_code": "fn is_external_three_ds_data_passed_by_merchant(&self, _connector_details: &ConnectorCallType) {\n }",
|
| 32 |
+
"diff_span": {
|
| 33 |
+
"before": "fn is_external_three_ds_data_passed_by_merchant(\n &self,\n _connector_details: &ConnectorCallType,\n ) -> () {\n ()\n }",
|
| 34 |
+
"after": "fn is_external_three_ds_data_passed_by_merchant(&self, _connector_details: &ConnectorCallType) {\n }"
|
| 35 |
+
},
|
| 36 |
+
"commit_sha": "3c197e4bf849b045ffb0356d108a60ecdee9495a"
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"id": "crates/router/src/services/api.rs::api_models::payments::PaymentsRequest::function::is_external_three_ds_data_passed_by_merchant",
|
| 40 |
+
"file": "crates/router/src/services/api.rs",
|
| 41 |
+
"kind": "function_item",
|
| 42 |
+
"status": "modified",
|
| 43 |
+
"code_changed": true,
|
| 44 |
+
"imports_changed": false,
|
| 45 |
+
"before_code": "fn is_external_three_ds_data_passed_by_merchant(\n &self,\n connector_details: &ConnectorCallType,\n ) -> () {\n let maybe_connector_enum = match &connector_details {\n ConnectorCallType::PreDetermined(connector_data) => {\n Some(connector_data.connector_data.connector_name)\n }\n ConnectorCallType::Retryable(connector_list) => connector_list\n .first()\n .map(|c| c.connector_data.connector_name),\n ConnectorCallType::SessionMultiple(_) => None,\n };\n\n if let Some(connector_enum) = maybe_connector_enum {\n if self.three_ds_data.is_some()\n && connector_enum.is_external_authentication_supported_by_merchant()\n {\n logger::info!(\n \"Proceeding with external authentication data provided by the merchant for connector: {:?}\",\n connector_enum\n );\n }\n }\n }",
|
| 46 |
+
"after_code": "fn is_external_three_ds_data_passed_by_merchant(&self, connector_details: &ConnectorCallType) {\n let maybe_connector_enum = match &connector_details {\n ConnectorCallType::PreDetermined(connector_data) => {\n Some(connector_data.connector_data.connector_name)\n }\n ConnectorCallType::Retryable(connector_list) => connector_list\n .first()\n .map(|c| c.connector_data.connector_name),\n ConnectorCallType::SessionMultiple(_) => None,\n };\n\n if let Some(connector_enum) = maybe_connector_enum {\n if self.three_ds_data.is_some()\n && connector_enum.is_external_authentication_supported_by_merchant()\n {\n logger::info!(\n \"Proceeding with external authentication data provided by the merchant for connector: {:?}\",\n connector_enum\n );\n }\n }\n }",
|
| 47 |
+
"diff_span": {
|
| 48 |
+
"before": "fn is_external_three_ds_data_passed_by_merchant(\n &self,\n connector_details: &ConnectorCallType,\n ) -> () {\n let maybe_connector_enum = match &connector_details {\n ConnectorCallType::PreDetermined(connector_data) => {",
|
| 49 |
+
"after": "fn is_external_three_ds_data_passed_by_merchant(&self, connector_details: &ConnectorCallType) {\n let maybe_connector_enum = match &connector_details {\n ConnectorCallType::PreDetermined(connector_data) => {"
|
| 50 |
+
},
|
| 51 |
+
"commit_sha": "3c197e4bf849b045ffb0356d108a60ecdee9495a"
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"id": "crates/router/src/services/api.rs::impl::api_models::payments::PaymentsRequest",
|
| 55 |
+
"file": "crates/router/src/services/api.rs",
|
| 56 |
+
"kind": "impl_item",
|
| 57 |
+
"status": "modified",
|
| 58 |
+
"code_changed": true,
|
| 59 |
+
"imports_changed": false,
|
| 60 |
+
"before_code": "impl Authenticate for api_models::payments::PaymentsRequest {\n fn get_client_secret(&self) -> Option<&String> {\n self.client_secret.as_ref()\n }\n\n fn should_return_raw_response(&self) -> Option<bool> {\n // In v1, this maps to `all_keys_required` to retain backward compatibility.\n // The equivalent field in v2 is `return_raw_connector_response`.\n self.all_keys_required\n }\n\n fn is_external_three_ds_data_passed_by_merchant(\n &self,\n connector_details: &ConnectorCallType,\n ) -> () {\n let maybe_connector_enum = match &connector_details {\n ConnectorCallType::PreDetermined(connector_data) => {\n Some(connector_data.connector_data.connector_name)\n }\n ConnectorCallType::Retryable(connector_list) => connector_list\n .first()\n .map(|c| c.connector_data.connector_name),\n ConnectorCallType::SessionMultiple(_) => None,\n };\n\n if let Some(connector_enum) = maybe_connector_enum {\n if self.three_ds_data.is_some()\n && connector_enum.is_external_authentication_supported_by_merchant()\n {\n logger::info!(\n \"Proceeding with external authentication data provided by the merchant for connector: {:?}\",\n connector_enum\n );\n }\n }\n }\n}",
|
| 61 |
+
"after_code": "impl Authenticate for api_models::payments::PaymentsRequest {\n fn get_client_secret(&self) -> Option<&String> {\n self.client_secret.as_ref()\n }\n\n fn should_return_raw_response(&self) -> Option<bool> {\n // In v1, this maps to `all_keys_required` to retain backward compatibility.\n // The equivalent field in v2 is `return_raw_connector_response`.\n self.all_keys_required\n }\n\n fn is_external_three_ds_data_passed_by_merchant(&self, connector_details: &ConnectorCallType) {\n let maybe_connector_enum = match &connector_details {\n ConnectorCallType::PreDetermined(connector_data) => {\n Some(connector_data.connector_data.connector_name)\n }\n ConnectorCallType::Retryable(connector_list) => connector_list\n .first()\n .map(|c| c.connector_data.connector_name),\n ConnectorCallType::SessionMultiple(_) => None,\n };\n\n if let Some(connector_enum) = maybe_connector_enum {\n if self.three_ds_data.is_some()\n && connector_enum.is_external_authentication_supported_by_merchant()\n {\n logger::info!(\n \"Proceeding with external authentication data provided by the merchant for connector: {:?}\",\n connector_enum\n );\n }\n }\n }\n}",
|
| 62 |
+
"diff_span": {
|
| 63 |
+
"before": " }\n\n fn is_external_three_ds_data_passed_by_merchant(\n &self,\n connector_details: &ConnectorCallType,\n ) -> () {\n let maybe_connector_enum = match &connector_details {\n ConnectorCallType::PreDetermined(connector_data) => {",
|
| 64 |
+
"after": " }\n\n fn is_external_three_ds_data_passed_by_merchant(&self, connector_details: &ConnectorCallType) {\n let maybe_connector_enum = match &connector_details {\n ConnectorCallType::PreDetermined(connector_data) => {"
|
| 65 |
+
},
|
| 66 |
+
"commit_sha": "3c197e4bf849b045ffb0356d108a60ecdee9495a"
|
| 67 |
+
}
|
| 68 |
+
]
|
| 69 |
+
}
|
diffs/pr_10193/8495310/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10193/8a79ef2/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10193/8e29005/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10193/977d192/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10193/a84b686/diff.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "a84b68686b26c48834bdb84bd7e158dcdb9cbece",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/common_enums/src/enums.rs",
|
| 6 |
+
"crates/openapi/src/openapi.rs",
|
| 7 |
+
"crates/openapi/src/openapi_v2.rs"
|
| 8 |
+
],
|
| 9 |
+
"diffs": []
|
| 10 |
+
}
|
diffs/pr_10193/c3ed46e/diff.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "c3ed46e1328cb15e50cbdc70f100463f2b8dd84a",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": [
|
| 8 |
+
{
|
| 9 |
+
"id": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs::impl::AdyenPaymentRequest<'_>",
|
| 10 |
+
"file": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs",
|
| 11 |
+
"kind": "impl_item",
|
| 12 |
+
"status": "modified",
|
| 13 |
+
"code_changed": true,
|
| 14 |
+
"imports_changed": false,
|
| 15 |
+
"before_code": "impl\n TryFrom<(\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n )> for AdyenPaymentRequest<'_>\n{\n type Error = Error;\n fn try_from(\n value: (\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n ),\n ) -> Result<Self, Self::Error> {\n let (item, token_data) = value;\n let amount = get_amount_data(item);\n let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;\n let shopper_interaction = AdyenShopperInteraction::from(item.router_data);\n let shopper_reference = build_shopper_reference(item.router_data);\n let (recurring_processing_model, store_payment_method, _) =\n get_recurring_processing_model(item.router_data)?;\n let browser_info = get_browser_info(item.router_data)?;\n let billing_address =\n get_address_info(item.router_data.get_optional_billing()).transpose()?;\n let country_code = get_country_code(item.router_data.get_optional_billing());\n let additional_data = get_additional_data(item.router_data);\n let return_url = item.router_data.request.get_router_return_url()?;\n let testing_data = item\n .router_data\n .request\n .get_connector_testing_data()\n .map(AdyenTestingData::try_from)\n .transpose()?;\n let test_holder_name = testing_data.and_then(|test_data| test_data.holder_name);\n let card_holder_name =\n test_holder_name.or(item.router_data.get_optional_billing_full_name());\n let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(\n AdyenPaymentMethod::try_from((token_data, card_holder_name))?,\n ));\n\n let shopper_email = item.router_data.request.email.clone();\n let shopper_name = get_shopper_name(item.router_data.get_optional_billing());\n let mpi_data = AdyenMpiData {\n directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n auth_value: Some(AuthenticationValue::Tavv {\n tavv: token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n }),\n eci: \"02\".to_string(),\n ds_trans_id: None,\n three_ds_version: None,\n challenge_cancel: None,\n risk_score: None,\n cavv_algorithm: None,\n };\n let adyen_metadata = get_adyen_metadata(item.router_data.request.metadata.clone());\n\n let (store, splits) = match item.router_data.request.split_payments.as_ref() {\n Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(\n adyen_split_payment,\n )) => get_adyen_split_request(adyen_split_payment, item.router_data.request.currency),\n _ => (adyen_metadata.store.clone(), None),\n };\n let device_fingerprint = adyen_metadata.device_fingerprint.clone();\n let platform_chargeback_logic = adyen_metadata.platform_chargeback_logic.clone();\n\n let delivery_address =\n get_address_info(item.router_data.get_optional_shipping()).and_then(Result::ok);\n let telephone_number = item.router_data.get_optional_billing_phone_number();\n\n Ok(AdyenPaymentRequest {\n amount,\n merchant_account: auth_type.merchant_account,\n payment_method,\n reference: item.router_data.connector_request_reference_id.clone(),\n return_url,\n shopper_interaction,\n recurring_processing_model,\n browser_info,\n additional_data,\n telephone_number,\n shopper_name,\n shopper_email,\n shopper_locale: item.router_data.request.locale.clone(),\n social_security_number: None,\n billing_address,\n delivery_address,\n country_code,\n line_items: None,\n shopper_reference,\n store_payment_method,\n channel: None,\n shopper_statement: get_shopper_statement(item.router_data),\n shopper_ip: item.router_data.request.get_ip_address_as_optional(),\n merchant_order_reference: item.router_data.request.merchant_order_reference_id.clone(),\n mpi_data: Some(mpi_data),\n store,\n splits,\n device_fingerprint,\n session_validity: None,\n metadata: item\n .router_data\n .request\n .metadata\n .clone()\n .map(filter_adyen_metadata),\n platform_chargeback_logic,\n })\n }\n}",
|
| 16 |
+
"after_code": "impl\n TryFrom<(\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n )> for AdyenPaymentRequest<'_>\n{\n type Error = Error;\n fn try_from(\n value: (\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n ),\n ) -> Result<Self, Self::Error> {\n let (item, token_data) = value;\n let amount = get_amount_data(item);\n let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;\n let shopper_interaction = AdyenShopperInteraction::from(item.router_data);\n let shopper_reference = build_shopper_reference(item.router_data);\n let (recurring_processing_model, store_payment_method, _) =\n get_recurring_processing_model(item.router_data)?;\n let browser_info = get_browser_info(item.router_data)?;\n let billing_address =\n get_address_info(item.router_data.get_optional_billing()).transpose()?;\n let country_code = get_country_code(item.router_data.get_optional_billing());\n let additional_data = get_additional_data(item.router_data);\n let return_url = item.router_data.request.get_router_return_url()?;\n let testing_data = item\n .router_data\n .request\n .get_connector_testing_data()\n .map(AdyenTestingData::try_from)\n .transpose()?;\n let test_holder_name = testing_data.and_then(|test_data| test_data.holder_name);\n let card_holder_name =\n test_holder_name.or(item.router_data.get_optional_billing_full_name());\n let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(\n AdyenPaymentMethod::try_from((token_data, card_holder_name))?,\n ));\n\n let shopper_email = item.router_data.request.email.clone();\n let shopper_name = get_shopper_name(item.router_data.get_optional_billing());\n let mpi_data = AdyenMpiData {\n directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n auth_value: Some(AuthenticationValue::Tavv {\n tavv: token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n }),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,\n three_ds_version: None,\n challenge_cancel: None,\n risk_score: None,\n cavv_algorithm: None,\n };\n let adyen_metadata = get_adyen_metadata(item.router_data.request.metadata.clone());\n\n let (store, splits) = match item.router_data.request.split_payments.as_ref() {\n Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(\n adyen_split_payment,\n )) => get_adyen_split_request(adyen_split_payment, item.router_data.request.currency),\n _ => (adyen_metadata.store.clone(), None),\n };\n let device_fingerprint = adyen_metadata.device_fingerprint.clone();\n let platform_chargeback_logic = adyen_metadata.platform_chargeback_logic.clone();\n\n let delivery_address =\n get_address_info(item.router_data.get_optional_shipping()).and_then(Result::ok);\n let telephone_number = item.router_data.get_optional_billing_phone_number();\n\n Ok(AdyenPaymentRequest {\n amount,\n merchant_account: auth_type.merchant_account,\n payment_method,\n reference: item.router_data.connector_request_reference_id.clone(),\n return_url,\n shopper_interaction,\n recurring_processing_model,\n browser_info,\n additional_data,\n telephone_number,\n shopper_name,\n shopper_email,\n shopper_locale: item.router_data.request.locale.clone(),\n social_security_number: None,\n billing_address,\n delivery_address,\n country_code,\n line_items: None,\n shopper_reference,\n store_payment_method,\n channel: None,\n shopper_statement: get_shopper_statement(item.router_data),\n shopper_ip: item.router_data.request.get_ip_address_as_optional(),\n merchant_order_reference: item.router_data.request.merchant_order_reference_id.clone(),\n mpi_data: Some(mpi_data),\n store,\n splits,\n device_fingerprint,\n session_validity: None,\n metadata: item\n .router_data\n .request\n .metadata\n .clone()\n .map(filter_adyen_metadata),\n platform_chargeback_logic,\n })\n }\n}",
|
| 17 |
+
"diff_span": {
|
| 18 |
+
"before": " )?,\n }),\n eci: \"02\".to_string(),\n ds_trans_id: None,\n three_ds_version: None,",
|
| 19 |
+
"after": " )?,\n }),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,\n three_ds_version: None,"
|
| 20 |
+
},
|
| 21 |
+
"commit_sha": "c3ed46e1328cb15e50cbdc70f100463f2b8dd84a"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"id": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs::AdyenPaymentRequest<'_>::function::try_from",
|
| 25 |
+
"file": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs",
|
| 26 |
+
"kind": "function_item",
|
| 27 |
+
"status": "modified",
|
| 28 |
+
"code_changed": true,
|
| 29 |
+
"imports_changed": false,
|
| 30 |
+
"before_code": "fn try_from(\n value: (\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n ),\n ) -> Result<Self, Self::Error> {\n let (item, token_data) = value;\n let amount = get_amount_data(item);\n let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;\n let shopper_interaction = AdyenShopperInteraction::from(item.router_data);\n let shopper_reference = build_shopper_reference(item.router_data);\n let (recurring_processing_model, store_payment_method, _) =\n get_recurring_processing_model(item.router_data)?;\n let browser_info = get_browser_info(item.router_data)?;\n let billing_address =\n get_address_info(item.router_data.get_optional_billing()).transpose()?;\n let country_code = get_country_code(item.router_data.get_optional_billing());\n let additional_data = get_additional_data(item.router_data);\n let return_url = item.router_data.request.get_router_return_url()?;\n let testing_data = item\n .router_data\n .request\n .get_connector_testing_data()\n .map(AdyenTestingData::try_from)\n .transpose()?;\n let test_holder_name = testing_data.and_then(|test_data| test_data.holder_name);\n let card_holder_name =\n test_holder_name.or(item.router_data.get_optional_billing_full_name());\n let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(\n AdyenPaymentMethod::try_from((token_data, card_holder_name))?,\n ));\n\n let shopper_email = item.router_data.request.email.clone();\n let shopper_name = get_shopper_name(item.router_data.get_optional_billing());\n let mpi_data = AdyenMpiData {\n directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n auth_value: Some(AuthenticationValue::Tavv {\n tavv: token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n }),\n eci: \"02\".to_string(),\n ds_trans_id: None,\n three_ds_version: None,\n challenge_cancel: None,\n risk_score: None,\n cavv_algorithm: None,\n };\n let adyen_metadata = get_adyen_metadata(item.router_data.request.metadata.clone());\n\n let (store, splits) = match item.router_data.request.split_payments.as_ref() {\n Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(\n adyen_split_payment,\n )) => get_adyen_split_request(adyen_split_payment, item.router_data.request.currency),\n _ => (adyen_metadata.store.clone(), None),\n };\n let device_fingerprint = adyen_metadata.device_fingerprint.clone();\n let platform_chargeback_logic = adyen_metadata.platform_chargeback_logic.clone();\n\n let delivery_address =\n get_address_info(item.router_data.get_optional_shipping()).and_then(Result::ok);\n let telephone_number = item.router_data.get_optional_billing_phone_number();\n\n Ok(AdyenPaymentRequest {\n amount,\n merchant_account: auth_type.merchant_account,\n payment_method,\n reference: item.router_data.connector_request_reference_id.clone(),\n return_url,\n shopper_interaction,\n recurring_processing_model,\n browser_info,\n additional_data,\n telephone_number,\n shopper_name,\n shopper_email,\n shopper_locale: item.router_data.request.locale.clone(),\n social_security_number: None,\n billing_address,\n delivery_address,\n country_code,\n line_items: None,\n shopper_reference,\n store_payment_method,\n channel: None,\n shopper_statement: get_shopper_statement(item.router_data),\n shopper_ip: item.router_data.request.get_ip_address_as_optional(),\n merchant_order_reference: item.router_data.request.merchant_order_reference_id.clone(),\n mpi_data: Some(mpi_data),\n store,\n splits,\n device_fingerprint,\n session_validity: None,\n metadata: item\n .router_data\n .request\n .metadata\n .clone()\n .map(filter_adyen_metadata),\n platform_chargeback_logic,\n })\n }",
|
| 31 |
+
"after_code": "fn try_from(\n value: (\n &AdyenRouterData<&PaymentsAuthorizeRouterData>,\n &NetworkTokenData,\n ),\n ) -> Result<Self, Self::Error> {\n let (item, token_data) = value;\n let amount = get_amount_data(item);\n let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;\n let shopper_interaction = AdyenShopperInteraction::from(item.router_data);\n let shopper_reference = build_shopper_reference(item.router_data);\n let (recurring_processing_model, store_payment_method, _) =\n get_recurring_processing_model(item.router_data)?;\n let browser_info = get_browser_info(item.router_data)?;\n let billing_address =\n get_address_info(item.router_data.get_optional_billing()).transpose()?;\n let country_code = get_country_code(item.router_data.get_optional_billing());\n let additional_data = get_additional_data(item.router_data);\n let return_url = item.router_data.request.get_router_return_url()?;\n let testing_data = item\n .router_data\n .request\n .get_connector_testing_data()\n .map(AdyenTestingData::try_from)\n .transpose()?;\n let test_holder_name = testing_data.and_then(|test_data| test_data.holder_name);\n let card_holder_name =\n test_holder_name.or(item.router_data.get_optional_billing_full_name());\n let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(\n AdyenPaymentMethod::try_from((token_data, card_holder_name))?,\n ));\n\n let shopper_email = item.router_data.request.email.clone();\n let shopper_name = get_shopper_name(item.router_data.get_optional_billing());\n let mpi_data = AdyenMpiData {\n directory_response: common_enums::TransactionStatus::Success,\n authentication_response: common_enums::TransactionStatus::Success,\n auth_value: Some(AuthenticationValue::Tavv {\n tavv: token_data.get_cryptogram().clone().ok_or(\n errors::ConnectorError::MissingRequiredField {\n field_name: \"network_token_data.token_cryptogram\",\n },\n )?,\n }),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,\n three_ds_version: None,\n challenge_cancel: None,\n risk_score: None,\n cavv_algorithm: None,\n };\n let adyen_metadata = get_adyen_metadata(item.router_data.request.metadata.clone());\n\n let (store, splits) = match item.router_data.request.split_payments.as_ref() {\n Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(\n adyen_split_payment,\n )) => get_adyen_split_request(adyen_split_payment, item.router_data.request.currency),\n _ => (adyen_metadata.store.clone(), None),\n };\n let device_fingerprint = adyen_metadata.device_fingerprint.clone();\n let platform_chargeback_logic = adyen_metadata.platform_chargeback_logic.clone();\n\n let delivery_address =\n get_address_info(item.router_data.get_optional_shipping()).and_then(Result::ok);\n let telephone_number = item.router_data.get_optional_billing_phone_number();\n\n Ok(AdyenPaymentRequest {\n amount,\n merchant_account: auth_type.merchant_account,\n payment_method,\n reference: item.router_data.connector_request_reference_id.clone(),\n return_url,\n shopper_interaction,\n recurring_processing_model,\n browser_info,\n additional_data,\n telephone_number,\n shopper_name,\n shopper_email,\n shopper_locale: item.router_data.request.locale.clone(),\n social_security_number: None,\n billing_address,\n delivery_address,\n country_code,\n line_items: None,\n shopper_reference,\n store_payment_method,\n channel: None,\n shopper_statement: get_shopper_statement(item.router_data),\n shopper_ip: item.router_data.request.get_ip_address_as_optional(),\n merchant_order_reference: item.router_data.request.merchant_order_reference_id.clone(),\n mpi_data: Some(mpi_data),\n store,\n splits,\n device_fingerprint,\n session_validity: None,\n metadata: item\n .router_data\n .request\n .metadata\n .clone()\n .map(filter_adyen_metadata),\n platform_chargeback_logic,\n })\n }",
|
| 32 |
+
"diff_span": {
|
| 33 |
+
"before": " )?,\n }),\n eci: \"02\".to_string(),\n ds_trans_id: None,\n three_ds_version: None,",
|
| 34 |
+
"after": " )?,\n }),\n eci: Some(\"02\".to_string()),\n ds_trans_id: None,\n three_ds_version: None,"
|
| 35 |
+
},
|
| 36 |
+
"commit_sha": "c3ed46e1328cb15e50cbdc70f100463f2b8dd84a"
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"id": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs::struct::AdyenMpiData",
|
| 40 |
+
"file": "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs",
|
| 41 |
+
"kind": "struct_item",
|
| 42 |
+
"status": "modified",
|
| 43 |
+
"code_changed": true,
|
| 44 |
+
"imports_changed": false,
|
| 45 |
+
"before_code": "struct AdyenMpiData {\n directory_response: common_enums::TransactionStatus,\n authentication_response: common_enums::TransactionStatus,\n #[serde(flatten)]\n auth_value: Option<AuthenticationValue>,\n eci: String,\n #[serde(rename = \"dsTransID\")]\n ds_trans_id: Option<String>,\n #[serde(rename = \"threeDSVersion\")]\n three_ds_version: Option<String>,\n challenge_cancel: Option<String>,\n risk_score: Option<String>,\n cavv_algorithm: Option<enums::CavvAlgorithm>,\n}",
|
| 46 |
+
"after_code": "struct AdyenMpiData {\n directory_response: common_enums::TransactionStatus,\n authentication_response: common_enums::TransactionStatus,\n #[serde(flatten)]\n auth_value: Option<AuthenticationValue>,\n eci: Option<String>,\n #[serde(rename = \"dsTransID\")]\n ds_trans_id: Option<String>,\n #[serde(rename = \"threeDSVersion\")]\n three_ds_version: Option<String>,\n challenge_cancel: Option<String>,\n risk_score: Option<String>,\n cavv_algorithm: Option<enums::CavvAlgorithm>,\n}",
|
| 47 |
+
"diff_span": {
|
| 48 |
+
"before": " #[serde(flatten)]\n auth_value: Option<AuthenticationValue>,\n eci: String,\n #[serde(rename = \"dsTransID\")]\n ds_trans_id: Option<String>,",
|
| 49 |
+
"after": " #[serde(flatten)]\n auth_value: Option<AuthenticationValue>,\n eci: Option<String>,\n #[serde(rename = \"dsTransID\")]\n ds_trans_id: Option<String>,"
|
| 50 |
+
},
|
| 51 |
+
"commit_sha": "c3ed46e1328cb15e50cbdc70f100463f2b8dd84a"
|
| 52 |
+
}
|
| 53 |
+
]
|
| 54 |
+
}
|
diffs/pr_10193/c446190/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10193/cbff3ce/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10193/e70fea8/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "e70fea82c49ab529c6e472561a429c9584509d76",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_10193/ea8ce1f/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10193/ed99da0/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "ed99da09c75bd5df6799a597ef3839b531982e4c",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_10193/f70611f/diff.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "f70611fd6c98ec9e44a67a3792bc44f0237f7eb0",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs",
|
| 6 |
+
"crates/router/tests/connectors/aci.rs",
|
| 7 |
+
"crates/router/tests/connectors/utils.rs"
|
| 8 |
+
],
|
| 9 |
+
"diffs": [
|
| 10 |
+
{
|
| 11 |
+
"id": "crates/router/tests/connectors/utils.rs::impl::PaymentAuthorizeType",
|
| 12 |
+
"file": "crates/router/tests/connectors/utils.rs",
|
| 13 |
+
"kind": "impl_item",
|
| 14 |
+
"status": "modified",
|
| 15 |
+
"code_changed": true,
|
| 16 |
+
"imports_changed": false,
|
| 17 |
+
"before_code": "impl Default for PaymentAuthorizeType {\n fn default() -> Self {\n let data = types::PaymentsAuthorizeData {\n payment_method_data: types::domain::PaymentMethodData::Card(CCardType::default().0),\n amount: 100,\n minor_amount: MinorUnit::new(100),\n order_tax_amount: Some(MinorUnit::zero()),\n currency: enums::Currency::USD,\n confirm: true,\n capture_method: None,\n setup_future_usage: None,\n mandate_id: None,\n off_session: None,\n setup_mandate_details: None,\n browser_info: Some(BrowserInfoType::default().0),\n order_details: None,\n order_category: None,\n email: None,\n customer_name: None,\n session_token: None,\n enrolled_for_3ds: false,\n related_transaction_id: None,\n payment_experience: None,\n payment_method_type: None,\n router_return_url: None,\n complete_authorize_url: None,\n webhook_url: None,\n customer_id: None,\n surcharge_details: None,\n request_incremental_authorization: false,\n request_extended_authorization: None,\n metadata: None,\n authentication_data: None,\n customer_acceptance: None,\n split_payments: None,\n integrity_object: None,\n merchant_order_reference_id: None,\n additional_payment_method_data: None,\n shipping_cost: None,\n merchant_account_id: None,\n merchant_config_currency: None,\n connector_testing_data: None,\n order_id: None,\n locale: None,\n payment_channel: None,\n enable_partial_authorization: None,\n enable_overcapture: None,\n is_stored_credential: None,\n mit_category: None,\n billing_descriptor: None,\n external_authentication_three_ds_data: None,\n };\n Self(data)\n }\n}",
|
| 18 |
+
"after_code": "impl Default for PaymentAuthorizeType {\n fn default() -> Self {\n let data = types::PaymentsAuthorizeData {\n payment_method_data: types::domain::PaymentMethodData::Card(CCardType::default().0),\n amount: 100,\n minor_amount: MinorUnit::new(100),\n order_tax_amount: Some(MinorUnit::zero()),\n currency: enums::Currency::USD,\n confirm: true,\n capture_method: None,\n setup_future_usage: None,\n mandate_id: None,\n off_session: None,\n setup_mandate_details: None,\n browser_info: Some(BrowserInfoType::default().0),\n order_details: None,\n order_category: None,\n email: None,\n customer_name: None,\n session_token: None,\n enrolled_for_3ds: false,\n related_transaction_id: None,\n payment_experience: None,\n payment_method_type: None,\n router_return_url: None,\n complete_authorize_url: None,\n webhook_url: None,\n customer_id: None,\n surcharge_details: None,\n request_incremental_authorization: false,\n request_extended_authorization: None,\n metadata: None,\n authentication_data: None,\n customer_acceptance: None,\n split_payments: None,\n integrity_object: None,\n merchant_order_reference_id: None,\n additional_payment_method_data: None,\n shipping_cost: None,\n merchant_account_id: None,\n merchant_config_currency: None,\n connector_testing_data: None,\n order_id: None,\n locale: None,\n payment_channel: None,\n enable_partial_authorization: None,\n enable_overcapture: None,\n is_stored_credential: None,\n mit_category: None,\n billing_descriptor: None,\n };\n Self(data)\n }\n}",
|
| 19 |
+
"diff_span": {
|
| 20 |
+
"before": " mit_category: None,\n billing_descriptor: None,\n external_authentication_three_ds_data: None,\n };\n Self(data)",
|
| 21 |
+
"after": ""
|
| 22 |
+
},
|
| 23 |
+
"commit_sha": "f70611fd6c98ec9e44a67a3792bc44f0237f7eb0"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"id": "crates/router/tests/connectors/utils.rs::PaymentAuthorizeType::function::default",
|
| 27 |
+
"file": "crates/router/tests/connectors/utils.rs",
|
| 28 |
+
"kind": "function_item",
|
| 29 |
+
"status": "modified",
|
| 30 |
+
"code_changed": true,
|
| 31 |
+
"imports_changed": false,
|
| 32 |
+
"before_code": "fn default() -> Self {\n let data = types::PaymentsAuthorizeData {\n payment_method_data: types::domain::PaymentMethodData::Card(CCardType::default().0),\n amount: 100,\n minor_amount: MinorUnit::new(100),\n order_tax_amount: Some(MinorUnit::zero()),\n currency: enums::Currency::USD,\n confirm: true,\n capture_method: None,\n setup_future_usage: None,\n mandate_id: None,\n off_session: None,\n setup_mandate_details: None,\n browser_info: Some(BrowserInfoType::default().0),\n order_details: None,\n order_category: None,\n email: None,\n customer_name: None,\n session_token: None,\n enrolled_for_3ds: false,\n related_transaction_id: None,\n payment_experience: None,\n payment_method_type: None,\n router_return_url: None,\n complete_authorize_url: None,\n webhook_url: None,\n customer_id: None,\n surcharge_details: None,\n request_incremental_authorization: false,\n request_extended_authorization: None,\n metadata: None,\n authentication_data: None,\n customer_acceptance: None,\n split_payments: None,\n integrity_object: None,\n merchant_order_reference_id: None,\n additional_payment_method_data: None,\n shipping_cost: None,\n merchant_account_id: None,\n merchant_config_currency: None,\n connector_testing_data: None,\n order_id: None,\n locale: None,\n payment_channel: None,\n enable_partial_authorization: None,\n enable_overcapture: None,\n is_stored_credential: None,\n mit_category: None,\n billing_descriptor: None,\n external_authentication_three_ds_data: None,\n };\n Self(data)\n }",
|
| 33 |
+
"after_code": "fn default() -> Self {\n let data = types::PaymentsAuthorizeData {\n payment_method_data: types::domain::PaymentMethodData::Card(CCardType::default().0),\n amount: 100,\n minor_amount: MinorUnit::new(100),\n order_tax_amount: Some(MinorUnit::zero()),\n currency: enums::Currency::USD,\n confirm: true,\n capture_method: None,\n setup_future_usage: None,\n mandate_id: None,\n off_session: None,\n setup_mandate_details: None,\n browser_info: Some(BrowserInfoType::default().0),\n order_details: None,\n order_category: None,\n email: None,\n customer_name: None,\n session_token: None,\n enrolled_for_3ds: false,\n related_transaction_id: None,\n payment_experience: None,\n payment_method_type: None,\n router_return_url: None,\n complete_authorize_url: None,\n webhook_url: None,\n customer_id: None,\n surcharge_details: None,\n request_incremental_authorization: false,\n request_extended_authorization: None,\n metadata: None,\n authentication_data: None,\n customer_acceptance: None,\n split_payments: None,\n integrity_object: None,\n merchant_order_reference_id: None,\n additional_payment_method_data: None,\n shipping_cost: None,\n merchant_account_id: None,\n merchant_config_currency: None,\n connector_testing_data: None,\n order_id: None,\n locale: None,\n payment_channel: None,\n enable_partial_authorization: None,\n enable_overcapture: None,\n is_stored_credential: None,\n mit_category: None,\n billing_descriptor: None,\n };\n Self(data)\n }",
|
| 34 |
+
"diff_span": {
|
| 35 |
+
"before": " mit_category: None,\n billing_descriptor: None,\n external_authentication_three_ds_data: None,\n };\n Self(data)",
|
| 36 |
+
"after": ""
|
| 37 |
+
},
|
| 38 |
+
"commit_sha": "f70611fd6c98ec9e44a67a3792bc44f0237f7eb0"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"id": "crates/router/tests/connectors/aci.rs::function::get_threeds_payment_authorize_data",
|
| 42 |
+
"file": "crates/router/tests/connectors/aci.rs",
|
| 43 |
+
"kind": "function_item",
|
| 44 |
+
"status": "modified",
|
| 45 |
+
"code_changed": true,
|
| 46 |
+
"imports_changed": false,
|
| 47 |
+
"before_code": "fn get_threeds_payment_authorize_data() -> Option<types::PaymentsAuthorizeData> {\n Some(types::PaymentsAuthorizeData {\n payment_method_data: PaymentMethodData::Card(Card {\n card_number: cards::CardNumber::from_str(\"4200000000000000\").unwrap(),\n card_exp_month: Secret::new(\"10\".to_string()),\n card_exp_year: Secret::new(\"2025\".to_string()),\n card_cvc: Secret::new(\"999\".to_string()),\n card_holder_name: Some(Secret::new(\"John Doe\".to_string())),\n ..utils::CCardType::default().0\n }),\n enrolled_for_3ds: true,\n authentication_data: Some(AuthenticationData {\n eci: Some(common_enums::enums::Eci::Five),\n cavv: Secret::new(\"jJ81HADVRtXfCBATEp01CJUAAAA\".to_string()),\n threeds_server_transaction_id: Some(\"9458d8d4-f19f-4c28-b5c7-421b1dd2e1aa\".to_string()),\n message_version: Some(common_utils::types::SemanticVersion::new(2, 1, 0)),\n ds_trans_id: Some(\"97267598FAE648F28083B2D2AF7B1234\".to_string()),\n created_at: common_utils::date_time::now(),\n challenge_code: Some(\"01\".to_string()),\n challenge_cancel: None,\n challenge_code_reason: Some(\"01\".to_string()),\n message_extension: None,\n acs_trans_id: None,\n authentication_type: None,\n }),\n ..utils::PaymentAuthorizeType::default().0\n })\n}",
|
| 48 |
+
"after_code": "fn get_threeds_payment_authorize_data() -> Option<types::PaymentsAuthorizeData> {\n Some(types::PaymentsAuthorizeData {\n payment_method_data: PaymentMethodData::Card(Card {\n card_number: cards::CardNumber::from_str(\"4200000000000000\").unwrap(),\n card_exp_month: Secret::new(\"10\".to_string()),\n card_exp_year: Secret::new(\"2025\".to_string()),\n card_cvc: Secret::new(\"999\".to_string()),\n card_holder_name: Some(Secret::new(\"John Doe\".to_string())),\n ..utils::CCardType::default().0\n }),\n enrolled_for_3ds: true,\n authentication_data: Some(AuthenticationData {\n eci: Some(common_enums::enums::Eci::Five),\n cavv: Secret::new(\"jJ81HADVRtXfCBATEp01CJUAAAA\".to_string()),\n threeds_server_transaction_id: Some(\"9458d8d4-f19f-4c28-b5c7-421b1dd2e1aa\".to_string()),\n message_version: Some(common_utils::types::SemanticVersion::new(2, 1, 0)),\n ds_trans_id: Some(\"97267598FAE648F28083B2D2AF7B1234\".to_string()),\n created_at: common_utils::date_time::now(),\n challenge_code: Some(\"01\".to_string()),\n challenge_cancel: None,\n challenge_code_reason: Some(\"01\".to_string()),\n message_extension: None,\n acs_trans_id: None,\n authentication_type: None,\n cb_network_params: None,\n exemption_indicator: None,\n }),\n ..utils::PaymentAuthorizeType::default().0\n })\n}",
|
| 49 |
+
"diff_span": {
|
| 50 |
+
"before": "",
|
| 51 |
+
"after": " acs_trans_id: None,\n authentication_type: None,\n cb_network_params: None,\n exemption_indicator: None,\n }),\n ..utils::PaymentAuthorizeType::default().0"
|
| 52 |
+
},
|
| 53 |
+
"commit_sha": "f70611fd6c98ec9e44a67a3792bc44f0237f7eb0"
|
| 54 |
+
}
|
| 55 |
+
]
|
| 56 |
+
}
|
diffs/pr_10193/f75b5dc/diff.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "f75b5dc895726fa9906317a493394c023dc81afd",
|
| 3 |
+
"pr_number": 10193,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": []
|
| 8 |
+
}
|
diffs/pr_10224/7750d6b/diff.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "7750d6b74ded47c5d2bf5ea021a3f067b3e69dbe",
|
| 3 |
+
"pr_number": 10224,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/hyperswitch_connectors/src/connectors/cybersource.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": [
|
| 8 |
+
{
|
| 9 |
+
"id": "crates/hyperswitch_connectors/src/connectors/cybersource.rs::Cybersource::function::build_error_response",
|
| 10 |
+
"file": "crates/hyperswitch_connectors/src/connectors/cybersource.rs",
|
| 11 |
+
"kind": "function_item",
|
| 12 |
+
"status": "modified",
|
| 13 |
+
"code_changed": true,
|
| 14 |
+
"imports_changed": false,
|
| 15 |
+
"before_code": "fn build_error_response(\n &self,\n res: Response,\n event_builder: Option<&mut ConnectorEvent>,\n ) -> CustomResult<ErrorResponse, errors::ConnectorError> {\n let response: Result<\n cybersource::CybersourceErrorResponse,\n Report<common_utils::errors::ParsingError>,\n > = res.response.parse_struct(\"Cybersource ErrorResponse\");\n\n let error_message = if res.status_code == 401 {\n constants::CONNECTOR_UNAUTHORIZED_ERROR\n } else {\n hyperswitch_interfaces::consts::NO_ERROR_MESSAGE\n };\n match response {\n Ok(transformers::CybersourceErrorResponse::StandardError(response)) => {\n event_builder.map(|i| i.set_error_response_body(&response));\n router_env::logger::info!(connector_response=?response);\n\n let (code, message, reason) = match response.error_information {\n Some(ref error_info) => {\n let detailed_error_info = error_info.details.as_ref().map(|details| {\n details\n .iter()\n .map(|det| format!(\"{} : {}\", det.field, det.reason))\n .collect::<Vec<_>>()\n .join(\", \")\n });\n (\n error_info.reason.clone(),\n error_info.reason.clone(),\n transformers::get_error_reason(\n Some(error_info.message.clone()),\n detailed_error_info,\n None,\n ),\n )\n }\n None => {\n let detailed_error_info = response.details.map(|details| {\n details\n .iter()\n .map(|det| format!(\"{} : {}\", det.field, det.reason))\n .collect::<Vec<_>>()\n .join(\", \")\n });\n (\n response.reason.clone().map_or(\n hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),\n |reason| reason.to_string(),\n ),\n response\n .reason\n .map_or(error_message.to_string(), |reason| reason.to_string()),\n transformers::get_error_reason(\n response.message,\n detailed_error_info,\n None,\n ),\n )\n }\n };\n\n Ok(ErrorResponse {\n status_code: res.status_code,\n code,\n message,\n reason,\n attempt_status: None,\n connector_transaction_id: None,\n network_advice_code: None,\n network_decline_code: None,\n network_error_message: None,\n connector_metadata: None,\n })\n }\n Ok(transformers::CybersourceErrorResponse::AuthenticationError(response)) => {\n event_builder.map(|i| i.set_error_response_body(&response));\n router_env::logger::info!(connector_response=?response);\n Ok(ErrorResponse {\n status_code: res.status_code,\n code: hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),\n message: response.response.rmsg.clone(),\n reason: Some(response.response.rmsg),\n attempt_status: None,\n connector_transaction_id: None,\n network_advice_code: None,\n network_decline_code: None,\n network_error_message: None,\n connector_metadata: None,\n })\n }\n Ok(transformers::CybersourceErrorResponse::NotAvailableError(response)) => {\n event_builder.map(|i| i.set_error_response_body(&response));\n router_env::logger::info!(connector_response=?response);\n let error_response = response\n .errors\n .iter()\n .map(|error_info| {\n format!(\n \"{}: {}\",\n error_info.error_type.clone().unwrap_or(\"\".to_string()),\n error_info.message.clone().unwrap_or(\"\".to_string())\n )\n })\n .collect::<Vec<String>>()\n .join(\" & \");\n Ok(ErrorResponse {\n status_code: res.status_code,\n code: hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),\n message: error_response.clone(),\n reason: Some(error_response),\n attempt_status: None,\n connector_transaction_id: None,\n network_advice_code: None,\n network_decline_code: None,\n network_error_message: None,\n connector_metadata: None,\n })\n }\n Err(error_msg) => {\n event_builder.map(|event| event.set_error(serde_json::json!({\"error\": res.response.escape_ascii().to_string(), \"status_code\": res.status_code})));\n router_env::logger::error!(deserialization_error =? error_msg);\n utils::handle_json_response_deserialization_failure(res, \"cybersource\")\n }\n }\n }",
|
| 16 |
+
"after_code": "fn build_error_response(\n &self,\n res: Response,\n event_builder: Option<&mut ConnectorEvent>,\n ) -> CustomResult<ErrorResponse, errors::ConnectorError> {\n let response: Result<\n cybersource::CybersourceErrorResponse,\n Report<common_utils::errors::ParsingError>,\n > = res.response.parse_struct(\"Cybersource ErrorResponse\");\n\n let error_message = if res.status_code == 401 {\n constants::CONNECTOR_UNAUTHORIZED_ERROR\n } else {\n hyperswitch_interfaces::consts::NO_ERROR_MESSAGE\n };\n match response {\n Ok(transformers::CybersourceErrorResponse::StandardError(response)) => {\n event_builder.map(|i| i.set_error_response_body(&response));\n router_env::logger::info!(connector_response=?response);\n\n let (code, message, reason) = match response.error_information {\n Some(ref error_info) => {\n let detailed_error_info = error_info.details.as_ref().map(|details| {\n details\n .iter()\n .map(|det| format!(\"{} : {}\", det.field, det.reason))\n .collect::<Vec<_>>()\n .join(\", \")\n });\n (\n error_info.reason.clone(),\n error_info.message.clone(),\n transformers::get_error_reason(\n Some(error_info.message.clone()),\n detailed_error_info,\n None,\n ),\n )\n }\n None => {\n let detailed_error_info = response.details.map(|details| {\n details\n .iter()\n .map(|det| format!(\"{} : {}\", det.field, det.reason))\n .collect::<Vec<_>>()\n .join(\", \")\n });\n (\n response.reason.clone().map_or(\n hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),\n |reason| reason.to_string(),\n ),\n response\n .message\n .clone()\n .map_or(error_message.to_string(), |msg| msg.to_string()),\n transformers::get_error_reason(\n response.message,\n detailed_error_info,\n None,\n ),\n )\n }\n };\n\n Ok(ErrorResponse {\n status_code: res.status_code,\n code,\n message,\n reason,\n attempt_status: None,\n connector_transaction_id: None,\n network_advice_code: None,\n network_decline_code: None,\n network_error_message: None,\n connector_metadata: None,\n })\n }\n Ok(transformers::CybersourceErrorResponse::AuthenticationError(response)) => {\n event_builder.map(|i| i.set_error_response_body(&response));\n router_env::logger::info!(connector_response=?response);\n Ok(ErrorResponse {\n status_code: res.status_code,\n code: hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),\n message: response.response.rmsg.clone(),\n reason: Some(response.response.rmsg),\n attempt_status: None,\n connector_transaction_id: None,\n network_advice_code: None,\n network_decline_code: None,\n network_error_message: None,\n connector_metadata: None,\n })\n }\n Ok(transformers::CybersourceErrorResponse::NotAvailableError(response)) => {\n event_builder.map(|i| i.set_error_response_body(&response));\n router_env::logger::info!(connector_response=?response);\n let error_response = response\n .errors\n .iter()\n .map(|error_info| {\n format!(\n \"{}: {}\",\n error_info.error_type.clone().unwrap_or(\"\".to_string()),\n error_info.message.clone().unwrap_or(\"\".to_string())\n )\n })\n .collect::<Vec<String>>()\n .join(\" & \");\n Ok(ErrorResponse {\n status_code: res.status_code,\n code: hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),\n message: error_response.clone(),\n reason: Some(error_response),\n attempt_status: None,\n connector_transaction_id: None,\n network_advice_code: None,\n network_decline_code: None,\n network_error_message: None,\n connector_metadata: None,\n })\n }\n Err(error_msg) => {\n event_builder.map(|event| event.set_error(serde_json::json!({\"error\": res.response.escape_ascii().to_string(), \"status_code\": res.status_code})));\n router_env::logger::error!(deserialization_error =? error_msg);\n utils::handle_json_response_deserialization_failure(res, \"cybersource\")\n }\n }\n }",
|
| 17 |
+
"diff_span": {
|
| 18 |
+
"before": " (\n error_info.reason.clone(),\n error_info.reason.clone(),\n transformers::get_error_reason(\n Some(error_info.message.clone()),\n detailed_error_info,\n None,\n ),\n )\n }\n None => {\n let detailed_error_info = response.details.map(|details| {\n details\n .iter()\n .map(|det| format!(\"{} : {}\", det.field, det.reason))\n .collect::<Vec<_>>()\n .join(\", \")\n });\n (\n response.reason.clone().map_or(\n hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),\n |reason| reason.to_string(),\n ),\n response\n .reason\n .map_or(error_message.to_string(), |reason| reason.to_string()),\n transformers::get_error_reason(\n response.message,",
|
| 19 |
+
"after": " (\n error_info.reason.clone(),\n error_info.message.clone(),\n transformers::get_error_reason(\n Some(error_info.message.clone()),\n detailed_error_info,\n None,\n ),\n )\n }\n None => {\n let detailed_error_info = response.details.map(|details| {\n details\n .iter()\n .map(|det| format!(\"{} : {}\", det.field, det.reason))\n .collect::<Vec<_>>()\n .join(\", \")\n });\n (\n response.reason.clone().map_or(\n hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),\n |reason| reason.to_string(),\n ),\n response\n .message\n .clone()\n .map_or(error_message.to_string(), |msg| msg.to_string()),\n transformers::get_error_reason(\n response.message,"
|
| 20 |
+
},
|
| 21 |
+
"commit_sha": "7750d6b74ded47c5d2bf5ea021a3f067b3e69dbe"
|
| 22 |
+
}
|
| 23 |
+
]
|
| 24 |
+
}
|
diffs/pr_10250/7d948a4/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10250/7f3a049/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10250/9930370/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10250/bd1ce41/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_10628/4d52d93/diff.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "4d52d932f37e6c760704452b6c43d9518606d053",
|
| 3 |
+
"pr_number": 10628,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/api_models/src/payment_methods.rs",
|
| 6 |
+
"crates/router/src/core/payment_methods/cards.rs"
|
| 7 |
+
],
|
| 8 |
+
"diffs": [
|
| 9 |
+
{
|
| 10 |
+
"id": "crates/api_models/src/payment_methods.rs::struct::PaymentMethodListResponse",
|
| 11 |
+
"file": "crates/api_models/src/payment_methods.rs",
|
| 12 |
+
"kind": "struct_item",
|
| 13 |
+
"status": "modified",
|
| 14 |
+
"code_changed": true,
|
| 15 |
+
"imports_changed": false,
|
| 16 |
+
"before_code": "pub struct PaymentMethodListResponse {\n /// Redirect URL of the merchant\n #[schema(example = \"https://www.google.com\")]\n pub redirect_url: Option<String>,\n\n /// currency of the Payment to be done\n #[schema(example = \"USD\", value_type = Currency)]\n pub currency: Option<api_enums::Currency>,\n\n /// Information about the payment method\n pub payment_methods: Vec<ResponsePaymentMethodsEnabled>,\n /// Value indicating if the current payment is a mandate payment\n #[schema(value_type = MandateType)]\n pub mandate_payment: Option<payments::MandateType>,\n\n #[schema(value_type = Option<String>)]\n pub merchant_name: OptionalEncryptableName,\n\n /// flag to indicate if surcharge and tax breakup screen should be shown or not\n #[schema(value_type = bool)]\n pub show_surcharge_breakup_screen: bool,\n\n #[schema(value_type = Option<PaymentType>)]\n pub payment_type: Option<api_enums::PaymentType>,\n\n /// flag to indicate whether to perform external 3ds authentication\n #[schema(example = true)]\n pub request_external_three_ds_authentication: bool,\n\n /// flag that indicates whether to collect shipping details from wallets or from the customer\n pub collect_shipping_details_from_wallets: Option<bool>,\n\n /// flag that indicates whether to collect billing details from wallets or from the customer\n pub collect_billing_details_from_wallets: Option<bool>,\n\n /// flag that indicates whether to calculate tax on the order amount\n pub is_tax_calculation_enabled: bool,\n\n /// indicates the next action to be performed by the SDK\n #[schema(value_type = SdkNextAction)]\n pub sdk_next_action: payments::SdkNextAction,\n}",
|
| 17 |
+
"after_code": "pub struct PaymentMethodListResponse {\n /// Redirect URL of the merchant\n #[schema(example = \"https://www.google.com\")]\n pub redirect_url: Option<String>,\n\n /// currency of the Payment to be done\n #[schema(example = \"USD\", value_type = Currency)]\n pub currency: Option<api_enums::Currency>,\n\n /// Information about the payment method\n pub payment_methods: Vec<ResponsePaymentMethodsEnabled>,\n /// Value indicating if the current payment is a mandate payment\n #[schema(value_type = MandateType)]\n pub mandate_payment: Option<payments::MandateType>,\n\n #[schema(value_type = Option<String>)]\n pub merchant_name: OptionalEncryptableName,\n\n /// flag to indicate if surcharge and tax breakup screen should be shown or not\n #[schema(value_type = bool)]\n pub show_surcharge_breakup_screen: bool,\n\n #[schema(value_type = Option<PaymentType>)]\n pub payment_type: Option<api_enums::PaymentType>,\n\n /// flag to indicate whether to perform external 3ds authentication\n #[schema(example = true)]\n pub request_external_three_ds_authentication: bool,\n\n /// flag that indicates whether to collect shipping details from wallets or from the customer\n pub collect_shipping_details_from_wallets: Option<bool>,\n\n /// flag that indicates whether to collect billing details from wallets or from the customer\n pub collect_billing_details_from_wallets: Option<bool>,\n\n /// flag that indicates whether to calculate tax on the order amount\n pub is_tax_calculation_enabled: bool,\n\n /// indicates the next action to be performed by the SDK\n #[schema(value_type = SdkNextAction)]\n pub sdk_next_action: payments::SdkNextAction,\n\n /// indicates whether this is a guest customer flow\n pub is_guest_customer: bool,\n}",
|
| 18 |
+
"diff_span": {
|
| 19 |
+
"before": "",
|
| 20 |
+
"after": " #[schema(value_type = SdkNextAction)]\n pub sdk_next_action: payments::SdkNextAction,\n\n /// indicates whether this is a guest customer flow\n pub is_guest_customer: bool,\n}"
|
| 21 |
+
},
|
| 22 |
+
"commit_sha": "4d52d932f37e6c760704452b6c43d9518606d053"
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"id": "crates/router/src/core/payment_methods/cards.rs::function::list_payment_methods",
|
| 26 |
+
"file": "crates/router/src/core/payment_methods/cards.rs",
|
| 27 |
+
"kind": "function_item",
|
| 28 |
+
"status": "modified",
|
| 29 |
+
"code_changed": true,
|
| 30 |
+
"imports_changed": false,
|
| 31 |
+
"before_code": "pub async fn list_payment_methods(\n state: routes::SessionState,\n platform: domain::Platform,\n mut req: api::PaymentMethodListRequest,\n) -> errors::RouterResponse<api::PaymentMethodListResponse> {\n let db = &*state.store;\n let pm_config_mapping = &state.conf.pm_filters;\n let payment_intent = if let Some(cs) = &req.client_secret {\n if cs.starts_with(\"pm_\") {\n validate_payment_method_and_client_secret(cs, db, &platform).await?;\n None\n } else {\n helpers::verify_payment_intent_time_and_client_secret(\n &state,\n &platform,\n req.client_secret.clone(),\n )\n .await?\n }\n } else {\n None\n };\n\n let shipping_address = payment_intent\n .as_ref()\n .async_map(|pi| async {\n helpers::get_address_by_id(\n &state,\n pi.shipping_address_id.clone(),\n platform.get_processor().get_key_store(),\n &pi.payment_id,\n platform.get_processor().get_account().get_id(),\n platform.get_processor().get_account().storage_scheme,\n )\n .await\n })\n .await\n .transpose()?\n .flatten();\n\n let billing_address = payment_intent\n .as_ref()\n .async_map(|pi| async {\n helpers::get_address_by_id(\n &state,\n pi.billing_address_id.clone(),\n platform.get_processor().get_key_store(),\n &pi.payment_id,\n platform.get_processor().get_account().get_id(),\n platform.get_processor().get_account().storage_scheme,\n )\n .await\n })\n .await\n .transpose()?\n .flatten();\n\n let customer = payment_intent\n .as_ref()\n .async_and_then(|pi| async {\n pi.customer_id\n .as_ref()\n .async_and_then(|cust| async {\n db.find_customer_by_customer_id_merchant_id(\n cust,\n &pi.merchant_id,\n platform.get_processor().get_key_store(),\n platform.get_processor().get_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)\n .ok()\n })\n .await\n })\n .await;\n\n let payment_attempt = payment_intent\n .as_ref()\n .async_map(|pi| async {\n db.find_payment_attempt_by_payment_id_merchant_id_attempt_id(\n &pi.payment_id,\n &pi.merchant_id,\n &pi.active_attempt.get_id(),\n platform.get_processor().get_account().storage_scheme,\n platform.get_processor().get_key_store(),\n )\n .await\n .change_context(errors::ApiErrorResponse::PaymentNotFound)\n })\n .await\n .transpose()?;\n let setup_future_usage = payment_intent.as_ref().and_then(|pi| pi.setup_future_usage);\n let is_cit_transaction = payment_attempt\n .as_ref()\n .map(|pa| pa.mandate_details.is_some())\n .unwrap_or(false)\n || setup_future_usage\n .map(|future_usage| future_usage == common_enums::FutureUsage::OffSession)\n .unwrap_or(false);\n let payment_type = payment_attempt.as_ref().map(|pa| {\n let amount = api::Amount::from(pa.net_amount.get_order_amount());\n let mandate_type = if pa.mandate_id.is_some() {\n Some(api::MandateTransactionType::RecurringMandateTransaction)\n } else if is_cit_transaction {\n Some(api::MandateTransactionType::NewMandateTransaction)\n } else {\n None\n };\n\n helpers::infer_payment_type(amount, mandate_type.as_ref())\n });\n\n let all_mcas = db\n .find_merchant_connector_account_by_merchant_id_and_disabled_list(\n platform.get_processor().get_account().get_id(),\n false,\n platform.get_processor().get_key_store(),\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::MerchantAccountNotFound)?;\n\n let profile_id = payment_intent\n .as_ref()\n .and_then(|payment_intent| payment_intent.profile_id.as_ref())\n .get_required_value(\"profile_id\")\n .change_context(errors::ApiErrorResponse::GenericNotFoundError {\n message: \"Profile id not found\".to_string(),\n })?;\n let business_profile = db\n .find_business_profile_by_profile_id(platform.get_processor().get_key_store(), profile_id)\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n\n // filter out payment connectors based on profile_id\n let filtered_mcas = all_mcas\n .clone()\n .filter_based_on_profile_and_connector_type(profile_id, ConnectorType::PaymentProcessor);\n\n logger::debug!(mca_before_filtering=?filtered_mcas);\n\n let mut response: Vec<ResponsePaymentMethodIntermediate> = vec![];\n // Key creation for storing PM_FILTER_CGRAPH\n let key = {\n format!(\n \"pm_filters_cgraph_{}_{}\",\n platform\n .get_processor()\n .get_account()\n .get_id()\n .get_string_repr(),\n profile_id.get_string_repr()\n )\n };\n\n if let Some(graph) = get_merchant_pm_filter_graph(&state, &key).await {\n // Derivation of PM_FILTER_CGRAPH from MokaCache successful\n for mca in &filtered_mcas {\n let payment_methods = match &mca.payment_methods_enabled {\n Some(pm) => pm,\n None => continue,\n };\n filter_payment_methods(\n &graph,\n mca.get_id(),\n payment_methods,\n &mut req,\n &mut response,\n payment_intent.as_ref(),\n payment_attempt.as_ref(),\n billing_address.as_ref(),\n mca.connector_name.clone(),\n &state.conf,\n )\n .await?;\n }\n } else {\n // No PM_FILTER_CGRAPH Cache present in MokaCache\n let mut builder = cgraph::ConstraintGraphBuilder::new();\n for mca in &filtered_mcas {\n let domain_id = builder.make_domain(\n mca.get_id().get_string_repr().to_string(),\n mca.connector_name.as_str(),\n );\n\n let Ok(domain_id) = domain_id else {\n logger::error!(\"Failed to construct domain for list payment methods\");\n return Err(errors::ApiErrorResponse::InternalServerError.into());\n };\n\n let payment_methods = match &mca.payment_methods_enabled {\n Some(pm) => pm,\n None => continue,\n };\n if let Err(e) = make_pm_graph(\n &mut builder,\n domain_id,\n payment_methods,\n mca.connector_name.clone(),\n pm_config_mapping,\n &state.conf.mandates.supported_payment_methods,\n &state.conf.mandates.update_mandate_supported,\n ) {\n logger::error!(\n \"Failed to construct constraint graph for list payment methods {e:?}\"\n );\n }\n }\n\n // Refreshing our CGraph cache\n let graph = refresh_pm_filters_cache(&state, &key, builder.build()).await;\n\n for mca in &filtered_mcas {\n let payment_methods = match &mca.payment_methods_enabled {\n Some(pm) => pm,\n None => continue,\n };\n filter_payment_methods(\n &graph,\n mca.get_id().clone(),\n payment_methods,\n &mut req,\n &mut response,\n payment_intent.as_ref(),\n payment_attempt.as_ref(),\n billing_address.as_ref(),\n mca.connector_name.clone(),\n &state.conf,\n )\n .await?;\n }\n }\n logger::info!(\n \"The Payment Methods available after Constraint Graph filtering are {:?}\",\n response\n );\n\n let mut pmt_to_auth_connector: HashMap<\n enums::PaymentMethod,\n HashMap<enums::PaymentMethodType, String>,\n > = HashMap::new();\n\n if let Some((payment_attempt, payment_intent)) =\n payment_attempt.as_ref().zip(payment_intent.as_ref())\n {\n let routing_enabled_pms = &router_consts::ROUTING_ENABLED_PAYMENT_METHODS;\n\n let routing_enabled_pm_types = &router_consts::ROUTING_ENABLED_PAYMENT_METHOD_TYPES;\n\n let mut chosen = api::SessionConnectorDatas::new(Vec::new());\n for intermediate in &response {\n if routing_enabled_pm_types.contains(&intermediate.payment_method_type)\n || routing_enabled_pms.contains(&intermediate.payment_method)\n {\n let connector_data = helpers::get_connector_data_with_token(\n &state,\n intermediate.connector.to_string(),\n None,\n intermediate.payment_method_type,\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"invalid connector name received\")?;\n\n chosen.push(api::SessionConnectorData {\n payment_method_sub_type: intermediate.payment_method_type,\n payment_method_type: intermediate.payment_method,\n connector: connector_data,\n business_sub_label: None,\n });\n }\n }\n let sfr = SessionFlowRoutingInput {\n state: &state,\n country: billing_address.clone().and_then(|ad| ad.country),\n key_store: platform.get_processor().get_key_store(),\n merchant_account: platform.get_processor().get_account(),\n payment_attempt,\n payment_intent,\n chosen,\n };\n let (result, routing_approach) = routing::perform_session_flow_routing(\n sfr,\n &business_profile,\n &enums::TransactionType::Payment,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"error performing session flow routing\")?;\n\n response.retain(|intermediate| {\n if !routing_enabled_pm_types.contains(&intermediate.payment_method_type)\n && !routing_enabled_pms.contains(&intermediate.payment_method)\n {\n return true;\n }\n\n if let Some(choice) = result.get(&intermediate.payment_method_type) {\n if let Some(first_routable_connector) = choice.first() {\n intermediate.connector\n == first_routable_connector\n .connector\n .connector_name\n .to_string()\n && first_routable_connector\n .connector\n .merchant_connector_id\n .as_ref()\n .map(|merchant_connector_id| {\n *merchant_connector_id.get_string_repr()\n == intermediate.merchant_connector_id\n })\n .unwrap_or_default()\n } else {\n false\n }\n } else {\n false\n }\n });\n\n let mut routing_info: storage::PaymentRoutingInfo = payment_attempt\n .straight_through_algorithm\n .clone()\n .map(|val| val.parse_value(\"PaymentRoutingInfo\"))\n .transpose()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid PaymentRoutingInfo format found in payment attempt\")?\n .unwrap_or(storage::PaymentRoutingInfo {\n algorithm: None,\n pre_routing_results: None,\n });\n\n let mut pre_routing_results: HashMap<\n api_enums::PaymentMethodType,\n storage::PreRoutingConnectorChoice,\n > = HashMap::new();\n\n for (pm_type, routing_choice) in result {\n let mut routable_choice_list = vec![];\n for choice in routing_choice {\n let routable_choice = routing_types::RoutableConnectorChoice {\n choice_kind: routing_types::RoutableChoiceKind::FullStruct,\n connector: choice\n .connector\n .connector_name\n .to_string()\n .parse::<api_enums::RoutableConnectors>()\n .change_context(errors::ApiErrorResponse::InternalServerError)?,\n merchant_connector_id: choice.connector.merchant_connector_id.clone(),\n };\n routable_choice_list.push(routable_choice);\n }\n pre_routing_results.insert(\n pm_type,\n storage::PreRoutingConnectorChoice::Multiple(routable_choice_list),\n );\n }\n\n let redis_conn = db\n .get_redis_conn()\n .map_err(|redis_error| logger::error!(?redis_error))\n .ok();\n\n let mut val = Vec::new();\n\n for (payment_method_type, routable_connector_choice) in &pre_routing_results {\n let routable_connector_list = match routable_connector_choice {\n storage::PreRoutingConnectorChoice::Single(routable_connector) => {\n vec![routable_connector.clone()]\n }\n storage::PreRoutingConnectorChoice::Multiple(routable_connector_list) => {\n routable_connector_list.clone()\n }\n };\n\n let first_routable_connector = routable_connector_list\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?;\n\n let matched_mca = filtered_mcas.iter().find(|m| {\n first_routable_connector.merchant_connector_id.as_ref() == Some(&m.get_id())\n });\n\n if let Some(m) = matched_mca {\n let pm_auth_config = m\n .pm_auth_config\n .as_ref()\n .map(|config| {\n serde_json::from_value::<PaymentMethodAuthConfig>(config.clone().expose())\n .change_context(errors::StorageError::DeserializationFailed)\n .attach_printable(\"Failed to deserialize Payment Method Auth config\")\n })\n .transpose()\n .unwrap_or_else(|error| {\n logger::error!(?error);\n None\n });\n\n if let Some(config) = pm_auth_config {\n for inner_config in config.enabled_payment_methods.iter() {\n let is_active_mca = all_mcas\n .iter()\n .any(|mca| mca.get_id() == inner_config.mca_id);\n\n if inner_config.payment_method_type == *payment_method_type && is_active_mca\n {\n let pm = pmt_to_auth_connector\n .get(&inner_config.payment_method)\n .cloned();\n\n let inner_map = if let Some(mut inner_map) = pm {\n inner_map.insert(\n *payment_method_type,\n inner_config.connector_name.clone(),\n );\n inner_map\n } else {\n HashMap::from([(\n *payment_method_type,\n inner_config.connector_name.clone(),\n )])\n };\n\n pmt_to_auth_connector.insert(inner_config.payment_method, inner_map);\n val.push(inner_config.clone());\n }\n }\n };\n }\n }\n\n let pm_auth_key = payment_intent.payment_id.get_pm_auth_key();\n let redis_expiry = state.conf.payment_method_auth.get_inner().redis_expiry;\n\n if let Some(rc) = redis_conn {\n rc.serialize_and_set_key_with_expiry(&pm_auth_key.as_str().into(), val, redis_expiry)\n .await\n .attach_printable(\"Failed to store pm auth data in redis\")\n .unwrap_or_else(|error| {\n logger::error!(?error);\n })\n };\n\n routing_info.pre_routing_results = Some(pre_routing_results);\n\n let encoded = routing_info\n .encode_to_value()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Unable to serialize payment routing info to value\")?;\n\n let attempt_update = storage::PaymentAttemptUpdate::UpdateTrackers {\n payment_token: None,\n connector: None,\n straight_through_algorithm: Some(encoded),\n amount_capturable: None,\n updated_by: platform\n .get_processor()\n .get_account()\n .storage_scheme\n .to_string(),\n merchant_connector_id: None,\n surcharge_amount: None,\n tax_amount: None,\n routing_approach,\n is_stored_credential: None,\n };\n\n state\n .store\n .update_payment_attempt_with_attempt_id(\n payment_attempt.clone(),\n attempt_update,\n platform.get_processor().get_account().storage_scheme,\n platform.get_processor().get_key_store(),\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n }\n\n // Check for `use_billing_as_payment_method_billing` config under business_profile\n // If this is disabled, then the billing details in required fields will be empty and have to be collected by the customer\n let billing_address_for_calculating_required_fields = business_profile\n .use_billing_as_payment_method_billing\n .unwrap_or(true)\n .then_some(billing_address.as_ref())\n .flatten();\n\n let req = api_models::payments::PaymentsRequest::foreign_try_from((\n payment_attempt.as_ref(),\n payment_intent.as_ref(),\n shipping_address.as_ref(),\n billing_address_for_calculating_required_fields,\n customer.as_ref(),\n ))?;\n\n let req_val = serde_json::to_value(req).ok();\n logger::debug!(filtered_payment_methods=?response);\n\n let mut payment_experiences_consolidated_hm: HashMap<\n api_enums::PaymentMethod,\n HashMap<api_enums::PaymentMethodType, HashMap<api_enums::PaymentExperience, Vec<String>>>,\n > = HashMap::new();\n\n let mut card_networks_consolidated_hm: HashMap<\n api_enums::PaymentMethod,\n HashMap<api_enums::PaymentMethodType, HashMap<api_enums::CardNetwork, Vec<String>>>,\n > = HashMap::new();\n\n let mut banks_consolidated_hm: HashMap<api_enums::PaymentMethodType, Vec<String>> =\n HashMap::new();\n\n let mut bank_debits_consolidated_hm =\n HashMap::<api_enums::PaymentMethodType, Vec<String>>::new();\n\n let mut bank_transfer_consolidated_hm =\n HashMap::<api_enums::PaymentMethodType, Vec<String>>::new();\n\n // All the required fields will be stored here and later filtered out based on business profile config\n let mut required_fields_hm = HashMap::<\n api_enums::PaymentMethod,\n HashMap<api_enums::PaymentMethodType, HashMap<String, RequiredFieldInfo>>,\n >::new();\n\n for element in response.clone() {\n let payment_method = element.payment_method;\n let payment_method_type = element.payment_method_type;\n let connector = element.connector.clone();\n\n let connector_variant = api_enums::Connector::from_str(connector.as_str())\n .change_context(errors::ConnectorError::InvalidConnectorName)\n .change_context(errors::ApiErrorResponse::InvalidDataValue {\n field_name: \"connector\",\n })\n .attach_printable_lazy(|| format!(\"unable to parse connector name {connector:?}\"))?;\n state.conf.required_fields.0.get(&payment_method).map(\n |required_fields_hm_for_each_payment_method_type| {\n required_fields_hm_for_each_payment_method_type\n .0\n .get(&payment_method_type)\n .map(|required_fields_hm_for_each_connector| {\n required_fields_hm.entry(payment_method).or_default();\n required_fields_hm_for_each_connector\n .fields\n .get(&connector_variant)\n .map(|required_fields_final| {\n let mut required_fields_hs = required_fields_final.common.clone();\n if is_cit_transaction {\n required_fields_hs\n .extend(required_fields_final.mandate.clone());\n } else {\n required_fields_hs\n .extend(required_fields_final.non_mandate.clone());\n }\n required_fields_hs = should_collect_shipping_or_billing_details_from_wallet_connector(\n payment_method,\n element.payment_experience.as_ref(),\n &business_profile,\n required_fields_hs.clone(),\n );\n\n // get the config, check the enums while adding\n {\n for (key, val) in &mut required_fields_hs {\n let temp = req_val\n .as_ref()\n .and_then(|r| get_val(key.to_owned(), r));\n if let Some(s) = temp {\n val.value = Some(s.into())\n };\n }\n }\n\n let existing_req_fields_hs = required_fields_hm\n .get_mut(&payment_method)\n .and_then(|inner_hm| inner_hm.get_mut(&payment_method_type));\n\n // If payment_method_type already exist in required_fields_hm, extend the required_fields hs to existing hs.\n if let Some(inner_hs) = existing_req_fields_hs {\n inner_hs.extend(required_fields_hs);\n } else {\n required_fields_hm.get_mut(&payment_method).map(|inner_hm| {\n inner_hm.insert(payment_method_type, required_fields_hs)\n });\n }\n })\n })\n },\n );\n\n if let Some(payment_experience) = element.payment_experience {\n if let Some(payment_method_hm) =\n payment_experiences_consolidated_hm.get_mut(&payment_method)\n {\n if let Some(payment_method_type_hm) =\n payment_method_hm.get_mut(&payment_method_type)\n {\n if let Some(vector_of_connectors) =\n payment_method_type_hm.get_mut(&payment_experience)\n {\n vector_of_connectors.push(connector);\n } else {\n payment_method_type_hm.insert(payment_experience, vec![connector]);\n }\n } else {\n payment_method_hm.insert(\n payment_method_type,\n HashMap::from([(payment_experience, vec![connector])]),\n );\n }\n } else {\n let inner_hm = HashMap::from([(payment_experience, vec![connector])]);\n let payment_method_type_hm = HashMap::from([(payment_method_type, inner_hm)]);\n payment_experiences_consolidated_hm.insert(payment_method, payment_method_type_hm);\n }\n }\n\n if let Some(card_networks) = element.card_networks {\n if let Some(payment_method_hm) = card_networks_consolidated_hm.get_mut(&payment_method)\n {\n if let Some(payment_method_type_hm) =\n payment_method_hm.get_mut(&payment_method_type)\n {\n for card_network in card_networks {\n if let Some(vector_of_connectors) =\n payment_method_type_hm.get_mut(&card_network)\n {\n let connector = element.connector.clone();\n vector_of_connectors.push(connector);\n } else {\n let connector = element.connector.clone();\n payment_method_type_hm.insert(card_network, vec![connector]);\n }\n }\n } else {\n let mut inner_hashmap: HashMap<api_enums::CardNetwork, Vec<String>> =\n HashMap::new();\n for card_network in card_networks {\n if let Some(vector_of_connectors) = inner_hashmap.get_mut(&card_network) {\n let connector = element.connector.clone();\n vector_of_connectors.push(connector);\n } else {\n let connector = element.connector.clone();\n inner_hashmap.insert(card_network, vec![connector]);\n }\n }\n payment_method_hm.insert(payment_method_type, inner_hashmap);\n }\n } else {\n let mut inner_hashmap: HashMap<api_enums::CardNetwork, Vec<String>> =\n HashMap::new();\n for card_network in card_networks {\n if let Some(vector_of_connectors) = inner_hashmap.get_mut(&card_network) {\n let connector = element.connector.clone();\n vector_of_connectors.push(connector);\n } else {\n let connector = element.connector.clone();\n inner_hashmap.insert(card_network, vec![connector]);\n }\n }\n let payment_method_type_hm = HashMap::from([(payment_method_type, inner_hashmap)]);\n card_networks_consolidated_hm.insert(payment_method, payment_method_type_hm);\n }\n }\n\n if element.payment_method == api_enums::PaymentMethod::BankRedirect {\n let connector = element.connector.clone();\n if let Some(vector_of_connectors) =\n banks_consolidated_hm.get_mut(&element.payment_method_type)\n {\n vector_of_connectors.push(connector);\n } else {\n banks_consolidated_hm.insert(element.payment_method_type, vec![connector]);\n }\n }\n\n if element.payment_method == api_enums::PaymentMethod::BankDebit {\n let connector = element.connector.clone();\n if let Some(vector_of_connectors) =\n bank_debits_consolidated_hm.get_mut(&element.payment_method_type)\n {\n vector_of_connectors.push(connector);\n } else {\n bank_debits_consolidated_hm.insert(element.payment_method_type, vec![connector]);\n }\n }\n\n if element.payment_method == api_enums::PaymentMethod::BankTransfer {\n let connector = element.connector.clone();\n if let Some(vector_of_connectors) =\n bank_transfer_consolidated_hm.get_mut(&element.payment_method_type)\n {\n vector_of_connectors.push(connector);\n } else {\n bank_transfer_consolidated_hm.insert(element.payment_method_type, vec![connector]);\n }\n }\n }\n\n let mut payment_method_responses: Vec<ResponsePaymentMethodsEnabled> = vec![];\n for key in payment_experiences_consolidated_hm.iter() {\n let mut payment_method_types = vec![];\n for payment_method_types_hm in key.1 {\n let mut payment_experience_types = vec![];\n for payment_experience_type in payment_method_types_hm.1 {\n payment_experience_types.push(PaymentExperienceTypes {\n payment_experience_type: *payment_experience_type.0,\n eligible_connectors: payment_experience_type.1.clone(),\n })\n }\n\n payment_method_types.push(ResponsePaymentMethodTypes {\n payment_method_type: *payment_method_types_hm.0,\n payment_experience: Some(payment_experience_types),\n card_networks: None,\n bank_names: None,\n bank_debits: None,\n bank_transfers: None,\n // Required fields for PayLater payment method\n required_fields: required_fields_hm\n .get(key.0)\n .and_then(|inner_hm| inner_hm.get(payment_method_types_hm.0))\n .cloned(),\n surcharge_details: None,\n pm_auth_connector: pmt_to_auth_connector\n .get(key.0)\n .and_then(|pm_map| pm_map.get(payment_method_types_hm.0))\n .cloned(),\n })\n }\n\n payment_method_responses.push(ResponsePaymentMethodsEnabled {\n payment_method: *key.0,\n payment_method_types,\n })\n }\n\n for key in card_networks_consolidated_hm.iter() {\n let mut payment_method_types = vec![];\n for payment_method_types_hm in key.1 {\n let mut card_network_types = vec![];\n for card_network_type in payment_method_types_hm.1 {\n card_network_types.push(CardNetworkTypes {\n card_network: card_network_type.0.clone(),\n eligible_connectors: card_network_type.1.clone(),\n surcharge_details: None,\n })\n }\n\n payment_method_types.push(ResponsePaymentMethodTypes {\n payment_method_type: *payment_method_types_hm.0,\n card_networks: Some(card_network_types),\n payment_experience: None,\n bank_names: None,\n bank_debits: None,\n bank_transfers: None,\n // Required fields for Card payment method\n required_fields: required_fields_hm\n .get(key.0)\n .and_then(|inner_hm| inner_hm.get(payment_method_types_hm.0))\n .cloned(),\n surcharge_details: None,\n pm_auth_connector: pmt_to_auth_connector\n .get(key.0)\n .and_then(|pm_map| pm_map.get(payment_method_types_hm.0))\n .cloned(),\n })\n }\n\n payment_method_responses.push(ResponsePaymentMethodsEnabled {\n payment_method: *key.0,\n payment_method_types,\n })\n }\n\n let mut bank_redirect_payment_method_types = vec![];\n\n for key in banks_consolidated_hm.iter() {\n let payment_method_type = *key.0;\n let connectors = key.1.clone();\n let bank_names = get_banks(&state, payment_method_type, connectors)?;\n bank_redirect_payment_method_types.push({\n ResponsePaymentMethodTypes {\n payment_method_type,\n bank_names: Some(bank_names),\n payment_experience: None,\n card_networks: None,\n bank_debits: None,\n bank_transfers: None,\n // Required fields for BankRedirect payment method\n required_fields: required_fields_hm\n .get(&api_enums::PaymentMethod::BankRedirect)\n .and_then(|inner_hm| inner_hm.get(key.0))\n .cloned(),\n surcharge_details: None,\n pm_auth_connector: pmt_to_auth_connector\n .get(&enums::PaymentMethod::BankRedirect)\n .and_then(|pm_map| pm_map.get(key.0))\n .cloned(),\n }\n })\n }\n\n if !bank_redirect_payment_method_types.is_empty() {\n payment_method_responses.push(ResponsePaymentMethodsEnabled {\n payment_method: api_enums::PaymentMethod::BankRedirect,\n payment_method_types: bank_redirect_payment_method_types,\n });\n }\n\n let mut bank_debit_payment_method_types = vec![];\n\n for key in bank_debits_consolidated_hm.iter() {\n let payment_method_type = *key.0;\n let connectors = key.1.clone();\n bank_debit_payment_method_types.push({\n ResponsePaymentMethodTypes {\n payment_method_type,\n bank_names: None,\n payment_experience: None,\n card_networks: None,\n bank_debits: Some(api_models::payment_methods::BankDebitTypes {\n eligible_connectors: connectors.clone(),\n }),\n bank_transfers: None,\n // Required fields for BankDebit payment method\n required_fields: required_fields_hm\n .get(&api_enums::PaymentMethod::BankDebit)\n .and_then(|inner_hm| inner_hm.get(key.0))\n .cloned(),\n surcharge_details: None,\n pm_auth_connector: pmt_to_auth_connector\n .get(&enums::PaymentMethod::BankDebit)\n .and_then(|pm_map| pm_map.get(key.0))\n .cloned(),\n }\n })\n }\n\n if !bank_debit_payment_method_types.is_empty() {\n payment_method_responses.push(ResponsePaymentMethodsEnabled {\n payment_method: api_enums::PaymentMethod::BankDebit,\n payment_method_types: bank_debit_payment_method_types,\n });\n }\n\n let mut bank_transfer_payment_method_types = vec![];\n\n for key in bank_transfer_consolidated_hm.iter() {\n let payment_method_type = *key.0;\n let connectors = key.1.clone();\n bank_transfer_payment_method_types.push({\n ResponsePaymentMethodTypes {\n payment_method_type,\n bank_names: None,\n payment_experience: None,\n card_networks: None,\n bank_debits: None,\n bank_transfers: Some(api_models::payment_methods::BankTransferTypes {\n eligible_connectors: connectors,\n }),\n // Required fields for BankTransfer payment method\n required_fields: required_fields_hm\n .get(&api_enums::PaymentMethod::BankTransfer)\n .and_then(|inner_hm| inner_hm.get(key.0))\n .cloned(),\n surcharge_details: None,\n pm_auth_connector: pmt_to_auth_connector\n .get(&enums::PaymentMethod::BankTransfer)\n .and_then(|pm_map| pm_map.get(key.0))\n .cloned(),\n }\n })\n }\n\n if !bank_transfer_payment_method_types.is_empty() {\n payment_method_responses.push(ResponsePaymentMethodsEnabled {\n payment_method: api_enums::PaymentMethod::BankTransfer,\n payment_method_types: bank_transfer_payment_method_types,\n });\n }\n let currency = payment_intent.as_ref().and_then(|pi| pi.currency);\n let skip_external_tax_calculation = payment_intent\n .as_ref()\n .and_then(|intent| intent.skip_external_tax_calculation)\n .unwrap_or(false);\n let request_external_three_ds_authentication = payment_intent\n .as_ref()\n .and_then(|intent| intent.request_external_three_ds_authentication)\n .unwrap_or(false);\n let sdk_next_action = payment_method_utils::get_sdk_next_action_for_payment_method_list(\n db,\n platform.get_processor().get_account().get_id(),\n )\n .await;\n let merchant_surcharge_configs = if let Some((payment_attempt, payment_intent)) =\n payment_attempt.as_ref().zip(payment_intent)\n {\n Box::pin(call_surcharge_decision_management(\n state,\n &platform,\n &business_profile,\n payment_attempt,\n payment_intent,\n billing_address,\n &mut payment_method_responses,\n ))\n .await?\n } else {\n api_surcharge_decision_configs::MerchantSurchargeConfigs::default()\n };\n\n let collect_shipping_details_from_wallets = if business_profile\n .always_collect_shipping_details_from_wallet_connector\n .unwrap_or(false)\n {\n business_profile.always_collect_shipping_details_from_wallet_connector\n } else {\n business_profile.collect_shipping_details_from_wallet_connector\n };\n\n let collect_billing_details_from_wallets = if business_profile\n .always_collect_billing_details_from_wallet_connector\n .unwrap_or(false)\n {\n business_profile.always_collect_billing_details_from_wallet_connector\n } else {\n business_profile.collect_billing_details_from_wallet_connector\n };\n\n let is_tax_connector_enabled = business_profile.get_is_tax_connector_enabled();\n\n Ok(services::ApplicationResponse::Json(\n api::PaymentMethodListResponse {\n redirect_url: business_profile.return_url.clone(),\n merchant_name: platform\n .get_processor()\n .get_account()\n .merchant_name\n .to_owned(),\n payment_type,\n payment_methods: payment_method_responses,\n mandate_payment: payment_attempt.and_then(|inner| inner.mandate_details).map(\n |d| match d {\n hyperswitch_domain_models::mandates::MandateDataType::SingleUse(i) => {\n api::MandateType::SingleUse(api::MandateAmountData {\n amount: i.amount,\n currency: i.currency,\n start_date: i.start_date,\n end_date: i.end_date,\n metadata: i.metadata,\n })\n }\n hyperswitch_domain_models::mandates::MandateDataType::MultiUse(Some(i)) => {\n api::MandateType::MultiUse(Some(api::MandateAmountData {\n amount: i.amount,\n currency: i.currency,\n start_date: i.start_date,\n end_date: i.end_date,\n metadata: i.metadata,\n }))\n }\n hyperswitch_domain_models::mandates::MandateDataType::MultiUse(None) => {\n api::MandateType::MultiUse(None)\n }\n },\n ),\n show_surcharge_breakup_screen: merchant_surcharge_configs\n .show_surcharge_breakup_screen\n .unwrap_or_default(),\n currency,\n request_external_three_ds_authentication,\n collect_shipping_details_from_wallets,\n collect_billing_details_from_wallets,\n is_tax_calculation_enabled: is_tax_connector_enabled && !skip_external_tax_calculation,\n sdk_next_action,\n },\n ))\n}",
|
| 32 |
+
"after_code": "pub async fn list_payment_methods(\n state: routes::SessionState,\n platform: domain::Platform,\n mut req: api::PaymentMethodListRequest,\n) -> errors::RouterResponse<api::PaymentMethodListResponse> {\n let db = &*state.store;\n let pm_config_mapping = &state.conf.pm_filters;\n let payment_intent = if let Some(cs) = &req.client_secret {\n if cs.starts_with(\"pm_\") {\n validate_payment_method_and_client_secret(cs, db, &platform).await?;\n None\n } else {\n helpers::verify_payment_intent_time_and_client_secret(\n &state,\n &platform,\n req.client_secret.clone(),\n )\n .await?\n }\n } else {\n None\n };\n\n let shipping_address = payment_intent\n .as_ref()\n .async_map(|pi| async {\n helpers::get_address_by_id(\n &state,\n pi.shipping_address_id.clone(),\n platform.get_processor().get_key_store(),\n &pi.payment_id,\n platform.get_processor().get_account().get_id(),\n platform.get_processor().get_account().storage_scheme,\n )\n .await\n })\n .await\n .transpose()?\n .flatten();\n\n let billing_address = payment_intent\n .as_ref()\n .async_map(|pi| async {\n helpers::get_address_by_id(\n &state,\n pi.billing_address_id.clone(),\n platform.get_processor().get_key_store(),\n &pi.payment_id,\n platform.get_processor().get_account().get_id(),\n platform.get_processor().get_account().storage_scheme,\n )\n .await\n })\n .await\n .transpose()?\n .flatten();\n\n let customer = payment_intent\n .as_ref()\n .async_and_then(|pi| async {\n pi.customer_id\n .as_ref()\n .async_and_then(|cust| async {\n db.find_customer_by_customer_id_merchant_id(\n cust,\n &pi.merchant_id,\n platform.get_processor().get_key_store(),\n platform.get_processor().get_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)\n .ok()\n })\n .await\n })\n .await;\n\n let payment_attempt = payment_intent\n .as_ref()\n .async_map(|pi| async {\n db.find_payment_attempt_by_payment_id_merchant_id_attempt_id(\n &pi.payment_id,\n &pi.merchant_id,\n &pi.active_attempt.get_id(),\n platform.get_processor().get_account().storage_scheme,\n platform.get_processor().get_key_store(),\n )\n .await\n .change_context(errors::ApiErrorResponse::PaymentNotFound)\n })\n .await\n .transpose()?;\n let setup_future_usage = payment_intent.as_ref().and_then(|pi| pi.setup_future_usage);\n let is_cit_transaction = payment_attempt\n .as_ref()\n .map(|pa| pa.mandate_details.is_some())\n .unwrap_or(false)\n || setup_future_usage\n .map(|future_usage| future_usage == common_enums::FutureUsage::OffSession)\n .unwrap_or(false);\n let payment_type = payment_attempt.as_ref().map(|pa| {\n let amount = api::Amount::from(pa.net_amount.get_order_amount());\n let mandate_type = if pa.mandate_id.is_some() {\n Some(api::MandateTransactionType::RecurringMandateTransaction)\n } else if is_cit_transaction {\n Some(api::MandateTransactionType::NewMandateTransaction)\n } else {\n None\n };\n\n helpers::infer_payment_type(amount, mandate_type.as_ref())\n });\n\n let all_mcas = db\n .find_merchant_connector_account_by_merchant_id_and_disabled_list(\n platform.get_processor().get_account().get_id(),\n false,\n platform.get_processor().get_key_store(),\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::MerchantAccountNotFound)?;\n\n let profile_id = payment_intent\n .as_ref()\n .and_then(|payment_intent| payment_intent.profile_id.as_ref())\n .get_required_value(\"profile_id\")\n .change_context(errors::ApiErrorResponse::GenericNotFoundError {\n message: \"Profile id not found\".to_string(),\n })?;\n let business_profile = db\n .find_business_profile_by_profile_id(platform.get_processor().get_key_store(), profile_id)\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n\n // filter out payment connectors based on profile_id\n let filtered_mcas = all_mcas\n .clone()\n .filter_based_on_profile_and_connector_type(profile_id, ConnectorType::PaymentProcessor);\n\n logger::debug!(mca_before_filtering=?filtered_mcas);\n\n let mut response: Vec<ResponsePaymentMethodIntermediate> = vec![];\n // Key creation for storing PM_FILTER_CGRAPH\n let key = {\n format!(\n \"pm_filters_cgraph_{}_{}\",\n platform\n .get_processor()\n .get_account()\n .get_id()\n .get_string_repr(),\n profile_id.get_string_repr()\n )\n };\n\n if let Some(graph) = get_merchant_pm_filter_graph(&state, &key).await {\n // Derivation of PM_FILTER_CGRAPH from MokaCache successful\n for mca in &filtered_mcas {\n let payment_methods = match &mca.payment_methods_enabled {\n Some(pm) => pm,\n None => continue,\n };\n filter_payment_methods(\n &graph,\n mca.get_id(),\n payment_methods,\n &mut req,\n &mut response,\n payment_intent.as_ref(),\n payment_attempt.as_ref(),\n billing_address.as_ref(),\n mca.connector_name.clone(),\n &state.conf,\n )\n .await?;\n }\n } else {\n // No PM_FILTER_CGRAPH Cache present in MokaCache\n let mut builder = cgraph::ConstraintGraphBuilder::new();\n for mca in &filtered_mcas {\n let domain_id = builder.make_domain(\n mca.get_id().get_string_repr().to_string(),\n mca.connector_name.as_str(),\n );\n\n let Ok(domain_id) = domain_id else {\n logger::error!(\"Failed to construct domain for list payment methods\");\n return Err(errors::ApiErrorResponse::InternalServerError.into());\n };\n\n let payment_methods = match &mca.payment_methods_enabled {\n Some(pm) => pm,\n None => continue,\n };\n if let Err(e) = make_pm_graph(\n &mut builder,\n domain_id,\n payment_methods,\n mca.connector_name.clone(),\n pm_config_mapping,\n &state.conf.mandates.supported_payment_methods,\n &state.conf.mandates.update_mandate_supported,\n ) {\n logger::error!(\n \"Failed to construct constraint graph for list payment methods {e:?}\"\n );\n }\n }\n\n // Refreshing our CGraph cache\n let graph = refresh_pm_filters_cache(&state, &key, builder.build()).await;\n\n for mca in &filtered_mcas {\n let payment_methods = match &mca.payment_methods_enabled {\n Some(pm) => pm,\n None => continue,\n };\n filter_payment_methods(\n &graph,\n mca.get_id().clone(),\n payment_methods,\n &mut req,\n &mut response,\n payment_intent.as_ref(),\n payment_attempt.as_ref(),\n billing_address.as_ref(),\n mca.connector_name.clone(),\n &state.conf,\n )\n .await?;\n }\n }\n logger::info!(\n \"The Payment Methods available after Constraint Graph filtering are {:?}\",\n response\n );\n\n let mut pmt_to_auth_connector: HashMap<\n enums::PaymentMethod,\n HashMap<enums::PaymentMethodType, String>,\n > = HashMap::new();\n\n if let Some((payment_attempt, payment_intent)) =\n payment_attempt.as_ref().zip(payment_intent.as_ref())\n {\n let routing_enabled_pms = &router_consts::ROUTING_ENABLED_PAYMENT_METHODS;\n\n let routing_enabled_pm_types = &router_consts::ROUTING_ENABLED_PAYMENT_METHOD_TYPES;\n\n let mut chosen = api::SessionConnectorDatas::new(Vec::new());\n for intermediate in &response {\n if routing_enabled_pm_types.contains(&intermediate.payment_method_type)\n || routing_enabled_pms.contains(&intermediate.payment_method)\n {\n let connector_data = helpers::get_connector_data_with_token(\n &state,\n intermediate.connector.to_string(),\n None,\n intermediate.payment_method_type,\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"invalid connector name received\")?;\n\n chosen.push(api::SessionConnectorData {\n payment_method_sub_type: intermediate.payment_method_type,\n payment_method_type: intermediate.payment_method,\n connector: connector_data,\n business_sub_label: None,\n });\n }\n }\n let sfr = SessionFlowRoutingInput {\n state: &state,\n country: billing_address.clone().and_then(|ad| ad.country),\n key_store: platform.get_processor().get_key_store(),\n merchant_account: platform.get_processor().get_account(),\n payment_attempt,\n payment_intent,\n chosen,\n };\n let (result, routing_approach) = routing::perform_session_flow_routing(\n sfr,\n &business_profile,\n &enums::TransactionType::Payment,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"error performing session flow routing\")?;\n\n response.retain(|intermediate| {\n if !routing_enabled_pm_types.contains(&intermediate.payment_method_type)\n && !routing_enabled_pms.contains(&intermediate.payment_method)\n {\n return true;\n }\n\n if let Some(choice) = result.get(&intermediate.payment_method_type) {\n if let Some(first_routable_connector) = choice.first() {\n intermediate.connector\n == first_routable_connector\n .connector\n .connector_name\n .to_string()\n && first_routable_connector\n .connector\n .merchant_connector_id\n .as_ref()\n .map(|merchant_connector_id| {\n *merchant_connector_id.get_string_repr()\n == intermediate.merchant_connector_id\n })\n .unwrap_or_default()\n } else {\n false\n }\n } else {\n false\n }\n });\n\n let mut routing_info: storage::PaymentRoutingInfo = payment_attempt\n .straight_through_algorithm\n .clone()\n .map(|val| val.parse_value(\"PaymentRoutingInfo\"))\n .transpose()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid PaymentRoutingInfo format found in payment attempt\")?\n .unwrap_or(storage::PaymentRoutingInfo {\n algorithm: None,\n pre_routing_results: None,\n });\n\n let mut pre_routing_results: HashMap<\n api_enums::PaymentMethodType,\n storage::PreRoutingConnectorChoice,\n > = HashMap::new();\n\n for (pm_type, routing_choice) in result {\n let mut routable_choice_list = vec![];\n for choice in routing_choice {\n let routable_choice = routing_types::RoutableConnectorChoice {\n choice_kind: routing_types::RoutableChoiceKind::FullStruct,\n connector: choice\n .connector\n .connector_name\n .to_string()\n .parse::<api_enums::RoutableConnectors>()\n .change_context(errors::ApiErrorResponse::InternalServerError)?,\n merchant_connector_id: choice.connector.merchant_connector_id.clone(),\n };\n routable_choice_list.push(routable_choice);\n }\n pre_routing_results.insert(\n pm_type,\n storage::PreRoutingConnectorChoice::Multiple(routable_choice_list),\n );\n }\n\n let redis_conn = db\n .get_redis_conn()\n .map_err(|redis_error| logger::error!(?redis_error))\n .ok();\n\n let mut val = Vec::new();\n\n for (payment_method_type, routable_connector_choice) in &pre_routing_results {\n let routable_connector_list = match routable_connector_choice {\n storage::PreRoutingConnectorChoice::Single(routable_connector) => {\n vec![routable_connector.clone()]\n }\n storage::PreRoutingConnectorChoice::Multiple(routable_connector_list) => {\n routable_connector_list.clone()\n }\n };\n\n let first_routable_connector = routable_connector_list\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?;\n\n let matched_mca = filtered_mcas.iter().find(|m| {\n first_routable_connector.merchant_connector_id.as_ref() == Some(&m.get_id())\n });\n\n if let Some(m) = matched_mca {\n let pm_auth_config = m\n .pm_auth_config\n .as_ref()\n .map(|config| {\n serde_json::from_value::<PaymentMethodAuthConfig>(config.clone().expose())\n .change_context(errors::StorageError::DeserializationFailed)\n .attach_printable(\"Failed to deserialize Payment Method Auth config\")\n })\n .transpose()\n .unwrap_or_else(|error| {\n logger::error!(?error);\n None\n });\n\n if let Some(config) = pm_auth_config {\n for inner_config in config.enabled_payment_methods.iter() {\n let is_active_mca = all_mcas\n .iter()\n .any(|mca| mca.get_id() == inner_config.mca_id);\n\n if inner_config.payment_method_type == *payment_method_type && is_active_mca\n {\n let pm = pmt_to_auth_connector\n .get(&inner_config.payment_method)\n .cloned();\n\n let inner_map = if let Some(mut inner_map) = pm {\n inner_map.insert(\n *payment_method_type,\n inner_config.connector_name.clone(),\n );\n inner_map\n } else {\n HashMap::from([(\n *payment_method_type,\n inner_config.connector_name.clone(),\n )])\n };\n\n pmt_to_auth_connector.insert(inner_config.payment_method, inner_map);\n val.push(inner_config.clone());\n }\n }\n };\n }\n }\n\n let pm_auth_key = payment_intent.payment_id.get_pm_auth_key();\n let redis_expiry = state.conf.payment_method_auth.get_inner().redis_expiry;\n\n if let Some(rc) = redis_conn {\n rc.serialize_and_set_key_with_expiry(&pm_auth_key.as_str().into(), val, redis_expiry)\n .await\n .attach_printable(\"Failed to store pm auth data in redis\")\n .unwrap_or_else(|error| {\n logger::error!(?error);\n })\n };\n\n routing_info.pre_routing_results = Some(pre_routing_results);\n\n let encoded = routing_info\n .encode_to_value()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Unable to serialize payment routing info to value\")?;\n\n let attempt_update = storage::PaymentAttemptUpdate::UpdateTrackers {\n payment_token: None,\n connector: None,\n straight_through_algorithm: Some(encoded),\n amount_capturable: None,\n updated_by: platform\n .get_processor()\n .get_account()\n .storage_scheme\n .to_string(),\n merchant_connector_id: None,\n surcharge_amount: None,\n tax_amount: None,\n routing_approach,\n is_stored_credential: None,\n };\n\n state\n .store\n .update_payment_attempt_with_attempt_id(\n payment_attempt.clone(),\n attempt_update,\n platform.get_processor().get_account().storage_scheme,\n platform.get_processor().get_key_store(),\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n }\n\n // Check for `use_billing_as_payment_method_billing` config under business_profile\n // If this is disabled, then the billing details in required fields will be empty and have to be collected by the customer\n let billing_address_for_calculating_required_fields = business_profile\n .use_billing_as_payment_method_billing\n .unwrap_or(true)\n .then_some(billing_address.as_ref())\n .flatten();\n\n let req = api_models::payments::PaymentsRequest::foreign_try_from((\n payment_attempt.as_ref(),\n payment_intent.as_ref(),\n shipping_address.as_ref(),\n billing_address_for_calculating_required_fields,\n customer.as_ref(),\n ))?;\n\n let req_val = serde_json::to_value(req).ok();\n logger::debug!(filtered_payment_methods=?response);\n\n let mut payment_experiences_consolidated_hm: HashMap<\n api_enums::PaymentMethod,\n HashMap<api_enums::PaymentMethodType, HashMap<api_enums::PaymentExperience, Vec<String>>>,\n > = HashMap::new();\n\n let mut card_networks_consolidated_hm: HashMap<\n api_enums::PaymentMethod,\n HashMap<api_enums::PaymentMethodType, HashMap<api_enums::CardNetwork, Vec<String>>>,\n > = HashMap::new();\n\n let mut banks_consolidated_hm: HashMap<api_enums::PaymentMethodType, Vec<String>> =\n HashMap::new();\n\n let mut bank_debits_consolidated_hm =\n HashMap::<api_enums::PaymentMethodType, Vec<String>>::new();\n\n let mut bank_transfer_consolidated_hm =\n HashMap::<api_enums::PaymentMethodType, Vec<String>>::new();\n\n // All the required fields will be stored here and later filtered out based on business profile config\n let mut required_fields_hm = HashMap::<\n api_enums::PaymentMethod,\n HashMap<api_enums::PaymentMethodType, HashMap<String, RequiredFieldInfo>>,\n >::new();\n\n for element in response.clone() {\n let payment_method = element.payment_method;\n let payment_method_type = element.payment_method_type;\n let connector = element.connector.clone();\n\n let connector_variant = api_enums::Connector::from_str(connector.as_str())\n .change_context(errors::ConnectorError::InvalidConnectorName)\n .change_context(errors::ApiErrorResponse::InvalidDataValue {\n field_name: \"connector\",\n })\n .attach_printable_lazy(|| format!(\"unable to parse connector name {connector:?}\"))?;\n state.conf.required_fields.0.get(&payment_method).map(\n |required_fields_hm_for_each_payment_method_type| {\n required_fields_hm_for_each_payment_method_type\n .0\n .get(&payment_method_type)\n .map(|required_fields_hm_for_each_connector| {\n required_fields_hm.entry(payment_method).or_default();\n required_fields_hm_for_each_connector\n .fields\n .get(&connector_variant)\n .map(|required_fields_final| {\n let mut required_fields_hs = required_fields_final.common.clone();\n if is_cit_transaction {\n required_fields_hs\n .extend(required_fields_final.mandate.clone());\n } else {\n required_fields_hs\n .extend(required_fields_final.non_mandate.clone());\n }\n required_fields_hs = should_collect_shipping_or_billing_details_from_wallet_connector(\n payment_method,\n element.payment_experience.as_ref(),\n &business_profile,\n required_fields_hs.clone(),\n );\n\n // get the config, check the enums while adding\n {\n for (key, val) in &mut required_fields_hs {\n let temp = req_val\n .as_ref()\n .and_then(|r| get_val(key.to_owned(), r));\n if let Some(s) = temp {\n val.value = Some(s.into())\n };\n }\n }\n\n let existing_req_fields_hs = required_fields_hm\n .get_mut(&payment_method)\n .and_then(|inner_hm| inner_hm.get_mut(&payment_method_type));\n\n // If payment_method_type already exist in required_fields_hm, extend the required_fields hs to existing hs.\n if let Some(inner_hs) = existing_req_fields_hs {\n inner_hs.extend(required_fields_hs);\n } else {\n required_fields_hm.get_mut(&payment_method).map(|inner_hm| {\n inner_hm.insert(payment_method_type, required_fields_hs)\n });\n }\n })\n })\n },\n );\n\n if let Some(payment_experience) = element.payment_experience {\n if let Some(payment_method_hm) =\n payment_experiences_consolidated_hm.get_mut(&payment_method)\n {\n if let Some(payment_method_type_hm) =\n payment_method_hm.get_mut(&payment_method_type)\n {\n if let Some(vector_of_connectors) =\n payment_method_type_hm.get_mut(&payment_experience)\n {\n vector_of_connectors.push(connector);\n } else {\n payment_method_type_hm.insert(payment_experience, vec![connector]);\n }\n } else {\n payment_method_hm.insert(\n payment_method_type,\n HashMap::from([(payment_experience, vec![connector])]),\n );\n }\n } else {\n let inner_hm = HashMap::from([(payment_experience, vec![connector])]);\n let payment_method_type_hm = HashMap::from([(payment_method_type, inner_hm)]);\n payment_experiences_consolidated_hm.insert(payment_method, payment_method_type_hm);\n }\n }\n\n if let Some(card_networks) = element.card_networks {\n if let Some(payment_method_hm) = card_networks_consolidated_hm.get_mut(&payment_method)\n {\n if let Some(payment_method_type_hm) =\n payment_method_hm.get_mut(&payment_method_type)\n {\n for card_network in card_networks {\n if let Some(vector_of_connectors) =\n payment_method_type_hm.get_mut(&card_network)\n {\n let connector = element.connector.clone();\n vector_of_connectors.push(connector);\n } else {\n let connector = element.connector.clone();\n payment_method_type_hm.insert(card_network, vec![connector]);\n }\n }\n } else {\n let mut inner_hashmap: HashMap<api_enums::CardNetwork, Vec<String>> =\n HashMap::new();\n for card_network in card_networks {\n if let Some(vector_of_connectors) = inner_hashmap.get_mut(&card_network) {\n let connector = element.connector.clone();\n vector_of_connectors.push(connector);\n } else {\n let connector = element.connector.clone();\n inner_hashmap.insert(card_network, vec![connector]);\n }\n }\n payment_method_hm.insert(payment_method_type, inner_hashmap);\n }\n } else {\n let mut inner_hashmap: HashMap<api_enums::CardNetwork, Vec<String>> =\n HashMap::new();\n for card_network in card_networks {\n if let Some(vector_of_connectors) = inner_hashmap.get_mut(&card_network) {\n let connector = element.connector.clone();\n vector_of_connectors.push(connector);\n } else {\n let connector = element.connector.clone();\n inner_hashmap.insert(card_network, vec![connector]);\n }\n }\n let payment_method_type_hm = HashMap::from([(payment_method_type, inner_hashmap)]);\n card_networks_consolidated_hm.insert(payment_method, payment_method_type_hm);\n }\n }\n\n if element.payment_method == api_enums::PaymentMethod::BankRedirect {\n let connector = element.connector.clone();\n if let Some(vector_of_connectors) =\n banks_consolidated_hm.get_mut(&element.payment_method_type)\n {\n vector_of_connectors.push(connector);\n } else {\n banks_consolidated_hm.insert(element.payment_method_type, vec![connector]);\n }\n }\n\n if element.payment_method == api_enums::PaymentMethod::BankDebit {\n let connector = element.connector.clone();\n if let Some(vector_of_connectors) =\n bank_debits_consolidated_hm.get_mut(&element.payment_method_type)\n {\n vector_of_connectors.push(connector);\n } else {\n bank_debits_consolidated_hm.insert(element.payment_method_type, vec![connector]);\n }\n }\n\n if element.payment_method == api_enums::PaymentMethod::BankTransfer {\n let connector = element.connector.clone();\n if let Some(vector_of_connectors) =\n bank_transfer_consolidated_hm.get_mut(&element.payment_method_type)\n {\n vector_of_connectors.push(connector);\n } else {\n bank_transfer_consolidated_hm.insert(element.payment_method_type, vec![connector]);\n }\n }\n }\n\n let mut payment_method_responses: Vec<ResponsePaymentMethodsEnabled> = vec![];\n for key in payment_experiences_consolidated_hm.iter() {\n let mut payment_method_types = vec![];\n for payment_method_types_hm in key.1 {\n let mut payment_experience_types = vec![];\n for payment_experience_type in payment_method_types_hm.1 {\n payment_experience_types.push(PaymentExperienceTypes {\n payment_experience_type: *payment_experience_type.0,\n eligible_connectors: payment_experience_type.1.clone(),\n })\n }\n\n payment_method_types.push(ResponsePaymentMethodTypes {\n payment_method_type: *payment_method_types_hm.0,\n payment_experience: Some(payment_experience_types),\n card_networks: None,\n bank_names: None,\n bank_debits: None,\n bank_transfers: None,\n // Required fields for PayLater payment method\n required_fields: required_fields_hm\n .get(key.0)\n .and_then(|inner_hm| inner_hm.get(payment_method_types_hm.0))\n .cloned(),\n surcharge_details: None,\n pm_auth_connector: pmt_to_auth_connector\n .get(key.0)\n .and_then(|pm_map| pm_map.get(payment_method_types_hm.0))\n .cloned(),\n })\n }\n\n payment_method_responses.push(ResponsePaymentMethodsEnabled {\n payment_method: *key.0,\n payment_method_types,\n })\n }\n\n for key in card_networks_consolidated_hm.iter() {\n let mut payment_method_types = vec![];\n for payment_method_types_hm in key.1 {\n let mut card_network_types = vec![];\n for card_network_type in payment_method_types_hm.1 {\n card_network_types.push(CardNetworkTypes {\n card_network: card_network_type.0.clone(),\n eligible_connectors: card_network_type.1.clone(),\n surcharge_details: None,\n })\n }\n\n payment_method_types.push(ResponsePaymentMethodTypes {\n payment_method_type: *payment_method_types_hm.0,\n card_networks: Some(card_network_types),\n payment_experience: None,\n bank_names: None,\n bank_debits: None,\n bank_transfers: None,\n // Required fields for Card payment method\n required_fields: required_fields_hm\n .get(key.0)\n .and_then(|inner_hm| inner_hm.get(payment_method_types_hm.0))\n .cloned(),\n surcharge_details: None,\n pm_auth_connector: pmt_to_auth_connector\n .get(key.0)\n .and_then(|pm_map| pm_map.get(payment_method_types_hm.0))\n .cloned(),\n })\n }\n\n payment_method_responses.push(ResponsePaymentMethodsEnabled {\n payment_method: *key.0,\n payment_method_types,\n })\n }\n\n let mut bank_redirect_payment_method_types = vec![];\n\n for key in banks_consolidated_hm.iter() {\n let payment_method_type = *key.0;\n let connectors = key.1.clone();\n let bank_names = get_banks(&state, payment_method_type, connectors)?;\n bank_redirect_payment_method_types.push({\n ResponsePaymentMethodTypes {\n payment_method_type,\n bank_names: Some(bank_names),\n payment_experience: None,\n card_networks: None,\n bank_debits: None,\n bank_transfers: None,\n // Required fields for BankRedirect payment method\n required_fields: required_fields_hm\n .get(&api_enums::PaymentMethod::BankRedirect)\n .and_then(|inner_hm| inner_hm.get(key.0))\n .cloned(),\n surcharge_details: None,\n pm_auth_connector: pmt_to_auth_connector\n .get(&enums::PaymentMethod::BankRedirect)\n .and_then(|pm_map| pm_map.get(key.0))\n .cloned(),\n }\n })\n }\n\n if !bank_redirect_payment_method_types.is_empty() {\n payment_method_responses.push(ResponsePaymentMethodsEnabled {\n payment_method: api_enums::PaymentMethod::BankRedirect,\n payment_method_types: bank_redirect_payment_method_types,\n });\n }\n\n let mut bank_debit_payment_method_types = vec![];\n\n for key in bank_debits_consolidated_hm.iter() {\n let payment_method_type = *key.0;\n let connectors = key.1.clone();\n bank_debit_payment_method_types.push({\n ResponsePaymentMethodTypes {\n payment_method_type,\n bank_names: None,\n payment_experience: None,\n card_networks: None,\n bank_debits: Some(api_models::payment_methods::BankDebitTypes {\n eligible_connectors: connectors.clone(),\n }),\n bank_transfers: None,\n // Required fields for BankDebit payment method\n required_fields: required_fields_hm\n .get(&api_enums::PaymentMethod::BankDebit)\n .and_then(|inner_hm| inner_hm.get(key.0))\n .cloned(),\n surcharge_details: None,\n pm_auth_connector: pmt_to_auth_connector\n .get(&enums::PaymentMethod::BankDebit)\n .and_then(|pm_map| pm_map.get(key.0))\n .cloned(),\n }\n })\n }\n\n if !bank_debit_payment_method_types.is_empty() {\n payment_method_responses.push(ResponsePaymentMethodsEnabled {\n payment_method: api_enums::PaymentMethod::BankDebit,\n payment_method_types: bank_debit_payment_method_types,\n });\n }\n\n let mut bank_transfer_payment_method_types = vec![];\n\n for key in bank_transfer_consolidated_hm.iter() {\n let payment_method_type = *key.0;\n let connectors = key.1.clone();\n bank_transfer_payment_method_types.push({\n ResponsePaymentMethodTypes {\n payment_method_type,\n bank_names: None,\n payment_experience: None,\n card_networks: None,\n bank_debits: None,\n bank_transfers: Some(api_models::payment_methods::BankTransferTypes {\n eligible_connectors: connectors,\n }),\n // Required fields for BankTransfer payment method\n required_fields: required_fields_hm\n .get(&api_enums::PaymentMethod::BankTransfer)\n .and_then(|inner_hm| inner_hm.get(key.0))\n .cloned(),\n surcharge_details: None,\n pm_auth_connector: pmt_to_auth_connector\n .get(&enums::PaymentMethod::BankTransfer)\n .and_then(|pm_map| pm_map.get(key.0))\n .cloned(),\n }\n })\n }\n\n if !bank_transfer_payment_method_types.is_empty() {\n payment_method_responses.push(ResponsePaymentMethodsEnabled {\n payment_method: api_enums::PaymentMethod::BankTransfer,\n payment_method_types: bank_transfer_payment_method_types,\n });\n }\n let currency = payment_intent.as_ref().and_then(|pi| pi.currency);\n let skip_external_tax_calculation = payment_intent\n .as_ref()\n .and_then(|intent| intent.skip_external_tax_calculation)\n .unwrap_or(false);\n let request_external_three_ds_authentication = payment_intent\n .as_ref()\n .and_then(|intent| intent.request_external_three_ds_authentication)\n .unwrap_or(false);\n let sdk_next_action = payment_method_utils::get_sdk_next_action_for_payment_method_list(\n db,\n platform.get_processor().get_account().get_id(),\n )\n .await;\n let is_guest_customer = payment_intent\n .as_ref()\n .map(|payment_intent| payment_intent.customer_id.is_none())\n .unwrap_or(true);\n let merchant_surcharge_configs = if let Some((payment_attempt, payment_intent)) =\n payment_attempt.as_ref().zip(payment_intent)\n {\n Box::pin(call_surcharge_decision_management(\n state,\n &platform,\n &business_profile,\n payment_attempt,\n payment_intent,\n billing_address,\n &mut payment_method_responses,\n ))\n .await?\n } else {\n api_surcharge_decision_configs::MerchantSurchargeConfigs::default()\n };\n\n let collect_shipping_details_from_wallets = if business_profile\n .always_collect_shipping_details_from_wallet_connector\n .unwrap_or(false)\n {\n business_profile.always_collect_shipping_details_from_wallet_connector\n } else {\n business_profile.collect_shipping_details_from_wallet_connector\n };\n\n let collect_billing_details_from_wallets = if business_profile\n .always_collect_billing_details_from_wallet_connector\n .unwrap_or(false)\n {\n business_profile.always_collect_billing_details_from_wallet_connector\n } else {\n business_profile.collect_billing_details_from_wallet_connector\n };\n\n let is_tax_connector_enabled = business_profile.get_is_tax_connector_enabled();\n\n Ok(services::ApplicationResponse::Json(\n api::PaymentMethodListResponse {\n redirect_url: business_profile.return_url.clone(),\n merchant_name: platform\n .get_processor()\n .get_account()\n .merchant_name\n .to_owned(),\n payment_type,\n payment_methods: payment_method_responses,\n mandate_payment: payment_attempt.and_then(|inner| inner.mandate_details).map(\n |d| match d {\n hyperswitch_domain_models::mandates::MandateDataType::SingleUse(i) => {\n api::MandateType::SingleUse(api::MandateAmountData {\n amount: i.amount,\n currency: i.currency,\n start_date: i.start_date,\n end_date: i.end_date,\n metadata: i.metadata,\n })\n }\n hyperswitch_domain_models::mandates::MandateDataType::MultiUse(Some(i)) => {\n api::MandateType::MultiUse(Some(api::MandateAmountData {\n amount: i.amount,\n currency: i.currency,\n start_date: i.start_date,\n end_date: i.end_date,\n metadata: i.metadata,\n }))\n }\n hyperswitch_domain_models::mandates::MandateDataType::MultiUse(None) => {\n api::MandateType::MultiUse(None)\n }\n },\n ),\n show_surcharge_breakup_screen: merchant_surcharge_configs\n .show_surcharge_breakup_screen\n .unwrap_or_default(),\n currency,\n request_external_three_ds_authentication,\n collect_shipping_details_from_wallets,\n collect_billing_details_from_wallets,\n is_tax_calculation_enabled: is_tax_connector_enabled && !skip_external_tax_calculation,\n sdk_next_action,\n is_guest_customer,\n },\n ))\n}",
|
| 33 |
+
"diff_span": {
|
| 34 |
+
"before": "",
|
| 35 |
+
"after": " )\n .await;\n let is_guest_customer = payment_intent\n .as_ref()\n .map(|payment_intent| payment_intent.customer_id.is_none())\n .unwrap_or(true);\n let merchant_surcharge_configs = if let Some((payment_attempt, payment_intent)) =\n payment_attempt.as_ref().zip(payment_intent)\n {\n Box::pin(call_surcharge_decision_management(\n state,\n &platform,\n &business_profile,\n payment_attempt,\n payment_intent,\n billing_address,\n &mut payment_method_responses,\n ))\n .await?\n } else {\n api_surcharge_decision_configs::MerchantSurchargeConfigs::default()\n };\n\n let collect_shipping_details_from_wallets = if business_profile\n .always_collect_shipping_details_from_wallet_connector\n .unwrap_or(false)\n {\n business_profile.always_collect_shipping_details_from_wallet_connector\n } else {\n business_profile.collect_shipping_details_from_wallet_connector\n };\n\n let collect_billing_details_from_wallets = if business_profile\n .always_collect_billing_details_from_wallet_connector\n .unwrap_or(false)\n {\n business_profile.always_collect_billing_details_from_wallet_connector\n } else {\n business_profile.collect_billing_details_from_wallet_connector\n };\n\n let is_tax_connector_enabled = business_profile.get_is_tax_connector_enabled();\n\n Ok(services::ApplicationResponse::Json(\n api::PaymentMethodListResponse {\n redirect_url: business_profile.return_url.clone(),\n merchant_name: platform\n .get_processor()\n .get_account()\n .merchant_name\n .to_owned(),\n payment_type,\n payment_methods: payment_method_responses,\n mandate_payment: payment_attempt.and_then(|inner| inner.mandate_details).map(\n |d| match d {\n hyperswitch_domain_models::mandates::MandateDataType::SingleUse(i) => {\n api::MandateType::SingleUse(api::MandateAmountData {\n amount: i.amount,\n currency: i.currency,\n start_date: i.start_date,\n end_date: i.end_date,\n metadata: i.metadata,\n })\n }\n hyperswitch_domain_models::mandates::MandateDataType::MultiUse(Some(i)) => {\n api::MandateType::MultiUse(Some(api::MandateAmountData {\n amount: i.amount,\n currency: i.currency,\n start_date: i.start_date,\n end_date: i.end_date,\n metadata: i.metadata,\n }))\n }\n hyperswitch_domain_models::mandates::MandateDataType::MultiUse(None) => {\n api::MandateType::MultiUse(None)\n }\n },\n ),\n show_surcharge_breakup_screen: merchant_surcharge_configs\n .show_surcharge_breakup_screen\n .unwrap_or_default(),\n currency,\n request_external_three_ds_authentication,\n collect_shipping_details_from_wallets,\n collect_billing_details_from_wallets,\n is_tax_calculation_enabled: is_tax_connector_enabled && !skip_external_tax_calculation,\n sdk_next_action,\n is_guest_customer,\n },\n ))"
|
| 36 |
+
},
|
| 37 |
+
"commit_sha": "4d52d932f37e6c760704452b6c43d9518606d053"
|
| 38 |
+
}
|
| 39 |
+
]
|
| 40 |
+
}
|
diffs/pr_10628/912586b/diff.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "912586be98b9c7881f29b30389e8e26c63835c5e",
|
| 3 |
+
"pr_number": 10628,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/router/src/core/unified_connector_service.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": [
|
| 8 |
+
{
|
| 9 |
+
"id": "crates/router/src/core/unified_connector_service.rs::function::ucs_logging_wrapper_new",
|
| 10 |
+
"file": "crates/router/src/core/unified_connector_service.rs",
|
| 11 |
+
"kind": "function_item",
|
| 12 |
+
"status": "modified",
|
| 13 |
+
"code_changed": true,
|
| 14 |
+
"imports_changed": false,
|
| 15 |
+
"before_code": "pub async fn ucs_logging_wrapper_new<T, F, Fut, Req, Resp, GrpcReq, GrpcResp>(\n router_data: RouterData<T, Req, Resp>,\n state: &SessionState,\n grpc_request: GrpcReq,\n grpc_header_builder: external_services::grpc_client::GrpcHeadersUcsBuilderFinal,\n handler: F,\n) -> CustomResult<RouterData<T, Req, Resp>, UnifiedConnectorServiceError>\nwhere\n T: std::fmt::Debug + Clone + Send + 'static,\n Req: std::fmt::Debug + Clone + Send + Sync + 'static,\n Resp: std::fmt::Debug + Clone + Send + Sync + 'static,\n GrpcReq: serde::Serialize,\n GrpcResp: serde::Serialize,\n F: FnOnce(\n RouterData<T, Req, Resp>,\n GrpcReq,\n external_services::grpc_client::GrpcHeadersUcs,\n ) -> Fut\n + Send,\n Fut: std::future::Future<\n Output = CustomResult<\n (RouterData<T, Req, Resp>, GrpcResp),\n UnifiedConnectorServiceError,\n >,\n > + Send,\n{\n tracing::Span::current().record(\"connector_name\", &router_data.connector);\n tracing::Span::current().record(\"flow_type\", std::any::type_name::<T>());\n tracing::Span::current().record(\"payment_id\", &router_data.payment_id);\n\n // Capture request data for logging\n let connector_name = router_data.connector.clone();\n let payment_id = router_data.payment_id.clone();\n let merchant_id = router_data.merchant_id.clone();\n let refund_id = router_data.refund_id.clone();\n let dispute_id = router_data.dispute_id.clone();\n let grpc_header = grpc_header_builder.build();\n // Log the actual gRPC request with masking\n let grpc_request_body = masking::masked_serialize(&grpc_request)\n .unwrap_or_else(|_| serde_json::json!({\"error\": \"failed_to_serialize_grpc_request\"}));\n\n // Update connector call count metrics for UCS operations\n crate::routes::metrics::CONNECTOR_CALL_COUNT.add(\n 1,\n router_env::metric_attributes!(\n (\"connector\", connector_name.clone()),\n (\n \"flow\",\n std::any::type_name::<T>()\n .split(\"::\")\n .last()\n .unwrap_or_default()\n ),\n ),\n );\n\n // Execute UCS function and measure timing\n let start_time = Instant::now();\n let result = handler(router_data, grpc_request, grpc_header).await;\n let external_latency = start_time.elapsed().as_millis();\n\n // Create and emit connector event after UCS call\n let (status_code, response_body, router_result) = match result {\n Ok((updated_router_data, grpc_response)) => {\n let status = updated_router_data\n .connector_http_status_code\n .unwrap_or(200);\n\n // Log the actual gRPC response\n let grpc_response_body = serde_json::to_value(&grpc_response).unwrap_or_else(\n |_| serde_json::json!({\"error\": \"failed_to_serialize_grpc_response\"}),\n );\n\n (status, Some(grpc_response_body), Ok(updated_router_data))\n }\n Err(error) => {\n // Update error metrics for UCS calls\n crate::routes::metrics::CONNECTOR_ERROR_RESPONSE_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector_name.clone(),)),\n );\n\n let error_body = serde_json::json!({\n \"error\": error.to_string(),\n \"error_type\": \"ucs_call_failed\"\n });\n (500, Some(error_body), Err(error))\n }\n };\n\n let mut connector_event = ConnectorEvent::new(\n state.tenant.tenant_id.clone(),\n connector_name,\n std::any::type_name::<T>(),\n grpc_request_body,\n \"grpc://unified-connector-service\".to_string(),\n Method::Post,\n payment_id,\n merchant_id,\n state.request_id.as_ref(),\n external_latency,\n refund_id,\n dispute_id,\n status_code,\n );\n\n // Set response body based on status code\n if let Some(body) = response_body {\n match status_code {\n 400..=599 => {\n connector_event.set_error_response_body(&body);\n }\n _ => {\n connector_event.set_response_body(&body);\n }\n }\n }\n\n // Emit event\n state.event_handler.log_event(&connector_event);\n\n // Set external latency on router data\n router_result.map(|mut router_data| {\n router_data.external_latency =\n Some(router_data.external_latency.unwrap_or(0) + external_latency);\n router_data\n })\n}",
|
| 16 |
+
"after_code": "pub async fn ucs_logging_wrapper_new<T, F, Fut, Req, Resp, GrpcReq, GrpcResp>(\n router_data: RouterData<T, Req, Resp>,\n state: &SessionState,\n grpc_request: GrpcReq,\n grpc_header_builder: external_services::grpc_client::GrpcHeadersUcsBuilderFinal,\n handler: F,\n) -> CustomResult<RouterData<T, Req, Resp>, UnifiedConnectorServiceError>\nwhere\n T: std::fmt::Debug + Clone + Send + 'static,\n Req: std::fmt::Debug + Clone + Send + Sync + 'static,\n Resp: std::fmt::Debug + Clone + Send + Sync + 'static,\n GrpcReq: serde::Serialize,\n GrpcResp: serde::Serialize,\n F: FnOnce(\n RouterData<T, Req, Resp>,\n GrpcReq,\n external_services::grpc_client::GrpcHeadersUcs,\n ) -> Fut\n + Send,\n Fut: std::future::Future<\n Output = CustomResult<\n (RouterData<T, Req, Resp>, GrpcResp),\n UnifiedConnectorServiceError,\n >,\n > + Send,\n{\n tracing::Span::current().record(\"connector_name\", &router_data.connector);\n tracing::Span::current().record(\"flow_type\", std::any::type_name::<T>());\n tracing::Span::current().record(\"payment_id\", &router_data.payment_id);\n\n // Capture request data for logging\n let connector_name = router_data.connector.clone();\n let payment_id = router_data.payment_id.clone();\n let merchant_id = router_data.merchant_id.clone();\n let refund_id = router_data.refund_id.clone();\n let dispute_id = router_data.dispute_id.clone();\n let grpc_header = grpc_header_builder.build();\n // Log the actual gRPC request with masking\n let grpc_request_body = masking::masked_serialize(&grpc_request)\n .unwrap_or_else(|_| serde_json::json!({\"error\": \"failed_to_serialize_grpc_request\"}));\n\n // Update connector call count metrics for UCS operations\n crate::routes::metrics::CONNECTOR_CALL_COUNT.add(\n 1,\n router_env::metric_attributes!(\n (\"connector\", connector_name.clone()),\n (\n \"flow\",\n std::any::type_name::<T>()\n .split(\"::\")\n .last()\n .unwrap_or_default()\n ),\n ),\n );\n\n // Execute UCS function and measure timing\n let start_time = Instant::now();\n let result = handler(router_data, grpc_request, grpc_header).await;\n let external_latency = start_time.elapsed().as_millis();\n\n // Create and emit connector event after UCS call\n let (status_code, response_body, router_result) = match result {\n Ok((updated_router_data, grpc_response)) => {\n let status = updated_router_data\n .connector_http_status_code\n .unwrap_or(200);\n\n // Log the actual gRPC response\n let grpc_response_body = masking::masked_serialize(&grpc_response).unwrap_or_else(\n |_| serde_json::json!({\"error\": \"failed_to_serialize_grpc_response\"}),\n );\n\n (status, Some(grpc_response_body), Ok(updated_router_data))\n }\n Err(error) => {\n // Update error metrics for UCS calls\n crate::routes::metrics::CONNECTOR_ERROR_RESPONSE_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector_name.clone(),)),\n );\n\n let error_body = serde_json::json!({\n \"error\": error.to_string(),\n \"error_type\": \"ucs_call_failed\"\n });\n (500, Some(error_body), Err(error))\n }\n };\n\n let mut connector_event = ConnectorEvent::new(\n state.tenant.tenant_id.clone(),\n connector_name,\n std::any::type_name::<T>(),\n grpc_request_body,\n \"grpc://unified-connector-service\".to_string(),\n Method::Post,\n payment_id,\n merchant_id,\n state.request_id.as_ref(),\n external_latency,\n refund_id,\n dispute_id,\n status_code,\n );\n\n // Set response body based on status code\n if let Some(body) = response_body {\n match status_code {\n 400..=599 => {\n connector_event.set_error_response_body(&body);\n }\n _ => {\n connector_event.set_response_body(&body);\n }\n }\n }\n\n // Emit event\n state.event_handler.log_event(&connector_event);\n\n // Set external latency on router data\n router_result.map(|mut router_data| {\n router_data.external_latency =\n Some(router_data.external_latency.unwrap_or(0) + external_latency);\n router_data\n })\n}",
|
| 17 |
+
"diff_span": {
|
| 18 |
+
"before": "\n // Log the actual gRPC response\n let grpc_response_body = serde_json::to_value(&grpc_response).unwrap_or_else(\n |_| serde_json::json!({\"error\": \"failed_to_serialize_grpc_response\"}),\n );",
|
| 19 |
+
"after": "\n // Log the actual gRPC response\n let grpc_response_body = masking::masked_serialize(&grpc_response).unwrap_or_else(\n |_| serde_json::json!({\"error\": \"failed_to_serialize_grpc_response\"}),\n );"
|
| 20 |
+
},
|
| 21 |
+
"commit_sha": "912586be98b9c7881f29b30389e8e26c63835c5e"
|
| 22 |
+
}
|
| 23 |
+
]
|
| 24 |
+
}
|
diffs/pr_6728/b456ad6/diff.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "b456ad681c0f41a17d86ddd14d77dbd589d4829c",
|
| 3 |
+
"pr_number": 6728,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/router/src/connector/cybersource/transformers.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": []
|
| 8 |
+
}
|
diffs/pr_6736/0a4b7ff/diff.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "0a4b7ff44ca61e912259ea365f7be7cc11d8c86d",
|
| 3 |
+
"pr_number": 6736,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/api_models/src/admin.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": [
|
| 8 |
+
{
|
| 9 |
+
"id": "crates/api_models/src/admin.rs::struct::ProfileCreate",
|
| 10 |
+
"file": "crates/api_models/src/admin.rs",
|
| 11 |
+
"kind": "struct_item",
|
| 12 |
+
"status": "modified",
|
| 13 |
+
"code_changed": true,
|
| 14 |
+
"imports_changed": false,
|
| 15 |
+
"before_code": "pub struct ProfileCreate {\n /// The name of profile\n #[schema(max_length = 64)]\n pub profile_name: String,\n\n /// The URL to redirect after the completion of the operation\n #[schema(value_type = Option<String>, max_length = 255, example = \"https://www.example.com/success\")]\n pub return_url: Option<common_utils::types::Url>,\n\n /// A boolean value to indicate if payment response hash needs to be enabled\n #[schema(default = true, example = true)]\n pub enable_payment_response_hash: Option<bool>,\n\n /// Refers to the hash key used for calculating the signature for webhooks and redirect response. If the value is not provided, a value is automatically generated.\n pub payment_response_hash_key: Option<String>,\n\n /// A boolean value to indicate if redirect to merchant with http post needs to be enabled\n #[schema(default = false, example = true)]\n pub redirect_to_merchant_with_http_post: Option<bool>,\n\n /// Webhook related details\n pub webhook_details: Option<WebhookDetails>,\n\n /// Metadata is useful for storing additional, unstructured information on an object.\n #[schema(value_type = Option<Object>, example = r#\"{ \"city\": \"NY\", \"unit\": \"245\" }\"#)]\n pub metadata: Option<pii::SecretSerdeValue>,\n\n /// Will be used to determine the time till which your payment will be active once the payment session starts\n #[schema(value_type = Option<u32>, example = 900)]\n pub order_fulfillment_time: Option<OrderFulfillmentTime>,\n\n /// Whether the order fulfillment time is calculated from the origin or the time of creating the payment, or confirming the payment\n #[schema(value_type = Option<OrderFulfillmentTimeOrigin>, example = \"create\")]\n pub order_fulfillment_time_origin: Option<api_enums::OrderFulfillmentTimeOrigin>,\n\n /// Verified Apple Pay domains for a particular profile\n pub applepay_verified_domains: Option<Vec<String>>,\n\n /// Client Secret Default expiry for all payments created under this profile\n #[schema(example = 900)]\n pub session_expiry: Option<u32>,\n\n /// Default Payment Link config for all payment links created under this profile\n pub payment_link_config: Option<BusinessPaymentLinkConfig>,\n\n /// External 3DS authentication details\n pub authentication_connector_details: Option<AuthenticationConnectorDetails>,\n\n /// Whether to use the billing details passed when creating the intent as payment method billing\n pub use_billing_as_payment_method_billing: Option<bool>,\n\n /// A boolean value to indicate if customer shipping details needs to be collected from wallet\n /// connector only if it is required field for connector (Eg. Apple Pay, Google Pay etc)\n #[schema(default = false, example = false)]\n pub collect_shipping_details_from_wallet_connector_if_required: Option<bool>,\n\n /// A boolean value to indicate if customer billing details needs to be collected from wallet\n /// connector only if it is required field for connector (Eg. Apple Pay, Google Pay etc)\n #[schema(default = false, example = false)]\n pub collect_billing_details_from_wallet_connector_if_required: Option<bool>,\n\n /// A boolean value to indicate if customer shipping details needs to be collected from wallet\n /// connector irrespective of connector required fields (Eg. Apple pay, Google pay etc)\n #[schema(default = false, example = false)]\n pub always_collect_shipping_details_from_wallet_connector: Option<bool>,\n\n /// A boolean value to indicate if customer billing details needs to be collected from wallet\n /// connector irrespective of connector required fields (Eg. Apple pay, Google pay etc)\n #[schema(default = false, example = false)]\n pub always_collect_billing_details_from_wallet_connector: Option<bool>,\n\n /// Indicates if the MIT (merchant initiated transaction) payments can be made connector\n /// agnostic, i.e., MITs may be processed through different connector than CIT (customer\n /// initiated transaction) based on the routing rules.\n /// If set to `false`, MIT will go through the same connector as the CIT.\n pub is_connector_agnostic_mit_enabled: Option<bool>,\n\n /// Default payout link config\n #[schema(value_type = Option<BusinessPayoutLinkConfig>)]\n pub payout_link_config: Option<BusinessPayoutLinkConfig>,\n\n /// These key-value pairs are sent as additional custom headers in the outgoing webhook request. It is recommended not to use more than four key-value pairs.\n #[schema(value_type = Option<Object>, example = r#\"{ \"key1\": \"value-1\", \"key2\": \"value-2\" }\"#)]\n pub outgoing_webhook_custom_http_headers: Option<HashMap<String, String>>,\n\n /// Merchant Connector id to be stored for tax_calculator connector\n #[schema(value_type = Option<String>)]\n pub tax_connector_id: Option<id_type::MerchantConnectorAccountId>,\n\n /// Indicates if tax_calculator connector is enabled or not.\n /// If set to `true` tax_connector_id will be checked.\n #[serde(default)]\n pub is_tax_connector_enabled: bool,\n\n /// Indicates if network tokenization is enabled or not.\n #[serde(default)]\n pub is_network_tokenization_enabled: bool,\n\n /// Indicates if click to pay is enabled or not.\n #[schema(default = false, example = false)]\n pub is_click_to_pay_enabled: Option<bool>,\n}",
|
| 16 |
+
"after_code": "pub struct ProfileCreate {\n /// The name of profile\n #[schema(max_length = 64)]\n pub profile_name: String,\n\n /// The URL to redirect after the completion of the operation\n #[schema(value_type = Option<String>, max_length = 255, example = \"https://www.example.com/success\")]\n pub return_url: Option<common_utils::types::Url>,\n\n /// A boolean value to indicate if payment response hash needs to be enabled\n #[schema(default = true, example = true)]\n pub enable_payment_response_hash: Option<bool>,\n\n /// Refers to the hash key used for calculating the signature for webhooks and redirect response. If the value is not provided, a value is automatically generated.\n pub payment_response_hash_key: Option<String>,\n\n /// A boolean value to indicate if redirect to merchant with http post needs to be enabled\n #[schema(default = false, example = true)]\n pub redirect_to_merchant_with_http_post: Option<bool>,\n\n /// Webhook related details\n pub webhook_details: Option<WebhookDetails>,\n\n /// Metadata is useful for storing additional, unstructured information on an object.\n #[schema(value_type = Option<Object>, example = r#\"{ \"city\": \"NY\", \"unit\": \"245\" }\"#)]\n pub metadata: Option<pii::SecretSerdeValue>,\n\n /// Will be used to determine the time till which your payment will be active once the payment session starts\n #[schema(value_type = Option<u32>, example = 900)]\n pub order_fulfillment_time: Option<OrderFulfillmentTime>,\n\n /// Whether the order fulfillment time is calculated from the origin or the time of creating the payment, or confirming the payment\n #[schema(value_type = Option<OrderFulfillmentTimeOrigin>, example = \"create\")]\n pub order_fulfillment_time_origin: Option<api_enums::OrderFulfillmentTimeOrigin>,\n\n /// Verified Apple Pay domains for a particular profile\n pub applepay_verified_domains: Option<Vec<String>>,\n\n /// Client Secret Default expiry for all payments created under this profile\n #[schema(example = 900)]\n pub session_expiry: Option<u32>,\n\n /// Default Payment Link config for all payment links created under this profile\n pub payment_link_config: Option<BusinessPaymentLinkConfig>,\n\n /// External 3DS authentication details\n pub authentication_connector_details: Option<AuthenticationConnectorDetails>,\n\n /// Whether to use the billing details passed when creating the intent as payment method billing\n pub use_billing_as_payment_method_billing: Option<bool>,\n\n /// A boolean value to indicate if customer shipping details needs to be collected from wallet\n /// connector only if it is required field for connector (Eg. Apple Pay, Google Pay etc)\n #[schema(default = false, example = false)]\n pub collect_shipping_details_from_wallet_connector_if_required: Option<bool>,\n\n /// A boolean value to indicate if customer billing details needs to be collected from wallet\n /// connector only if it is required field for connector (Eg. Apple Pay, Google Pay etc)\n #[schema(default = false, example = false)]\n pub collect_billing_details_from_wallet_connector_if_required: Option<bool>,\n\n /// A boolean value to indicate if customer shipping details needs to be collected from wallet\n /// connector irrespective of connector required fields (Eg. Apple pay, Google pay etc)\n #[schema(default = false, example = false)]\n pub always_collect_shipping_details_from_wallet_connector: Option<bool>,\n\n /// A boolean value to indicate if customer billing details needs to be collected from wallet\n /// connector irrespective of connector required fields (Eg. Apple pay, Google pay etc)\n #[schema(default = false, example = false)]\n pub always_collect_billing_details_from_wallet_connector: Option<bool>,\n\n /// Indicates if the MIT (merchant initiated transaction) payments can be made connector\n /// agnostic, i.e., MITs may be processed through different connector than CIT (customer\n /// initiated transaction) based on the routing rules.\n /// If set to `false`, MIT will go through the same connector as the CIT.\n pub is_connector_agnostic_mit_enabled: Option<bool>,\n\n /// Default payout link config\n #[schema(value_type = Option<BusinessPayoutLinkConfig>)]\n pub payout_link_config: Option<BusinessPayoutLinkConfig>,\n\n /// These key-value pairs are sent as additional custom headers in the outgoing webhook request. It is recommended not to use more than four key-value pairs.\n #[schema(value_type = Option<Object>, example = r#\"{ \"key1\": \"value-1\", \"key2\": \"value-2\" }\"#)]\n pub outgoing_webhook_custom_http_headers: Option<HashMap<String, String>>,\n\n /// Merchant Connector id to be stored for tax_calculator connector\n #[schema(value_type = Option<String>)]\n pub tax_connector_id: Option<id_type::MerchantConnectorAccountId>,\n\n /// Indicates if tax_calculator connector is enabled or not.\n /// If set to `true` tax_connector_id will be checked.\n #[serde(default)]\n pub is_tax_connector_enabled: bool,\n\n /// Indicates if network tokenization is enabled or not.\n #[serde(default)]\n pub is_network_tokenization_enabled: bool,\n\n /// Indicates if click to pay is enabled or not.\n #[schema(default = false, example = false)]\n pub is_click_to_pay_enabled: bool,\n}",
|
| 17 |
+
"diff_span": {
|
| 18 |
+
"before": " /// Indicates if click to pay is enabled or not.\n #[schema(default = false, example = false)]\n pub is_click_to_pay_enabled: Option<bool>,\n}",
|
| 19 |
+
"after": " /// Indicates if click to pay is enabled or not.\n #[schema(default = false, example = false)]\n pub is_click_to_pay_enabled: bool,\n}"
|
| 20 |
+
},
|
| 21 |
+
"commit_sha": "0a4b7ff44ca61e912259ea365f7be7cc11d8c86d"
|
| 22 |
+
}
|
| 23 |
+
]
|
| 24 |
+
}
|
diffs/pr_6736/1eb1130/diff.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
diffs/pr_6736/591e1a8/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "591e1a8842647a29e5221fd4c22dbdbd7f6a3add",
|
| 3 |
+
"pr_number": 6736,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_6736/60dab50/diff.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "60dab50a4913e9f4e1d8bae0b88ba23b80edeac0",
|
| 3 |
+
"pr_number": 6736,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/diesel_models/src/schema_v2.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": []
|
| 8 |
+
}
|
diffs/pr_6736/6d1b71d/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "6d1b71d38b656a8ec2f6a592a96e552600f31892",
|
| 3 |
+
"pr_number": 6736,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_6736/cd8b867/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "cd8b867d7b6b5e36e33fa820da616148a70a351c",
|
| 3 |
+
"pr_number": 6736,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_6736/d6944da/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "d6944daf3a2b3405fce0caf4c24d9c6f7c5588b9",
|
| 3 |
+
"pr_number": 6736,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_6736/e520c54/diff.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "e520c54c70c3757b4a3402ff10ed0e0e059f56d2",
|
| 3 |
+
"pr_number": 6736,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/hyperswitch_domain_models/src/business_profile.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": [
|
| 8 |
+
{
|
| 9 |
+
"id": "crates/hyperswitch_domain_models/src/business_profile.rs::impl::ProfileUpdateInternal",
|
| 10 |
+
"file": "crates/hyperswitch_domain_models/src/business_profile.rs",
|
| 11 |
+
"kind": "impl_item",
|
| 12 |
+
"status": "modified",
|
| 13 |
+
"code_changed": true,
|
| 14 |
+
"imports_changed": false,
|
| 15 |
+
"before_code": "impl From<ProfileUpdate> for ProfileUpdateInternal {\n fn from(profile_update: ProfileUpdate) -> Self {\n let now = date_time::now();\n\n match profile_update {\n ProfileUpdate::Update(update) => {\n let ProfileGeneralUpdate {\n profile_name,\n return_url,\n enable_payment_response_hash,\n payment_response_hash_key,\n redirect_to_merchant_with_http_post,\n webhook_details,\n metadata,\n applepay_verified_domains,\n payment_link_config,\n session_expiry,\n authentication_connector_details,\n payout_link_config,\n extended_card_info_config,\n use_billing_as_payment_method_billing,\n collect_shipping_details_from_wallet_connector,\n collect_billing_details_from_wallet_connector,\n is_connector_agnostic_mit_enabled,\n outgoing_webhook_custom_http_headers,\n always_collect_billing_details_from_wallet_connector,\n always_collect_shipping_details_from_wallet_connector,\n order_fulfillment_time,\n order_fulfillment_time_origin,\n is_network_tokenization_enabled,\n is_click_to_pay_enabled,\n } = *update;\n Self {\n profile_name,\n modified_at: now,\n return_url,\n enable_payment_response_hash,\n payment_response_hash_key,\n redirect_to_merchant_with_http_post,\n webhook_details,\n metadata,\n is_recon_enabled: None,\n applepay_verified_domains,\n payment_link_config,\n session_expiry,\n authentication_connector_details,\n payout_link_config,\n is_extended_card_info_enabled: None,\n extended_card_info_config,\n is_connector_agnostic_mit_enabled,\n use_billing_as_payment_method_billing,\n collect_shipping_details_from_wallet_connector,\n collect_billing_details_from_wallet_connector,\n outgoing_webhook_custom_http_headers: outgoing_webhook_custom_http_headers\n .map(Encryption::from),\n routing_algorithm_id: None,\n always_collect_billing_details_from_wallet_connector,\n always_collect_shipping_details_from_wallet_connector,\n order_fulfillment_time,\n order_fulfillment_time_origin,\n frm_routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled,\n }\n }\n ProfileUpdate::RoutingAlgorithmUpdate {\n routing_algorithm_id,\n payout_routing_algorithm_id,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n routing_algorithm_id,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n payout_routing_algorithm_id,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ExtendedCardInfoUpdate {\n is_extended_card_info_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: Some(is_extended_card_info_enabled),\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ConnectorAgnosticMitUpdate {\n is_connector_agnostic_mit_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: Some(is_connector_agnostic_mit_enabled),\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::DefaultRoutingFallbackUpdate {\n default_fallback_routing,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::NetworkTokenizationUpdate {\n is_network_tokenization_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: Some(is_network_tokenization_enabled),\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::CollectCvvDuringPaymentUpdate {\n should_collect_cvv_during_payment,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: Some(should_collect_cvv_during_payment),\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ClickToPayUpdate {\n is_click_to_pay_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: Some(is_click_to_pay_enabled),\n },\n }\n }\n}",
|
| 16 |
+
"after_code": "impl From<ProfileUpdate> for ProfileUpdateInternal {\n fn from(profile_update: ProfileUpdate) -> Self {\n let now = date_time::now();\n\n match profile_update {\n ProfileUpdate::Update(update) => {\n let ProfileGeneralUpdate {\n profile_name,\n return_url,\n enable_payment_response_hash,\n payment_response_hash_key,\n redirect_to_merchant_with_http_post,\n webhook_details,\n metadata,\n applepay_verified_domains,\n payment_link_config,\n session_expiry,\n authentication_connector_details,\n payout_link_config,\n extended_card_info_config,\n use_billing_as_payment_method_billing,\n collect_shipping_details_from_wallet_connector,\n collect_billing_details_from_wallet_connector,\n is_connector_agnostic_mit_enabled,\n outgoing_webhook_custom_http_headers,\n always_collect_billing_details_from_wallet_connector,\n always_collect_shipping_details_from_wallet_connector,\n order_fulfillment_time,\n order_fulfillment_time_origin,\n is_network_tokenization_enabled,\n is_click_to_pay_enabled,\n } = *update;\n Self {\n profile_name,\n modified_at: now,\n return_url,\n enable_payment_response_hash,\n payment_response_hash_key,\n redirect_to_merchant_with_http_post,\n webhook_details,\n metadata,\n is_recon_enabled: None,\n applepay_verified_domains,\n payment_link_config,\n session_expiry,\n authentication_connector_details,\n payout_link_config,\n is_extended_card_info_enabled: None,\n extended_card_info_config,\n is_connector_agnostic_mit_enabled,\n use_billing_as_payment_method_billing,\n collect_shipping_details_from_wallet_connector,\n collect_billing_details_from_wallet_connector,\n outgoing_webhook_custom_http_headers: outgoing_webhook_custom_http_headers\n .map(Encryption::from),\n routing_algorithm_id: None,\n always_collect_billing_details_from_wallet_connector,\n always_collect_shipping_details_from_wallet_connector,\n order_fulfillment_time,\n order_fulfillment_time_origin,\n frm_routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled,\n }\n }\n ProfileUpdate::RoutingAlgorithmUpdate {\n routing_algorithm_id,\n payout_routing_algorithm_id,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n routing_algorithm_id,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n payout_routing_algorithm_id,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ExtendedCardInfoUpdate {\n is_extended_card_info_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: Some(is_extended_card_info_enabled),\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ConnectorAgnosticMitUpdate {\n is_connector_agnostic_mit_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: Some(is_connector_agnostic_mit_enabled),\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::DefaultRoutingFallbackUpdate {\n default_fallback_routing,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::NetworkTokenizationUpdate {\n is_network_tokenization_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: Some(is_network_tokenization_enabled),\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::CollectCvvDuringPaymentUpdate {\n should_collect_cvv_during_payment,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: Some(should_collect_cvv_during_payment),\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n }\n }\n}",
|
| 17 |
+
"diff_span": {
|
| 18 |
+
"before": " is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ClickToPayUpdate {\n is_click_to_pay_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: Some(is_click_to_pay_enabled),\n },\n }\n }",
|
| 19 |
+
"after": ""
|
| 20 |
+
},
|
| 21 |
+
"commit_sha": "e520c54c70c3757b4a3402ff10ed0e0e059f56d2"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"id": "crates/hyperswitch_domain_models/src/business_profile.rs::ProfileUpdateInternal::function::from",
|
| 25 |
+
"file": "crates/hyperswitch_domain_models/src/business_profile.rs",
|
| 26 |
+
"kind": "function_item",
|
| 27 |
+
"status": "modified",
|
| 28 |
+
"code_changed": true,
|
| 29 |
+
"imports_changed": false,
|
| 30 |
+
"before_code": "fn from(profile_update: ProfileUpdate) -> Self {\n let now = date_time::now();\n\n match profile_update {\n ProfileUpdate::Update(update) => {\n let ProfileGeneralUpdate {\n profile_name,\n return_url,\n enable_payment_response_hash,\n payment_response_hash_key,\n redirect_to_merchant_with_http_post,\n webhook_details,\n metadata,\n applepay_verified_domains,\n payment_link_config,\n session_expiry,\n authentication_connector_details,\n payout_link_config,\n extended_card_info_config,\n use_billing_as_payment_method_billing,\n collect_shipping_details_from_wallet_connector,\n collect_billing_details_from_wallet_connector,\n is_connector_agnostic_mit_enabled,\n outgoing_webhook_custom_http_headers,\n always_collect_billing_details_from_wallet_connector,\n always_collect_shipping_details_from_wallet_connector,\n order_fulfillment_time,\n order_fulfillment_time_origin,\n is_network_tokenization_enabled,\n is_click_to_pay_enabled,\n } = *update;\n Self {\n profile_name,\n modified_at: now,\n return_url,\n enable_payment_response_hash,\n payment_response_hash_key,\n redirect_to_merchant_with_http_post,\n webhook_details,\n metadata,\n is_recon_enabled: None,\n applepay_verified_domains,\n payment_link_config,\n session_expiry,\n authentication_connector_details,\n payout_link_config,\n is_extended_card_info_enabled: None,\n extended_card_info_config,\n is_connector_agnostic_mit_enabled,\n use_billing_as_payment_method_billing,\n collect_shipping_details_from_wallet_connector,\n collect_billing_details_from_wallet_connector,\n outgoing_webhook_custom_http_headers: outgoing_webhook_custom_http_headers\n .map(Encryption::from),\n routing_algorithm_id: None,\n always_collect_billing_details_from_wallet_connector,\n always_collect_shipping_details_from_wallet_connector,\n order_fulfillment_time,\n order_fulfillment_time_origin,\n frm_routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled,\n }\n }\n ProfileUpdate::RoutingAlgorithmUpdate {\n routing_algorithm_id,\n payout_routing_algorithm_id,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n routing_algorithm_id,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n payout_routing_algorithm_id,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ExtendedCardInfoUpdate {\n is_extended_card_info_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: Some(is_extended_card_info_enabled),\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ConnectorAgnosticMitUpdate {\n is_connector_agnostic_mit_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: Some(is_connector_agnostic_mit_enabled),\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::DefaultRoutingFallbackUpdate {\n default_fallback_routing,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::NetworkTokenizationUpdate {\n is_network_tokenization_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: Some(is_network_tokenization_enabled),\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::CollectCvvDuringPaymentUpdate {\n should_collect_cvv_during_payment,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: Some(should_collect_cvv_during_payment),\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ClickToPayUpdate {\n is_click_to_pay_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: Some(is_click_to_pay_enabled),\n },\n }\n }",
|
| 31 |
+
"after_code": "fn from(profile_update: ProfileUpdate) -> Self {\n let now = date_time::now();\n\n match profile_update {\n ProfileUpdate::Update(update) => {\n let ProfileGeneralUpdate {\n profile_name,\n return_url,\n enable_payment_response_hash,\n payment_response_hash_key,\n redirect_to_merchant_with_http_post,\n webhook_details,\n metadata,\n applepay_verified_domains,\n payment_link_config,\n session_expiry,\n authentication_connector_details,\n payout_link_config,\n extended_card_info_config,\n use_billing_as_payment_method_billing,\n collect_shipping_details_from_wallet_connector,\n collect_billing_details_from_wallet_connector,\n is_connector_agnostic_mit_enabled,\n outgoing_webhook_custom_http_headers,\n always_collect_billing_details_from_wallet_connector,\n always_collect_shipping_details_from_wallet_connector,\n order_fulfillment_time,\n order_fulfillment_time_origin,\n is_network_tokenization_enabled,\n is_click_to_pay_enabled,\n } = *update;\n Self {\n profile_name,\n modified_at: now,\n return_url,\n enable_payment_response_hash,\n payment_response_hash_key,\n redirect_to_merchant_with_http_post,\n webhook_details,\n metadata,\n is_recon_enabled: None,\n applepay_verified_domains,\n payment_link_config,\n session_expiry,\n authentication_connector_details,\n payout_link_config,\n is_extended_card_info_enabled: None,\n extended_card_info_config,\n is_connector_agnostic_mit_enabled,\n use_billing_as_payment_method_billing,\n collect_shipping_details_from_wallet_connector,\n collect_billing_details_from_wallet_connector,\n outgoing_webhook_custom_http_headers: outgoing_webhook_custom_http_headers\n .map(Encryption::from),\n routing_algorithm_id: None,\n always_collect_billing_details_from_wallet_connector,\n always_collect_shipping_details_from_wallet_connector,\n order_fulfillment_time,\n order_fulfillment_time_origin,\n frm_routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled,\n }\n }\n ProfileUpdate::RoutingAlgorithmUpdate {\n routing_algorithm_id,\n payout_routing_algorithm_id,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n routing_algorithm_id,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n payout_routing_algorithm_id,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ExtendedCardInfoUpdate {\n is_extended_card_info_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: Some(is_extended_card_info_enabled),\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ConnectorAgnosticMitUpdate {\n is_connector_agnostic_mit_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: Some(is_connector_agnostic_mit_enabled),\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::DefaultRoutingFallbackUpdate {\n default_fallback_routing,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::NetworkTokenizationUpdate {\n is_network_tokenization_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: Some(is_network_tokenization_enabled),\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n ProfileUpdate::CollectCvvDuringPaymentUpdate {\n should_collect_cvv_during_payment,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: Some(should_collect_cvv_during_payment),\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: None,\n },\n }\n }",
|
| 32 |
+
"diff_span": {
|
| 33 |
+
"before": " is_click_to_pay_enabled: None,\n },\n ProfileUpdate::ClickToPayUpdate {\n is_click_to_pay_enabled,\n } => Self {\n profile_name: None,\n modified_at: now,\n return_url: None,\n enable_payment_response_hash: None,\n payment_response_hash_key: None,\n redirect_to_merchant_with_http_post: None,\n webhook_details: None,\n metadata: None,\n is_recon_enabled: None,\n applepay_verified_domains: None,\n payment_link_config: None,\n session_expiry: None,\n authentication_connector_details: None,\n payout_link_config: None,\n is_extended_card_info_enabled: None,\n extended_card_info_config: None,\n is_connector_agnostic_mit_enabled: None,\n use_billing_as_payment_method_billing: None,\n collect_shipping_details_from_wallet_connector: None,\n collect_billing_details_from_wallet_connector: None,\n outgoing_webhook_custom_http_headers: None,\n always_collect_billing_details_from_wallet_connector: None,\n always_collect_shipping_details_from_wallet_connector: None,\n routing_algorithm_id: None,\n payout_routing_algorithm_id: None,\n order_fulfillment_time: None,\n order_fulfillment_time_origin: None,\n frm_routing_algorithm_id: None,\n default_fallback_routing: None,\n should_collect_cvv_during_payment: None,\n tax_connector_id: None,\n is_tax_connector_enabled: None,\n is_network_tokenization_enabled: None,\n is_auto_retries_enabled: None,\n max_auto_retries_enabled: None,\n is_click_to_pay_enabled: Some(is_click_to_pay_enabled),\n },\n }\n }",
|
| 34 |
+
"after": ""
|
| 35 |
+
},
|
| 36 |
+
"commit_sha": "e520c54c70c3757b4a3402ff10ed0e0e059f56d2"
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"id": "crates/hyperswitch_domain_models/src/business_profile.rs::enum::ProfileUpdate",
|
| 40 |
+
"file": "crates/hyperswitch_domain_models/src/business_profile.rs",
|
| 41 |
+
"kind": "enum_item",
|
| 42 |
+
"status": "modified",
|
| 43 |
+
"code_changed": true,
|
| 44 |
+
"imports_changed": false,
|
| 45 |
+
"before_code": "pub enum ProfileUpdate {\n Update(Box<ProfileGeneralUpdate>),\n RoutingAlgorithmUpdate {\n routing_algorithm_id: Option<common_utils::id_type::RoutingId>,\n payout_routing_algorithm_id: Option<common_utils::id_type::RoutingId>,\n },\n DefaultRoutingFallbackUpdate {\n default_fallback_routing: Option<pii::SecretSerdeValue>,\n },\n ExtendedCardInfoUpdate {\n is_extended_card_info_enabled: bool,\n },\n ConnectorAgnosticMitUpdate {\n is_connector_agnostic_mit_enabled: bool,\n },\n NetworkTokenizationUpdate {\n is_network_tokenization_enabled: bool,\n },\n CollectCvvDuringPaymentUpdate {\n should_collect_cvv_during_payment: bool,\n },\n ClickToPayUpdate {\n is_click_to_pay_enabled: bool,\n },\n}",
|
| 46 |
+
"after_code": "pub enum ProfileUpdate {\n Update(Box<ProfileGeneralUpdate>),\n RoutingAlgorithmUpdate {\n routing_algorithm_id: Option<common_utils::id_type::RoutingId>,\n payout_routing_algorithm_id: Option<common_utils::id_type::RoutingId>,\n },\n DefaultRoutingFallbackUpdate {\n default_fallback_routing: Option<pii::SecretSerdeValue>,\n },\n ExtendedCardInfoUpdate {\n is_extended_card_info_enabled: bool,\n },\n ConnectorAgnosticMitUpdate {\n is_connector_agnostic_mit_enabled: bool,\n },\n NetworkTokenizationUpdate {\n is_network_tokenization_enabled: bool,\n },\n CollectCvvDuringPaymentUpdate {\n should_collect_cvv_during_payment: bool,\n },\n}",
|
| 47 |
+
"diff_span": {
|
| 48 |
+
"before": " should_collect_cvv_during_payment: bool,\n },\n ClickToPayUpdate {\n is_click_to_pay_enabled: bool,\n },\n}",
|
| 49 |
+
"after": ""
|
| 50 |
+
},
|
| 51 |
+
"commit_sha": "e520c54c70c3757b4a3402ff10ed0e0e059f56d2"
|
| 52 |
+
}
|
| 53 |
+
]
|
| 54 |
+
}
|
diffs/pr_6736/f165658/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "f1656587317a104debbb6565794c252b3961fea0",
|
| 3 |
+
"pr_number": 6736,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_6792/c75dcfe/diff.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "c75dcfeba0a04a26956a85055aea11b10c3bc922",
|
| 3 |
+
"pr_number": 6792,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/router/src/routes/admin.rs"
|
| 6 |
+
],
|
| 7 |
+
"diffs": []
|
| 8 |
+
}
|
diffs/pr_6792/f7a56ab/diff.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "f7a56ab5fca42d8fb45b5237ea517db6fa7311ef",
|
| 3 |
+
"pr_number": 6792,
|
| 4 |
+
"rust_files": [
|
| 5 |
+
"crates/router/src/routes/admin.rs",
|
| 6 |
+
"crates/router/src/services/authorization/permission_groups.rs"
|
| 7 |
+
],
|
| 8 |
+
"diffs": [
|
| 9 |
+
{
|
| 10 |
+
"id": "crates/router/src/services/authorization/permission_groups.rs::PermissionGroup::function::accessible_groups",
|
| 11 |
+
"file": "crates/router/src/services/authorization/permission_groups.rs",
|
| 12 |
+
"kind": "function_item",
|
| 13 |
+
"status": "modified",
|
| 14 |
+
"code_changed": true,
|
| 15 |
+
"imports_changed": false,
|
| 16 |
+
"before_code": "fn accessible_groups(&self) -> Vec<Self> {\n match self {\n Self::OperationsView => vec![Self::OperationsView],\n Self::OperationsManage => vec![Self::OperationsView, Self::OperationsManage],\n\n Self::ConnectorsView => vec![Self::ConnectorsView],\n Self::ConnectorsManage => vec![Self::ConnectorsView, Self::ConnectorsManage],\n\n Self::WorkflowsView => vec![Self::WorkflowsView, Self::ConnectorsView],\n Self::WorkflowsManage => vec![\n Self::WorkflowsView,\n Self::WorkflowsManage,\n Self::ConnectorsView,\n ],\n\n Self::AnalyticsView => vec![Self::AnalyticsView, Self::OperationsView],\n\n Self::UsersView => vec![Self::UsersView],\n Self::UsersManage => {\n vec![Self::UsersView, Self::UsersManage]\n }\n\n Self::ReconOps => vec![Self::ReconOps],\n\n Self::MerchantDetailsView => vec![Self::MerchantDetailsView],\n Self::MerchantDetailsManage => {\n vec![Self::MerchantDetailsView, Self::MerchantDetailsManage]\n }\n\n Self::OrganizationManage => vec![Self::OrganizationManage],\n\n Self::AccountView => vec![Self::AccountView],\n Self::AccountManage => vec![Self::AccountView, Self::AccountManage],\n }\n }",
|
| 17 |
+
"after_code": "fn accessible_groups(&self) -> Vec<Self> {\n match self {\n Self::OperationsView => vec![Self::OperationsView, Self::ConnectorsView],\n Self::OperationsManage => vec![\n Self::OperationsView,\n Self::OperationsManage,\n Self::ConnectorsView,\n ],\n\n Self::ConnectorsView => vec![Self::ConnectorsView],\n Self::ConnectorsManage => vec![Self::ConnectorsView, Self::ConnectorsManage],\n\n Self::WorkflowsView => vec![Self::WorkflowsView, Self::ConnectorsView],\n Self::WorkflowsManage => vec![\n Self::WorkflowsView,\n Self::WorkflowsManage,\n Self::ConnectorsView,\n ],\n\n Self::AnalyticsView => vec![Self::AnalyticsView, Self::OperationsView],\n\n Self::UsersView => vec![Self::UsersView],\n Self::UsersManage => {\n vec![Self::UsersView, Self::UsersManage]\n }\n\n Self::ReconOps => vec![Self::ReconOps],\n\n Self::MerchantDetailsView => vec![Self::MerchantDetailsView],\n Self::MerchantDetailsManage => {\n vec![Self::MerchantDetailsView, Self::MerchantDetailsManage]\n }\n\n Self::OrganizationManage => vec![Self::OrganizationManage],\n\n Self::AccountView => vec![Self::AccountView],\n Self::AccountManage => vec![Self::AccountView, Self::AccountManage],\n }\n }",
|
| 18 |
+
"diff_span": {
|
| 19 |
+
"before": "fn accessible_groups(&self) -> Vec<Self> {\n match self {\n Self::OperationsView => vec![Self::OperationsView],\n Self::OperationsManage => vec![Self::OperationsView, Self::OperationsManage],\n\n Self::ConnectorsView => vec![Self::ConnectorsView],",
|
| 20 |
+
"after": "fn accessible_groups(&self) -> Vec<Self> {\n match self {\n Self::OperationsView => vec![Self::OperationsView, Self::ConnectorsView],\n Self::OperationsManage => vec![\n Self::OperationsView,\n Self::OperationsManage,\n Self::ConnectorsView,\n ],\n\n Self::ConnectorsView => vec![Self::ConnectorsView],"
|
| 21 |
+
},
|
| 22 |
+
"commit_sha": "f7a56ab5fca42d8fb45b5237ea517db6fa7311ef"
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"id": "crates/router/src/services/authorization/permission_groups.rs::impl::PermissionGroup",
|
| 26 |
+
"file": "crates/router/src/services/authorization/permission_groups.rs",
|
| 27 |
+
"kind": "impl_item",
|
| 28 |
+
"status": "modified",
|
| 29 |
+
"code_changed": true,
|
| 30 |
+
"imports_changed": false,
|
| 31 |
+
"before_code": "impl PermissionGroupExt for PermissionGroup {\n fn scope(&self) -> PermissionScope {\n match self {\n Self::OperationsView\n | Self::ConnectorsView\n | Self::WorkflowsView\n | Self::AnalyticsView\n | Self::UsersView\n | Self::MerchantDetailsView\n | Self::AccountView => PermissionScope::Read,\n\n Self::OperationsManage\n | Self::ConnectorsManage\n | Self::WorkflowsManage\n | Self::UsersManage\n | Self::MerchantDetailsManage\n | Self::OrganizationManage\n | Self::ReconOps\n | Self::AccountManage => PermissionScope::Write,\n }\n }\n\n fn parent(&self) -> ParentGroup {\n match self {\n Self::OperationsView | Self::OperationsManage => ParentGroup::Operations,\n Self::ConnectorsView | Self::ConnectorsManage => ParentGroup::Connectors,\n Self::WorkflowsView | Self::WorkflowsManage => ParentGroup::Workflows,\n Self::AnalyticsView => ParentGroup::Analytics,\n Self::UsersView | Self::UsersManage => ParentGroup::Users,\n Self::ReconOps => ParentGroup::Recon,\n Self::MerchantDetailsView\n | Self::OrganizationManage\n | Self::MerchantDetailsManage\n | Self::AccountView\n | Self::AccountManage => ParentGroup::Account,\n }\n }\n\n fn resources(&self) -> Vec<Resource> {\n self.parent().resources()\n }\n\n fn accessible_groups(&self) -> Vec<Self> {\n match self {\n Self::OperationsView => vec![Self::OperationsView],\n Self::OperationsManage => vec![Self::OperationsView, Self::OperationsManage],\n\n Self::ConnectorsView => vec![Self::ConnectorsView],\n Self::ConnectorsManage => vec![Self::ConnectorsView, Self::ConnectorsManage],\n\n Self::WorkflowsView => vec![Self::WorkflowsView, Self::ConnectorsView],\n Self::WorkflowsManage => vec![\n Self::WorkflowsView,\n Self::WorkflowsManage,\n Self::ConnectorsView,\n ],\n\n Self::AnalyticsView => vec![Self::AnalyticsView, Self::OperationsView],\n\n Self::UsersView => vec![Self::UsersView],\n Self::UsersManage => {\n vec![Self::UsersView, Self::UsersManage]\n }\n\n Self::ReconOps => vec![Self::ReconOps],\n\n Self::MerchantDetailsView => vec![Self::MerchantDetailsView],\n Self::MerchantDetailsManage => {\n vec![Self::MerchantDetailsView, Self::MerchantDetailsManage]\n }\n\n Self::OrganizationManage => vec![Self::OrganizationManage],\n\n Self::AccountView => vec![Self::AccountView],\n Self::AccountManage => vec![Self::AccountView, Self::AccountManage],\n }\n }\n}",
|
| 32 |
+
"after_code": "impl PermissionGroupExt for PermissionGroup {\n fn scope(&self) -> PermissionScope {\n match self {\n Self::OperationsView\n | Self::ConnectorsView\n | Self::WorkflowsView\n | Self::AnalyticsView\n | Self::UsersView\n | Self::MerchantDetailsView\n | Self::AccountView => PermissionScope::Read,\n\n Self::OperationsManage\n | Self::ConnectorsManage\n | Self::WorkflowsManage\n | Self::UsersManage\n | Self::MerchantDetailsManage\n | Self::OrganizationManage\n | Self::ReconOps\n | Self::AccountManage => PermissionScope::Write,\n }\n }\n\n fn parent(&self) -> ParentGroup {\n match self {\n Self::OperationsView | Self::OperationsManage => ParentGroup::Operations,\n Self::ConnectorsView | Self::ConnectorsManage => ParentGroup::Connectors,\n Self::WorkflowsView | Self::WorkflowsManage => ParentGroup::Workflows,\n Self::AnalyticsView => ParentGroup::Analytics,\n Self::UsersView | Self::UsersManage => ParentGroup::Users,\n Self::ReconOps => ParentGroup::Recon,\n Self::MerchantDetailsView\n | Self::OrganizationManage\n | Self::MerchantDetailsManage\n | Self::AccountView\n | Self::AccountManage => ParentGroup::Account,\n }\n }\n\n fn resources(&self) -> Vec<Resource> {\n self.parent().resources()\n }\n\n fn accessible_groups(&self) -> Vec<Self> {\n match self {\n Self::OperationsView => vec![Self::OperationsView, Self::ConnectorsView],\n Self::OperationsManage => vec![\n Self::OperationsView,\n Self::OperationsManage,\n Self::ConnectorsView,\n ],\n\n Self::ConnectorsView => vec![Self::ConnectorsView],\n Self::ConnectorsManage => vec![Self::ConnectorsView, Self::ConnectorsManage],\n\n Self::WorkflowsView => vec![Self::WorkflowsView, Self::ConnectorsView],\n Self::WorkflowsManage => vec![\n Self::WorkflowsView,\n Self::WorkflowsManage,\n Self::ConnectorsView,\n ],\n\n Self::AnalyticsView => vec![Self::AnalyticsView, Self::OperationsView],\n\n Self::UsersView => vec![Self::UsersView],\n Self::UsersManage => {\n vec![Self::UsersView, Self::UsersManage]\n }\n\n Self::ReconOps => vec![Self::ReconOps],\n\n Self::MerchantDetailsView => vec![Self::MerchantDetailsView],\n Self::MerchantDetailsManage => {\n vec![Self::MerchantDetailsView, Self::MerchantDetailsManage]\n }\n\n Self::OrganizationManage => vec![Self::OrganizationManage],\n\n Self::AccountView => vec![Self::AccountView],\n Self::AccountManage => vec![Self::AccountView, Self::AccountManage],\n }\n }\n}",
|
| 33 |
+
"diff_span": {
|
| 34 |
+
"before": " fn accessible_groups(&self) -> Vec<Self> {\n match self {\n Self::OperationsView => vec![Self::OperationsView],\n Self::OperationsManage => vec![Self::OperationsView, Self::OperationsManage],\n\n Self::ConnectorsView => vec![Self::ConnectorsView],",
|
| 35 |
+
"after": " fn accessible_groups(&self) -> Vec<Self> {\n match self {\n Self::OperationsView => vec![Self::OperationsView, Self::ConnectorsView],\n Self::OperationsManage => vec![\n Self::OperationsView,\n Self::OperationsManage,\n Self::ConnectorsView,\n ],\n\n Self::ConnectorsView => vec![Self::ConnectorsView],"
|
| 36 |
+
},
|
| 37 |
+
"commit_sha": "f7a56ab5fca42d8fb45b5237ea517db6fa7311ef"
|
| 38 |
+
}
|
| 39 |
+
]
|
| 40 |
+
}
|
diffs/pr_6837/2400482/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "24004821e3ad629d652e7a51628078882b0857de",
|
| 3 |
+
"pr_number": 6837,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|
diffs/pr_6837/a015b15/diff.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"commit_sha": "a015b15e8360acf08199bcd8e113244350ec728f",
|
| 3 |
+
"pr_number": 6837,
|
| 4 |
+
"rust_files": [],
|
| 5 |
+
"diffs": []
|
| 6 |
+
}
|