Import PGW SDK

The 2C2P PGW SDK allows merchants to accept mobile payments natively within their apps.

Supported platforms:

Download the SDK libraries here: Download


Android: Installation for Android Archive (AAR):

 
To import the 2C2P PGW SDK into your project, follow the steps below:

  1. Open your project in Android Studio.
  2. Download PGWSDK-Android-[Version].aar.
  3. Right-click the app in project view and select "Open Module Settings".
990990

Step 3

  1. Click the "+" button on the top left of the options window.
19241924

Step 4

  1. Select "Import .JAR/.AAR Package".
19421942

Step 5

  1. Select the SDK files that you have downloaded (PGWSDK-Android-[Version].aar).
932932

Step 6

🚧

Proguard configuration:

-keep class com.ccpp.pgw.sdk.android.** { *; }
-keepnames class com.ccpp.pgw.sdk.android.* { *; }
-keepnames interface com.ccpp.pgw.sdk.android.* { *; }


iOS: Installation for Static Framework:

 
To import the 2C2P PGW SDK into your project, follow the steps below:

  1. Open your project in Xcode.
  2. Download and unzip PGWSDK-IOS-[Version].zip.
  3. Right-click and select "Add Files to" your project.
610610

Step 3

  1. Select the SDK files that you have downloaded (PGW.framework).
14481448

Step 4

  1. Select "Copy items if needed" and "Create groups".
  2. Click on "Add" and import "PGWSDK" to your project.

iOS: Installation for Dynamic XCFramework:

 
To import the 2C2P PGW SDK into your project, follow the steps below:

  1. Open your project in Xcode.
  2. Download and unzip PGWSDK-IOS-[Version].zip.
  3. In your project settings, go to General > Frameworks, Libraries, and Embedded Content. Drag in the file "PGW. xcframework". Make sure to select "Copy items if needed".
  4. Set your embed mode to "Embed & Sign" or "Embed Without Signing".
26462646

Step 4

🚧

Important:

For Xcode 12.5 and above, you must set your embed mode to "Do Not Embed".

  1. Go to Settings > Build Phases and create a new Run Script Build Phase.

🚧

Paste the following snippet into the text field:

bash "${BUILT_PRODUCTS_DIR}/PGW.framework/integrate-dynamic-framework.sh"

Next: Initiate PGW SDK