feat(connector): [Noon] Add Card Payments, Capture, Void and Refund (#1207)

This commit is contained in:
SamraatBansal
2023-05-23 16:35:39 +05:30
committed by GitHub
parent 9341191e39
commit 27610361b9
8 changed files with 430 additions and 116 deletions

View File

@ -25,7 +25,7 @@ pub(crate) struct ConnectorAuthentication {
pub mollie: Option<HeaderKey>,
pub multisafepay: Option<HeaderKey>,
pub nexinets: Option<HeaderKey>,
pub noon: Option<HeaderKey>,
pub noon: Option<SignatureKey>,
pub nmi: Option<HeaderKey>,
pub nuvei: Option<SignatureKey>,
pub opennode: Option<HeaderKey>,

View File

@ -1,7 +1,10 @@
use std::str::FromStr;
use masking::Secret;
use router::types::{self, api, storage::enums};
use router::types::{
self, api,
storage::{self, enums},
};
use crate::{
connector_auth,
@ -16,7 +19,7 @@ impl utils::Connector for NoonTest {
use router::connector::Noon;
types::api::ConnectorData {
connector: Box::new(&Noon),
connector_name: types::Connector::DummyConnector1,
connector_name: types::Connector::Noon,
get_token: types::api::GetToken::Connector,
}
}
@ -41,7 +44,10 @@ fn get_default_payment_info() -> Option<utils::PaymentInfo> {
}
fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
None
Some(types::PaymentsAuthorizeData {
currency: storage::enums::Currency::AED,
..utils::PaymentAuthorizeType::default().0
})
}
// Cards Positive Tests

View File

@ -112,4 +112,6 @@ api_secret = "secrect"
api_key = "API Key"
[noon]
api_key = "API Key"
api_key = "Application API KEY"
api_secret = "Application Identifier"
key1 = "Business Identifier"