Skip to content

Commit

Permalink
Merge pull request #62 from degica/task/MOB-52
Browse files Browse the repository at this point in the history
Task/mob 52
  • Loading branch information
tharindu-rhino authored Aug 23, 2024
2 parents d3e030d + e310b73 commit 8d8447e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 10 additions & 2 deletions payment_sdk/src/components/CardInputGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,12 @@ const CardInputGroup = ({ inputErrors, resetError }: Props) => {
if (text?.length < 11)
dispatch({ type: Actions.SET_CARD_CVV, payload: text });
}}
inputStyle={styles.cvvInputStyle}
inputStyle={[
styles.cvvInputStyle,
inputErrors.cvv &&
!inputErrors.expiry &&
styles.cvvInputErrorStyle,
]}
error={inputErrors.cvv}
/>
<View style={styles.cardContainer}>
Expand Down Expand Up @@ -286,7 +291,10 @@ const getStyles = (theme: ThemeSchemeType) => {
borderTopLeftRadius: 0,
borderTopRightRadius: 0,
borderBottomLeftRadius: 0,
marginLeft: -responsiveScale(1),
borderLeftWidth: 0,
},
cvvInputErrorStyle: {
borderLeftWidth: 1,
},
titleScanRow: {
flexDirection: "row",
Expand Down
3 changes: 2 additions & 1 deletion payment_sdk/src/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ViewStyle,
KeyboardTypeOptions,
TextInputProps,
StyleProp,
} from "react-native";

import { useTranslation } from "react-i18next";
Expand All @@ -22,7 +23,7 @@ interface InputProps extends TextInputProps {
onChangeText: (text: string) => void;
label?: string;
placeholder?: string;
inputStyle?: ViewStyle;
inputStyle?: StyleProp<ViewStyle>;
testID?: string;
error?: boolean;
errorText?: string;
Expand Down
1 change: 1 addition & 0 deletions payment_sdk/src/util/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const API_HEADER = (publishableKey: string) => ({
accept: "application/json",
"content-type": "application/json",
"KOMOJU-VIA": "mobile_react",
"X-KOMOJU-API-VERSION": "2024-07-15",
Authorization: `Basic ${btoa(publishableKey + ":")}`,
});

Expand Down

0 comments on commit 8d8447e

Please sign in to comment.