ZaloPay Prerequisite

Prerequisite

  • Android:
dependencies {
  
    implementation("com.2c2p:pgw-sdk:4.7.0")
    implementation("com.2c2p:pgw-sdk-helper:4.2.1")
    implementation("com.2c2p:pgw-sdk-helper-zalopay:3.1.0")
}
  • iOS:
@implementation AppDelegate
 
   ...
   ...
 
- (BOOL)application: (UIApplication *)application openURL: (NSURL *)url options: (NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
 
    [[PGWSDKHelper shared] universalPaymentResultObserverWithURL: url];
     
    return true;
}
 
@end
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
 
    ...
    ...
     
    func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
         
        PGWSDKHelper.shared.universalPaymentResultObserver(url: url)
         
        return true
    }
}

Step 1: Handle application deep link url.

Step 2: Add custom URL scheme under URL types with format "pgw{your app bundle identifier}.

Step 3: Add application URL schemes of your app info.plist.

schemename
zaloZalo Pay.
zalopayZalo Pay.
zalopay.api.v2Zalo Pay.