Skip to content

Commit a415817

Browse files
committed
resolve comments
1 parent 54a73c3 commit a415817

File tree

6 files changed

+77
-10
lines changed

6 files changed

+77
-10
lines changed

crates/connector_configs/toml/development.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,12 +2260,35 @@ type="Text"
22602260
payment_method_type = "CartesBancaires"
22612261
[[novalnet.debit]]
22622262
payment_method_type = "UnionPay"
2263+
[[novalnet.wallet]]
2264+
payment_method_type = "google_pay"
2265+
[[novalnet.wallet]]
2266+
payment_method_type = "paypal"
22632267
[novalnet.connector_auth.SignatureKey]
22642268
api_key="Product Activation Key"
22652269
key1="Payment Access Key"
22662270
api_secret="Tariff ID"
22672271
[novalnet.connector_webhook_details]
22682272
merchant_secret="Source verification key"
2273+
placeholder="Enter Payment Access Key"
2274+
[[novalnet.metadata.google_pay]]
2275+
name="merchant_name"
2276+
label="Google Pay Merchant Name"
2277+
placeholder="Enter Google Pay Merchant Name"
2278+
required=true
2279+
type="Text"
2280+
[[novalnet.metadata.google_pay]]
2281+
name="merchant_id"
2282+
label="Google Pay Merchant Id"
2283+
placeholder="Enter Google Pay Merchant Id"
2284+
required=true
2285+
type="Text"
2286+
[[novalnet.metadata.google_pay]]
2287+
name="gateway_merchant_id"
2288+
label="Google Pay Merchant Key"
2289+
placeholder="Enter Google Pay Merchant Key"
2290+
required=true
2291+
type="Text"
22692292

22702293
[nuvei]
22712294
[[nuvei.credit]]

crates/connector_configs/toml/production.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,12 +1782,35 @@ merchant_secret="Source verification key"
17821782
payment_method_type = "CartesBancaires"
17831783
[[novalnet.debit]]
17841784
payment_method_type = "UnionPay"
1785+
[[novalnet.wallet]]
1786+
payment_method_type = "google_pay"
1787+
[[novalnet.wallet]]
1788+
payment_method_type = "paypal"
17851789
[novalnet.connector_auth.SignatureKey]
17861790
api_key="Product Activation Key"
17871791
key1="Payment Access Key"
17881792
api_secret="Tariff ID"
17891793
[novalnet.connector_webhook_details]
17901794
merchant_secret="Source verification key"
1795+
placeholder="Enter Payment Access Key"
1796+
[[novalnet.metadata.google_pay]]
1797+
name="merchant_name"
1798+
label="Google Pay Merchant Name"
1799+
placeholder="Enter Google Pay Merchant Name"
1800+
required=true
1801+
type="Text"
1802+
[[novalnet.metadata.google_pay]]
1803+
name="merchant_id"
1804+
label="Google Pay Merchant Id"
1805+
placeholder="Enter Google Pay Merchant Id"
1806+
required=true
1807+
type="Text"
1808+
[[novalnet.metadata.google_pay]]
1809+
name="gateway_merchant_id"
1810+
label="Google Pay Merchant Key"
1811+
placeholder="Enter Google Pay Merchant Key"
1812+
required=true
1813+
type="Text"
17911814

17921815
[nuvei]
17931816
[[nuvei.credit]]

crates/connector_configs/toml/sandbox.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,12 +2256,35 @@ type="Text"
22562256
payment_method_type = "CartesBancaires"
22572257
[[novalnet.debit]]
22582258
payment_method_type = "UnionPay"
2259+
[[novalnet.wallet]]
2260+
payment_method_type = "google_pay"
2261+
[[novalnet.wallet]]
2262+
payment_method_type = "paypal"
22592263
[novalnet.connector_auth.SignatureKey]
22602264
api_key="Product Activation Key"
22612265
key1="Payment Access Key"
22622266
api_secret="Tariff ID"
22632267
[novalnet.connector_webhook_details]
22642268
merchant_secret="Source verification key"
2269+
placeholder="Enter Payment Access Key"
2270+
[[novalnet.metadata.google_pay]]
2271+
name="merchant_name"
2272+
label="Google Pay Merchant Name"
2273+
placeholder="Enter Google Pay Merchant Name"
2274+
required=true
2275+
type="Text"
2276+
[[novalnet.metadata.google_pay]]
2277+
name="merchant_id"
2278+
label="Google Pay Merchant Id"
2279+
placeholder="Enter Google Pay Merchant Id"
2280+
required=true
2281+
type="Text"
2282+
[[novalnet.metadata.google_pay]]
2283+
name="gateway_merchant_id"
2284+
label="Google Pay Merchant Key"
2285+
placeholder="Enter Google Pay Merchant Key"
2286+
required=true
2287+
type="Text"
22652288

22662289
[nuvei]
22672290
[[nuvei.credit]]

crates/hyperswitch_connectors/src/connectors/novalnet.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -818,15 +818,8 @@ impl webhooks::IncomingWebhook for Novalnet {
818818
};
819819

820820
if novalnet::is_refund_event(&notif.event.event_type) {
821-
let parent_tid =
822-
notif
823-
.event
824-
.parent_tid
825-
.ok_or(errors::ConnectorError::MissingRequiredField {
826-
field_name: "parent_tid",
827-
})?;
828821
Ok(api_models::webhooks::ObjectReferenceId::RefundId(
829-
api_models::webhooks::RefundIdType::ConnectorRefundId(parent_tid.to_string()),
822+
api_models::webhooks::RefundIdType::ConnectorRefundId(notif.event.tid.to_string()),
830823
))
831824
} else {
832825
match transaction_order_no {

crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ impl TryFrom<&NovalnetRouterData<&PaymentsAuthorizeRouterData>> for NovalnetPaym
352352
})
353353
}
354354
WalletDataPaymentMethod::PaypalSdk(_)
355+
| WalletDataPaymentMethod::Paze(_)
355356
| WalletDataPaymentMethod::SamsungPay(_)
356357
| WalletDataPaymentMethod::TwintRedirect {}
357358
| WalletDataPaymentMethod::VippsRedirect {}
@@ -573,7 +574,7 @@ impl<F, T> TryFrom<ResponseRouterData<F, NovalnetPaymentsResponse, T, PaymentsRe
573574
let transaction_status = item
574575
.response
575576
.transaction
576-
.clone()
577+
.as_ref()
577578
.and_then(|transaction_data| transaction_data.status)
578579
.unwrap_or(if redirection_data.is_some() {
579580
NovalnetTransactionStatus::Progress
@@ -868,7 +869,7 @@ impl TryFrom<RefundsResponseRouterData<Execute, NovalnetRefundResponse>>
868869
.response
869870
.transaction
870871
.clone()
871-
.and_then(|data| data.tid.map(|tid| tid.expose().to_string()))
872+
.and_then(|data| data.refund.tid.map(|tid| tid.expose().to_string()))
872873
.ok_or(errors::ConnectorError::ResponseHandlingFailed)?;
873874

874875
let transaction_status = item

crates/hyperswitch_connectors/src/utils.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,6 +1781,7 @@ pub enum PaymentMethodDataType {
17811781
MobilePayRedirect,
17821782
PaypalRedirect,
17831783
PaypalSdk,
1784+
Paze,
17841785
SamsungPay,
17851786
TwintRedirect,
17861787
VippsRedirect,
@@ -1860,13 +1861,15 @@ pub enum PaymentMethodDataType {
18601861
VietQr,
18611862
OpenBanking,
18621863
NetworkToken,
1864+
NetworkTransactionIdAndCardDetails,
18631865
}
18641866

18651867
impl From<PaymentMethodData> for PaymentMethodDataType {
18661868
fn from(pm_data: PaymentMethodData) -> Self {
18671869
match pm_data {
18681870
PaymentMethodData::Card(_) => Self::Card,
18691871
PaymentMethodData::NetworkToken(_) => Self::NetworkToken,
1872+
PaymentMethodData::CardDetailsForNetworkTransactionId(_) => Self::NetworkTransactionIdAndCardDetails,
18701873
PaymentMethodData::CardRedirect(card_redirect_data) => {
18711874
match card_redirect_data {
18721875
hyperswitch_domain_models::payment_method_data::CardRedirectData::Knet {} => Self::Knet,
@@ -1898,6 +1901,7 @@ impl From<PaymentMethodData> for PaymentMethodDataType {
18981901
hyperswitch_domain_models::payment_method_data::WalletData::MobilePayRedirect(_) => Self::MobilePayRedirect,
18991902
hyperswitch_domain_models::payment_method_data::WalletData::PaypalRedirect(_) => Self::PaypalRedirect,
19001903
hyperswitch_domain_models::payment_method_data::WalletData::PaypalSdk(_) => Self::PaypalSdk,
1904+
hyperswitch_domain_models::payment_method_data::WalletData::Paze(_) => Self::Paze,
19011905
hyperswitch_domain_models::payment_method_data::WalletData::SamsungPay(_) => Self::SamsungPay,
19021906
hyperswitch_domain_models::payment_method_data::WalletData::TwintRedirect {} => Self::TwintRedirect,
19031907
hyperswitch_domain_models::payment_method_data::WalletData::VippsRedirect {} => Self::VippsRedirect,

0 commit comments

Comments
 (0)