7.6 Redirect outside the application
For IOS
Calling the iOS method to open the payment continuation URL leads to a redirection experience outside the application. The following code sample shows how to redirect buyers from your application to a payment method application using an iOS method in the iOS system.
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:Url] options:@{} completionHandler:nil];
}else{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:Url]];
}
For android
Calling the Android method to open the payment continuation URL leads to a redirection experience outside the application. The following code sample demonstrates how to open the payment continuation URL using an Android method to achieve the redirection from your application to a payment method application.
try {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(Url));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// use the startActivity function to redirect to the wallet app
startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
}
URLs returned for payment methods
Payment method | Payment product | Description |
---|---|---|
ALIPAY_CN | CASHIER_PAYMENT | Intermediate page for invoking a payment method app |
INAPP_PAYMENT | Intermediate page for invoking a payment method app | |
WEB_PAYMENT | Login page/Intermediate page for invoking a payment method app | |
ALIPAY_HK | CASHIER_PAYMENT | Login page |
UNIONPAY | SECURE_PAY | Web payment page |
TNG | CASHIER_PAYMENT | Login page |
DANA | CASHIER_PAYMENT | Login page |
GCASH | CASHIER_PAYMENT | Login page |
KAKAOPAY | CASHIER_PAYMENT | Intermediate page for invoking a payment method app |
TOSSPAY | CASHIER_PAYMENT | Login page |
TRUEMONEY | CASHIER_PAYMENT | Intermediate page for invoking a payment method app |
Updated about 2 months ago