mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
add wasm function for billing connectors
This commit is contained in:
@ -381,6 +381,14 @@ pub fn get_connector_config(key: &str) -> JsResult {
|
||||
Ok(serde_wasm_bindgen::to_value(&res)?)
|
||||
}
|
||||
|
||||
#[wasm_bindgen(js_name = getBillingConnectorConfig)]
|
||||
pub fn get_billing_connector_config(key: &str) -> JsResult {
|
||||
let key = api_model_enums::BillingConnectors::from_str(key)
|
||||
.map_err(|_| "Invalid key received".to_string())?;
|
||||
let res = connector::ConnectorConfig::get_billing_connector_config(key)?;
|
||||
Ok(serde_wasm_bindgen::to_value(&res)?)
|
||||
}
|
||||
|
||||
#[cfg(feature = "payouts")]
|
||||
#[wasm_bindgen(js_name = getPayoutConnectorConfig)]
|
||||
pub fn get_payout_connector_config(key: &str) -> JsResult {
|
||||
|
||||
Reference in New Issue
Block a user