Skip to content

Commit 558cf30

Browse files
author
parksehong
committed
나이스패이에서 우리은행 결제 요청시 ERR_UNKNOWN_URL_SCHEME 오류 수정
1 parent a41566b commit 558cf30

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

bootpay/src/main/AndroidManifest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@
1414

1515
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
1616
<uses-permission android:name="android.permission.VIBRATE"/>
17-
</manifest>
17+
18+
<!-- android 11 모든 앱 접근 권한 사용 (Google Play 가이드라인 참고 - 2021-02-19 기준 못찾았음) -->
19+
<!-- <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" tools:ignore="QueryAllPackagesPermission" /> -->
20+
21+
</manifest>

bootpay/src/main/java/kr/co/bootpay/BootpayWebView.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ private Boolean isSpecialCase(String url) {
205205
|| url.startsWith("v3mobileplusweb://")
206206
|| url.startsWith("hdcardappcardansimclick://")
207207
|| url.startsWith("nidlogin://")
208-
|| url.startsWith("mpocket.online.ansimclick://");
208+
|| url.startsWith("mpocket.online.ansimclick://")
209+
|| url.startsWith("wooripay://")
210+
|| url.startsWith("kakaotalk://");
209211
}
210212

211213
private Intent parse(String url) {
@@ -271,9 +273,11 @@ private boolean gotoMarket(Intent intent, Context context) {
271273
context.startActivity(new Intent(Intent.ACTION_VIEW, intent.getData()));
272274
} catch (Exception e) {
273275
Log.d("goToMarket Error", e.getMessage());
274-
if(dataUri != null || dataUri.toString().startsWith("nidlogin://")) { //네이버 로그인일 경우 appPackageName이 비어 있이기에, 예외처리를 해주자
275-
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + "com.nhn.android.search")));
276+
String packageName = "com.nhn.android.search"; //네이버 로그인일 경우 appPackageName이 비어 있이기에, 예외처리를 해주자
277+
if(dataUri != null && dataUri.toString().startsWith("wooripay://")) { //우리카드 패키지에서 사이트 URL로 변경
278+
packageName = "com.wooricard.wpay";
276279
}
280+
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + packageName)));
277281
}
278282
return true;
279283
}

local.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
# Location of the SDK. This is only used by Gradle.
55
# For customization when using a Version Control System, please read the
66
# header note.
7-
#Fri Jun 19 09:13:48 KST 2020
7+
#Wed Feb 24 18:10:53 KST 2021
88
ndk.dir=/Users/ehowlsla/Library/Android/sdk/ndk-bundle
9-
sdk.dir=/Users/taesupyoon/Library/Android/sdk
9+
sdk.dir=/Users/parksehong/Library/Android/sdk

sample/src/main/assets/html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
55
<meta name="viewport" content="width=device-width, initial-scale=1, boot_user-scalable=no">
66
<meta content="5b14c0ffb6d49c40cda92c4e" name="bootpay-application-id">
7-
<script src="https://cdn.bootpay.co.kr/js/bootpay-3.0.4.min.js" type="application/javascript"></script>
7+
<script src="https://cdn.bootpay.co.kr/js/bootpay-3.3.1.min.js" type="application/javascript"></script>
88
<script>
99
function payTest() {
1010
var android_application_id = '5b14c0ffb6d49c40cda92c4e'

0 commit comments

Comments
 (0)