Initiate PGW SDK

Initialize the PGW SDK in your application.

import com.ccpp.pgw.sdk.android.builder.PGWSDKParamsBuilder;
import com.ccpp.pgw.sdk.android.core.PGWSDK;
import com.ccpp.pgw.sdk.android.enums.APIEnvironment;
import com.ccpp.pgw.sdk.android.model.core.PGWSDKParams;
 
public class CustomApplication extends Application {
 
    @Override
    public void onCreate() {
        super.onCreate();
 
        PGWSDKParams pgwsdkParams = new PGWSDKParamsBuilder(this, APIEnvironment.Production)
                                    .build();
 
        PGWSDK.initialize(pgwsdkParams);
    }
}
@import PGW;
 
@implementation AppDelegate
      
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions {
           
        PGWSDKParams *pgwsdkParams = [[[PGWSDKParamsBuilder alloc] initWithApiEnvironment: APIEnvironmentProduction]
                                                                                           build];
     
        [PGWSDK initializeWithParams: pgwsdkParams];
     
        return YES;
    }
@end
import PGW
 
class AppDelegate: UIResponder, UIApplicationDelegate {
     
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
     
        let pgwsdkParams: PGWSDKParams = PGWSDKParamsBuilder(apiEnvironment: APIEnvironment.Production)
                                        .build()
 
        PGWSDK.initialize(params: pgwsdkParams)
    }
}

Before performing any payment transaction, your application is required to initialize 2C2P PGW SDK.

📘

The 2C2P PGW SDK should be initialize on Application / AppDelegate class

 

Next : Handle PGW Payment Authentication
To understand client callback for handle PGW payment authentication.