Skip to content

Commit

Permalink
fix: connector optional key fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiragKV-Juspay committed Jan 24, 2025
1 parent 3b338fc commit 7fb06df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utility/logics/PaymentUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ let generateCardConfirmBody = (
return_url: ?Utils.getReturnUrl(nativeProp.hyperParams.appId),
payment_method: prop.payment_method,
payment_method_type: ?Some(prop.payment_method_type),
connector: switch prop.card_networks {
connector: ?switch prop.card_networks {
| Some(cardNetwork) =>
cardNetwork
->Array.get(0)
->Option.mapOr([], card_network => card_network.eligible_connectors)
| None => []
->Option.mapOr(None, card_network => card_network.eligible_connectors->Some)
| None => None
},
?payment_method_data,
?payment_token,
Expand Down

0 comments on commit 7fb06df

Please sign in to comment.