Skip to content

Commit 447b6c8

Browse files
author
ehowlsla
committed
inicis webapp bank sample update
1 parent f022dc3 commit 447b6c8

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGest
572572
WebView.HitTestResult result = view.getHitTestResult();
573573
String url = result.getExtra();
574574

575-
if (isNewWindow(url)) {
575+
if (isNewWindow(url) && isPopup(url)) {
576576
start(view, createFrom(url));
577577
} else if (resultMsg != null) {
578578
BootpayWebView newWindow = new BootpayWebView(view.getContext());
@@ -621,6 +621,10 @@ private void start(View view, Intent intent) {
621621
view.getContext().startActivity(intent);
622622
}
623623

624+
private boolean isPopup(String url) {
625+
return url != null && !url.contains("https://app.bootpay.co.kr/assets/icon");
626+
}
627+
624628
private boolean isNewWindow(String url) {
625629
return url != null && !url.contains("___target=_blank");
626630
}

sample/src/main/java/bootpay/co/kr/samplepayment/NativeActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ public void onClick_request(View v) {
7676
Bootpay.init(getFragmentManager())
7777
.setContext(this)
7878
.setApplicationId(application_id) // 해당 프로젝트(안드로이드)의 application id 값
79-
.setPG(PG.INICIS) // 결제할 PG 사
80-
.setMethod(Method.BANK)
79+
.setPG(PG.DANAL) // 결제할 PG 사
80+
.setMethod(Method.CARD)
8181
.setBootExtra(bootExtra)
8282
.setBootUser(bootUser)
8383
// .setUserPhone("010-1234-5678") // 구매자 전화번호

sample/src/main/java/bootpay/co/kr/samplepayment/WebAppActivity.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@
2929
public class WebAppActivity extends Activity {
3030
// WebView webview;
3131
BootpayWebView webview;
32-
final String url = "https://g-cdn.bootpay.co.kr/test/payment/index.html";
32+
// final String url = "https://g-cdn.bootpay.co.kr/test/payment/index.html";
33+
final String url = "https://ezbrainsoft.com/app/[email protected]";
34+
3335
// final String url = "https://test-shop.bootpay.co.kr";
3436

3537

3638

3739
// final String android_application_id = "59a4d4a1929b3f3b8b6422c8"; //dev
38-
final String android_application_id = "5b14c0ffb6d49c40cda92c4e";
40+
// final String android_application_id = "5b14c0ffb6d49c40cda92c4e";
3941

4042

4143
@Override

0 commit comments

Comments
 (0)