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:
- Open your project in Android Studio.
- Open build.gradle or build.gradle.kts file.
- Add following code to dependencies.
dependencies {
...
...
implementation("com.2c2p:pgw-sdk:4.7.1")
}
iOS: Swift Package Collection
To import the 2C2P PGW SDK into your project, follow the steps below:
- Open your project in Xcode.
- Go to package dependencies and click + button.
- Click + button for add package collection.
- Enter https://swiftpackageindex.com/2C2P/collection.json url into input and click load button.
- Click add collection button.
- Select necessary swift package and click add package button.
- Select necessary project target and click add package button.
- Make sure swift package added into your project.
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:
- Open your project in Android Studio or other Flutter supported IDE.
- Open pubspec.yaml.
- 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:
- Open your project in React Native supported IDE.
- Open package.json.
- Add these dependencies to your package file:
Updated 17 days ago