Import PGW SDK

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


Android: Gradle

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

  1. Open your project in Android Studio.
  2. Open build.gradle or build.gradle.kts file.
  3. Add following code to dependencies.
dependencies {  
    ...
    ...
  
    implementation("com.2c2p:pgw-sdk:4.7.0")
}


iOS: Swift Package Collection

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

  1. Open your project in Xcode.
  2. Go to package dependencies and click + button.
610

Step 2

  1. Click + button for add package collection.
610

Step 3

  1. Enter https://swiftpackageindex.com/2C2P/collection.json url into input and click load button.
1448

Step 4

  1. Click add collection button.
1448

Step 5

  1. Select necessary swift package and click add package button.
1448

Step 6

  1. Select necessary project target and click add package button.
1448

Step 7

  1. Make sure swift package added into your project.
1448

Step 8


🚧

Paste the following snippet into build phase > run script:

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



Flutter: Flutter package

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

  1. Open your project in Android Studio or other Flutter supported IDE.
  2. Open pubspec.yaml.
  3. Add these dependencies to your package's pubspec.yaml file:

React Native: NPM / YARN package

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

  1. Open your project in React Native supported IDE.
  2. Open package.json.
  3. Add these dependencies to your package file:

Next: Initiate PGW SDK