PGW SDK for Flutter
The 2C2P Payment Gateway (PGW) SDK For Flutter simplified integration solution for flutter platform with 2C2P Payment Gateway (PGW) SDK & 2C2P Payment Gateway (PGW) SDK Helper.
Supported platforms:
- Flutter (v4.0.3)
Changelog:
Getting Started
Flutter / Dart:
Add these to your package's pubspec.yaml file:
dependencies:
pgw_sdk: ^4.0.3
webview_flutter: ^4.7.0
Android:
Step 1: Add these to your build.gradle file:
android {
...
...
defaultConfig {
...
...
multiDexEnabled true
}
buildTypes {
...
...
//Important: add debug for prevent obfuscate PGW & PGW Helper SDK methods.
debug {
signingConfig signingConfigs.debug
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
...
...
//2C2P PGW SDK
implementation 'org.bouncycastle:bcprov-jdk18on:1.77'
implementation files("libs/PGW_SDK_ANDROID_v4.5.2.aar")
//2C2P PGW SDK HELPER
implementation files("libs/PGW_SDK_HELPER_ANDROID_v4.1.0.aar")
}
Step 2: Add or update your Android project proguard file.
#PGW
-keep class com.ccpp.pgw.sdk.android.** { *; }
-keepnames class com.ccpp.pgw.sdk.android.* { *; }
-keepnames interface com.ccpp.pgw.sdk.android.* { *; }
#PGWHelper
-keep class com.ccpp.pgw.sdk.helper.android.** { *; }
-keepnames class com.ccpp.pgw.sdk.helper.android.* { *; }
-keepnames interface com.ccpp.pgw.sdk.helper.android.* { *; }
#PGWFlutter
-keep class com.ccpp.pgw.sdk.flutter.** { *; }
-keepnames class com.ccpp.pgw.sdk.flutter.* { *; }
-keepnames interface com.ccpp.pgw.sdk.flutter.* { *; }
#com.fasterxml.jackson
-keep class com.fasterxml.jackson.** { *; }
-keepnames class com.fasterxml.jackson.* { *; }
-keepnames interface com.fasterxml.jackson.* { *; }
#ZaloPay
-keep class vn.zalopay.sdk.** { *; }
-keepnames class vn.zalopay.sdk.** { *; }
-keepnames interface vn.zalopay.sdk.** { *; }
#BouncyCastle
-keep class org.bouncycastle.jcajce.provider.** { *; }
-keep class org.bouncycastle.jce.provider.** { *; }
-dontwarn java.beans.ConstructorProperties
-dontwarn java.beans.Transient
-dontwarn javax.naming.NamingEnumeration
-dontwarn javax.naming.NamingException
-dontwarn javax.naming.directory.Attribute
-dontwarn javax.naming.directory.Attributes
-dontwarn javax.naming.directory.DirContext
-dontwarn javax.naming.directory.InitialDirContext
-dontwarn javax.naming.directory.SearchControls
-dontwarn javax.naming.directory.SearchResult
iOS:
Step 1: Add deep link payment handle into your iOS Runner.xcodeproj. [Here]
Step 2: Add Apple Pay handle into your iOS Runner.xcodeproj. [Here]
System Requirements
The SDK has been developed on following platform version:
Platform | Minimum Version |
---|---|
iOS | 12.0+ |
Android | 19+ (OS 4.4) |
Dart | >=3.0.0 <4.0.0 |
Updated about 2 months ago