박세일
TPToss payments 개발자 커뮤니티
•Created by 박세일 on 3/13/2025 in #❓┃연동개발-문의
결재관련
결재승인관련 추가 문의 드립니다.
https://docs.tosspayments.com/reference#결제-승인
로 답변을 주셨는데
responseStream 에 들어온다는건가요?
테스트로 해서인지
URL url = new URL("https://api.tosspayments.com/v1/payments/confirm");
HttpURLConnection connection = (HttpURLConnection) url.openConnection() ;
connection.setRequestProperty("Authorization", authorizations);
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestMethod("POST");
connection.setDoOutput(true);
OutputStream outputStream = connection.getOutputStream();
outputStream.write(obj.toString().getBytes("UTF-8"));
int code = connection.getResponseCode();
boolean isSuccess = code == 200;
logger.info("responseStream Test: ");
InputStream responseStream = isSuccess ? connection.getInputStream() : connection.getErrorStream();
logger.info("responseStream : "+responseStream);
responseStream : sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@4299b971이렇게만 들어와서요
responseStream 데이터를 파싱해서 쓰라는건가요?
realKey로 하면 데이터가 들어오는건가요?
아래 답변내용에 답변이 없어 추가로 문의 드립니다.
5 replies
TPToss payments 개발자 커뮤니티
•Created by 박세일 on 3/13/2025 in #❓┃연동개발-문의
결재승인관련 문의 드립니다.
최종 Confirm 관련 아래 코드로 가이드를 받았습니다.
URL url = new URL("https://api.tosspayments.com/v1/payments/confirm");
HttpURLConnection connection = (HttpURLConnection) url.openConnection() ; connection.setRequestProperty("Authorization", authorizations); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestMethod("POST"); connection.setDoOutput(true); OutputStream outputStream = connection.getOutputStream(); outputStream.write(obj.toString().getBytes("UTF-8")); int code = connection.getResponseCode(); boolean isSuccess = code == 200; logger.info("responseStream Test: "); InputStream responseStream = isSuccess ? connection.getInputStream() : connection.getErrorStream(); logger.info("responseStream : "+responseStream); 이때 최종 결재 정보 card,cash 등 의 정보를 어떻게 확인하나요?
HttpURLConnection connection = (HttpURLConnection) url.openConnection() ; connection.setRequestProperty("Authorization", authorizations); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestMethod("POST"); connection.setDoOutput(true); OutputStream outputStream = connection.getOutputStream(); outputStream.write(obj.toString().getBytes("UTF-8")); int code = connection.getResponseCode(); boolean isSuccess = code == 200; logger.info("responseStream Test: "); InputStream responseStream = isSuccess ? connection.getInputStream() : connection.getErrorStream(); logger.info("responseStream : "+responseStream); 이때 최종 결재 정보 card,cash 등 의 정보를 어떻게 확인하나요?
7 replies
TPToss payments 개발자 커뮤니티
•Created by 박세일 on 3/12/2025 in #❓┃연동개발-문의
위젯 사용중 Webview에서 결재창이 안떠요
위젯을 사용중
AndroidManifest.xml query 부분은 추가했습니다.
Web으로 구현이 되어 있고 앱에서 Webview로 호출하여 진행하고 있습니다.
17 replies