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 methodPayment productDescription
ALIPAY_CNCASHIER_PAYMENTIntermediate page for invoking a payment method app
WECHATINAPP_PAYMENTIntermediate page for invoking a payment method app
WECHATWEB_PAYMENTLogin page/Intermediate page for invoking a payment method app
ALIPAY_HKCASHIER_PAYMENTLogin page
UNIONPAYSECURE_PAYWeb payment page
TNGCASHIER_PAYMENTLogin page
DANACASHIER_PAYMENTLogin page
GCASHCASHIER_PAYMENTLogin page
KAKAOPAYCASHIER_PAYMENTIntermediate page for invoking a payment method app
TOSSPAYCASHIER_PAYMENTLogin page
TRUEMONEYCASHIER_PAYMENTIntermediate page for invoking a payment method app