ZaloPay Prerequisite

1. Prerequisite

  • Android:
dependencies {
  
    implementation("com.2c2p:pgw-sdk:4.7.1")
    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
    }
}

2. Handle application deep link url.


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


4. Add application URL schemes of your app info.plist.

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