Skip to content

Commit

Permalink
fix: added Wallets to Saved Payment Methods
Browse files Browse the repository at this point in the history
fix #197
  • Loading branch information
ArushKapoorJuspay committed Mar 11, 2024
1 parent d9481d5 commit 17dff8c
Show file tree
Hide file tree
Showing 11 changed files with 266 additions and 97 deletions.
39 changes: 39 additions & 0 deletions public/icons/orca.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 19 additions & 19 deletions src/CardUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -316,28 +316,28 @@ let calculateLuhn = value => {
let getCardBrandIcon = (cardType, paymentType) => {
open CardThemeType
switch cardType {
| VISA => <Icon size=28 name="visa-light" />
| MASTERCARD => <Icon size=28 name="mastercard" />
| AMEX => <Icon size=28 name="amex-light" />
| MAESTRO => <Icon size=28 name="maestro" />
| DINERSCLUB => <Icon size=28 name="diners" />
| DISCOVER => <Icon size=28 name="discover" />
| BAJAJ => <Icon size=28 name="card" />
| SODEXO => <Icon size=28 name="card" />
| RUPAY => <Icon size=28 name="rupay-card" />
| JCB => <Icon size=28 name="jcb-card" />
| CARTESBANCAIRES => <Icon size=28 name="card" />
| UNIONPAY => <Icon size=28 name="card" />
| INTERAC => <Icon size=28 name="interac" />
| VISA => <Icon size=Utils.brandIconSize name="visa-light" />
| MASTERCARD => <Icon size=Utils.brandIconSize name="mastercard" />
| AMEX => <Icon size=Utils.brandIconSize name="amex-light" />
| MAESTRO => <Icon size=Utils.brandIconSize name="maestro" />
| DINERSCLUB => <Icon size=Utils.brandIconSize name="diners" />
| DISCOVER => <Icon size=Utils.brandIconSize name="discover" />
| BAJAJ => <Icon size=Utils.brandIconSize name="card" />
| SODEXO => <Icon size=Utils.brandIconSize name="card" />
| RUPAY => <Icon size=Utils.brandIconSize name="rupay-card" />
| JCB => <Icon size=Utils.brandIconSize name="jcb-card" />
| CARTESBANCAIRES => <Icon size=Utils.brandIconSize name="card" />
| UNIONPAY => <Icon size=Utils.brandIconSize name="card" />
| INTERAC => <Icon size=Utils.brandIconSize name="interac" />
| NOTFOUND =>
switch paymentType {
| Payment => <Icon size=28 name="base-card" />
| Payment => <Icon size=Utils.brandIconSize name="base-card" />
| Card
| CardNumberElement
| CardExpiryElement
| CardCVCElement
| NONE =>
<Icon size=28 name="default-card" />
<Icon size=Utils.brandIconSize name="default-card" />
}
}
}
Expand Down Expand Up @@ -640,15 +640,15 @@ let getCvcDetailsFromCvcProps = cvcProps => {

let setRightIconForCvc = (~cardEmpty, ~cardInvalid, ~color, ~cardComplete) => {
if cardEmpty {
<Icon size=28 name="cvc-empty" />
<Icon size=Utils.brandIconSize name="cvc-empty" />
} else if cardInvalid {
<div style={ReactDOMStyle.make(~color, ())}>
<Icon size=28 name="cvc-invalid" />
<Icon size=Utils.brandIconSize name="cvc-invalid" />
</div>
} else if cardComplete {
<Icon size=28 name="cvc-complete" />
<Icon size=Utils.brandIconSize name="cvc-complete" />
} else {
<Icon size=28 name="cvc-empty" />
<Icon size=Utils.brandIconSize name="cvc-empty" />
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Components/DynamicFields.res
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ let make = (
->React.array}
<RenderIf condition={isRenderDynamicFieldsInsideBilling}>
<div
className="p-2"
className="p-2 w-full text-left"
style={ReactDOMStyle.make(
~border=`1px solid ${themeObj.borderColor}`,
~borderRadius=themeObj.borderRadius,
Expand Down
Loading

0 comments on commit 17dff8c

Please sign in to comment.