iamport-react-native
Version:
리액트 네이티브용 아임포트 결제/본인인증 연동 라이브러리
24 lines (21 loc) • 714 B
JavaScript
import React from 'react';
import IMP from 'iamport-react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { getUserCode } from '../utils';
import Loading from '../Loading';
export default function Payment({ route, navigation }) {
const params = route.params.params;
const tierCode = route.params.tierCode;
const userCode = getUserCode(params.pg, tierCode);
return (
<SafeAreaView style={{ flex: 1, justifyContent: 'center' }}>
<IMP.Payment
userCode={userCode}
tierCode={tierCode}
loading={<Loading />}
data={params}
callback={(response) => navigation.replace('PaymentResult', response)}
/>
</SafeAreaView>
);
}