Skip to content

Commit 4e86876

Browse files
authored
Merge pull request #2 from adlanrashdan/main
Wrapper version update and Alipay Error Fix
2 parents 8cfcbba + ab9ef29 commit 4e86876

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

molpayxdk/src/main/java/com/molpay/molpayxdk/MOLPayActivity.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class MOLPayActivity extends AppCompatActivity {
9595
private final static String mppinstructioncapture = "mppinstructioncapture://";
9696
private final static String module_id = "module_id";
9797
private final static String wrapper_version = "wrapper_version";
98-
private final static String wrapperVersion = "4";
98+
private final static String wrapperVersion = "5";
9999

100100
private String base64Img;
101101
private String filename;
@@ -308,7 +308,16 @@ public void onReceiveValue(String ref_no) {
308308
e.printStackTrace();
309309
}
310310
return true;
311+
}else if (url.contains("alipays://")) {
312+
try {
313+
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
314+
startActivity(intent);
315+
} catch (ActivityNotFoundException e) {
316+
// Define what your app should do if no activity can handle the intent.
317+
e.printStackTrace();
311318
}
319+
return true;
320+
}
312321
}
313322
return false;
314323
}

0 commit comments

Comments
 (0)