-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
6,692 additions
and
6,879 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import {StripeProvider} from '@stripe/stripe-react-native'; | ||
import PaymentDetail from './payment-detail'; | ||
|
||
const Payment = () => { | ||
return ( | ||
<StripeProvider | ||
publishableKey={''} | ||
merchantIdentifier="merchant.identifier"> | ||
<PaymentDetail /> | ||
</StripeProvider> | ||
); | ||
}; | ||
|
||
export default Payment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import React from 'react'; | ||
import {CardField, useStripe} from '@stripe/stripe-react-native'; | ||
import {SafeAreaView, Text, TouchableOpacity, View} from 'react-native'; | ||
import {setOpenModal} from '../../scheduleOverview/scheduleOverviewSlice'; | ||
import {useAppDispatch, useAppSelector} from '../../../app/store'; | ||
import OrderSuccess from '../../../components/orderSuccess'; | ||
|
||
const PaymentDetail = () => { | ||
const {confirmPayment} = useStripe(); | ||
const dispatch = useAppDispatch(); | ||
const openModal = useAppSelector( | ||
state => state.scheduleOverviewSlice.openModal, | ||
); | ||
|
||
return ( | ||
<View | ||
style={{ | ||
flex: 1, | ||
justifyContent: 'flex-start', | ||
alignItems: 'center', | ||
paddingHorizontal: 16, | ||
marginTop: 70, | ||
}}> | ||
<Text style={{color: '#FF5F24', fontSize: 19}}>MOBILE BANKING</Text> | ||
<CardField | ||
postalCodeEnabled={true} | ||
placeholders={{ | ||
number: '4242 4242 4242 4242', | ||
}} | ||
cardStyle={{ | ||
backgroundColor: '#FFFFFF', | ||
textColor: '#000000', | ||
}} | ||
style={{ | ||
width: '100%', | ||
height: 50, | ||
marginVertical: 30, | ||
}} | ||
onCardChange={cardDetails => { | ||
console.log('cardDetails', cardDetails); | ||
}} | ||
onFocus={focusedField => { | ||
console.log('focusField', focusedField); | ||
}} | ||
/> | ||
<TouchableOpacity | ||
onPress={() => dispatch(setOpenModal(true))} | ||
style={{ | ||
width: '100%', | ||
height: 30, | ||
backgroundColor: '#FF5F24', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
borderRadius: 6, | ||
}}> | ||
<Text style={{color: 'white'}}>Thanh Toán </Text> | ||
</TouchableOpacity> | ||
{openModal && <OrderSuccess />} | ||
</View> | ||
); | ||
}; | ||
|
||
export default PaymentDetail; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.