react-native-webview-bootpay 13.14.2 → 13.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,6 +17,16 @@ public class BootpayUrlHelper {
17
17
 
18
18
  Log.i("bootpay", "doDeepLinkIfPayUrl: " + url);
19
19
 
20
+ // mpocket.online.ansimclick://는 삼성카드 mPOCKET / 삼성 모니모 둘 다 handle 가능.
21
+ // mPOCKET 미설치 + 모니모 설치 상태에서 무조건 mPOCKET으로 지정해 결제가 끊기는 것을 방지.
22
+ if (url != null && url.startsWith("mpocket.online.ansimclick")
23
+ && intent != null
24
+ && "kr.co.samsungcard.mpocket".equals(intent.getPackage())
25
+ && !isPackageInstalled(context, "kr.co.samsungcard.mpocket")
26
+ && isPackageInstalled(context, "net.ib.android.smcard")) {
27
+ intent.setPackage("net.ib.android.smcard");
28
+ }
29
+
20
30
  if(isIntent(url)) {
21
31
  Log.i("isIntent", "isInstallApp called");
22
32
  if(isInstallApp(intent, context)) return startApp(intent, context);
@@ -42,7 +52,19 @@ public class BootpayUrlHelper {
42
52
  || url.startsWith("mpocket.online.ansimclick://")
43
53
  || url.startsWith("wooripay://")
44
54
  || url.startsWith("ispmobile://")
45
- || url.startsWith("kakaotalk://");
55
+ || url.startsWith("kakaotalk://")
56
+ || url.startsWith("kakaobank://")
57
+ || url.startsWith("monimopay://")
58
+ || url.startsWith("smcard://");
59
+ }
60
+
61
+ private static boolean isPackageInstalled(Context context, String packageName) {
62
+ if (context == null || packageName == null) return false;
63
+ try {
64
+ return context.getPackageManager().getLaunchIntentForPackage(packageName) != null;
65
+ } catch (Exception e) {
66
+ return false;
67
+ }
46
68
  }
47
69
 
48
70
  public static Boolean isIntent(String url) {
@@ -75,6 +97,8 @@ public class BootpayUrlHelper {
75
97
  else if (url.startsWith("nhappvardansimclick")) intent.setPackage("nh.smart.nhallonepay");
76
98
  else if (url.startsWith("citispay")) intent.setPackage("kr.co.citibank.citimobile");
77
99
  else if (url.startsWith("kakaotalk")) intent.setPackage("com.kakao.talk");
100
+ else if (url.startsWith("kakaobank")) intent.setPackage("com.kakaobank.channel");
101
+ else if (url.startsWith("monimopay") || url.startsWith("smcard")) intent.setPackage("net.ib.android.smcard");
78
102
  // kvp.jjy.MispAndroid320
79
103
  }
80
104
  return intent;
@@ -109,28 +133,43 @@ public class BootpayUrlHelper {
109
133
  }
110
134
 
111
135
  public static boolean startGooglePlay(Intent intent, Context context) {
112
- final String appPackageName = intent.getPackage();
136
+ // intent:// URL의 표준 fallback (S.browser_fallback_url) 우선 처리
137
+ String fallbackUrl = intent != null ? intent.getStringExtra("browser_fallback_url") : null;
138
+ if (fallbackUrl != null && !fallbackUrl.isEmpty()) {
139
+ try {
140
+ Intent fallback = new Intent(Intent.ACTION_VIEW, Uri.parse(fallbackUrl));
141
+ fallback.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
142
+ context.startActivity(fallback);
143
+ return true;
144
+ } catch (Exception ignored) { /* fall through */ }
145
+ }
146
+
147
+ final String appPackageName = intent != null ? intent.getPackage() : null;
113
148
 
114
149
  if(appPackageName == null) {
115
- Uri dataUri = intent.getData();
150
+ Uri dataUri = intent != null ? intent.getData() : null;
116
151
 
117
152
  try {
118
- Intent addIntent = new Intent(Intent.ACTION_VIEW, intent.getData());
153
+ Intent addIntent = new Intent(Intent.ACTION_VIEW, dataUri);
154
+ addIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
119
155
  context.startActivity(addIntent);
120
156
  } catch (Exception e) {
121
157
  String packageName = "com.nhn.android.search"; //appPackageName이 비어있으면 네이버로 보내기(네이버 로그인)
122
158
  if(dataUri != null && dataUri.toString().startsWith("wooripay://")) packageName = "com.wooricard.wpay"; //우리카드 예외처리
123
159
 
124
160
  Intent addIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + packageName));
161
+ addIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
125
162
  context.startActivity(addIntent);
126
163
  }
127
164
  return true;
128
165
  }
129
166
  try {
130
167
  Intent addIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName));
168
+ addIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
131
169
  context.startActivity(addIntent);
132
170
  } catch (android.content.ActivityNotFoundException anfe) {
133
171
  Intent addIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName));
172
+ addIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
134
173
  context.startActivity(addIntent);
135
174
  }
136
175
  return true;
@@ -2056,6 +2056,8 @@ didFinishNavigation:(WKNavigation *)navigation
2056
2056
  itunesUrl = @"https://apps.apple.com/kr/app/%EB%A6%AC%EB%B8%8C/id1126232922";
2057
2057
  } else if([sUrl hasPrefix: @"mpocket.online.ansimclick"] || [sUrl hasPrefix: @"ansimclickscard"] || [sUrl hasPrefix: @"ansimclickipcollect"] || [sUrl hasPrefix: @"samsungpay"] || [sUrl hasPrefix: @"scardcertiapp"]) {
2058
2058
  itunesUrl = @"https://apps.apple.com/kr/app/%EC%82%BC%EC%84%B1%EC%B9%B4%EB%93%9C/id535125356";
2059
+ } else if([sUrl hasPrefix: @"monimopay"] || [sUrl hasPrefix: @"smcard"]) {
2060
+ itunesUrl = @"https://apps.apple.com/kr/app/monimo-%EB%AA%A8%EB%8B%88%EB%AA%A8-%EC%82%BC%EC%84%B1%EA%B8%88%EC%9C%B5%EB%84%A4%ED%8A%B8%EC%9B%8D%EC%8A%A4/id379577046";
2059
2061
  } else if([sUrl hasPrefix: @"lottesmartpay"]) {
2060
2062
  itunesUrl = @"https://apps.apple.com/us/app/%EB%A1%AF%EB%8D%B0%EC%B9%B4%EB%93%9C-%EC%95%B1%EC%B9%B4%EB%93%9C/id688047200";
2061
2063
  } else if([sUrl hasPrefix: @"lotteappcard"]) {
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "Thibault Malbranche <malbranche.thibault@gmail.com>"
11
11
  ],
12
12
  "license": "MIT",
13
- "version": "13.14.2",
13
+ "version": "13.14.4",
14
14
  "homepage": "https://github.com/bootpay/react-native-webview-bootpay#readme",
15
15
  "scripts": {
16
16
  "android": "react-native run-android",
@@ -44,7 +44,7 @@
44
44
  "@babel/cli": "^7.26.0",
45
45
  "@babel/core": "^7.26.0",
46
46
  "@babel/runtime": "^7.26.0",
47
- "@callstack/react-native-visionos": "0.76.2",
47
+ "@callstack/react-native-visionos": "0.76.7",
48
48
  "@react-native/babel-preset": "0.76.7",
49
49
  "@react-native/eslint-config": "0.76.7",
50
50
  "@react-native/metro-config": "0.76.7",