리액트네이티브 웹뷰로 브랜드페이 연동하기

요 v2련 UI 및 API.
v2는 RN, .

const TossPaymentMethod = () => {
const webViewRef = useRef(null);
const [customerKey, setCustomerKey] = useState('f9KC7GDaHr-VKUE9XJT_W');

const htmlContent = <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="https://js.tosspayments.com/v2/standard"></script> </head> <body> <h2>결제 수단 변경</h2> <script> const clientKey = "${Config.TOSS_PAYMENT_CLIENTKEY}"; const customerKey = "${customerKey}"; const tossPayments = TossPayments(clientKey); const brandpay = tossPayments.brandpay({customerKey, redirectUrl: "/"}); brandpay.openSettings(); </script> </body> </html> ;

return <WebView ref={webViewRef} source={{html: htmlContent}} />;
};

.
는 API ?
image.png
Was this page helpful?