DocumentationRecipesAPI ReferenceChangelog
Documentation

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.

Prerequisite

  • Flutter / Dart:

Add following dependencies to your package's pubspec.yaml file:

dependencies:  
  pgw_sdk: ^4.1.0
  webview_flutter: ^4.14.1
  meta: ^1.19.0
  • Android:

Step 1: Update your flutter project settings.gradle file.

pluginManagement {
    def flutterSdkPath = {
        def properties = new Properties()
        file("local.properties").withInputStream { properties.load(it) }
        def flutterSdkPath = properties.getProperty("flutter.sdk")
        assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
        return flutterSdkPath
    }()

    includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "9.4.0" apply false
    id "org.jetbrains.kotlin.android" version "2.4.20" apply false
}

include ':app'

Step 2: Add into your Android project proguard file.


#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.* { *; }
-dontwarn java.beans.ConstructorProperties
-dontwarn java.beans.Transient
  • 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]

Step 3: Enable swift package manager by "flutter config --enable-swift-package-manager". [Here]


System Requirements

The SDK has been developed on following platform version:

PlatformMinimum Version
iOS15.0+
Android24+ (OS 7.0)
Flutter>=3.41.0
Dart^3.11.0

Changelog

VersionDescriptionResource
4.1.0
  • Implement with PGW SDK v4.7.1 & PGW SDK Helper v4.2.3 features.
  • iOS: Implemeted with swift package manager.
4.0.9
  • Implement with PGW SDK v4.7.1 & PGW SDK Helper v4.2.1 features.
4.0.8
  • Implement with PGW SDK v4.7.0 & PGW SDK Helper v4.2.1 features.
4.0.7
  • Implement with PGW SDK v4.7.0 & PGW SDK Helper v4.2.0 features.
4.0.6
  • Improve code integration.
4.0.5
  • Improve code integration.
4.0.4
  • Implement with PGW SDK v4.6.0 & PGW SDK Helper v4.1.1 features.
4.0.3
  • Implement with PGW SDK v4.5.2 & PGW SDK Helper v4.1.0 features.
4.0.2
  • Implement with PGW SDK v4.5.1 & PGW SDK Helper v4.0.0 features.