Portmone SDK supports version Android 4.4 KitKat, API level 19 and latest versions.
Integration
### build.gradle (project level)
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://github.com/Portmone/Android-e-Commerce-SDK/raw/master/"
}
}
}
### build.gradle (app level)
dependencies {
implementation 'com.portmone.ecomsdk:ecomsdk:1.3.3'
}
$ yarn add @kyivstarteam/react-native-ecom-portmone
CLI autolink feature links the module while building the app.
$ react-native link @kyivstarteam/react-native-ecom-portmone
import PortmoneSDK from '@kyivstarteam/react-native-ecom-portmone';
import PortmoneSdk, { PaymentType } from '@kyivstarteam/react-native-ecom-portmone';
type Locale = 'uk' | 'ru' | 'en';
const locale: Locale = 'uk';
interface SavingCard {
token: string
}
const payeeId: string = 'Your payee id';
const phoneNumber: string = '681234567';
const amount: number = 10
const type: PaymentType = 'account';
const portmoneSdk = new PortmoneSdk(locale);
initPayWithoutSavingCard = () => {
portmoneSdk.initCardPayment(payeeId, phoneNumber, amount, type);
}
initSavingCard = async () => {
const result: SavingCard = await portmoneSdk.initCardSaving(payeeId);
}
Author: kyivstarteam
Source Code: https://github.com/kyivstarteam/react-native-ecom-portmone
#react-native #react #mobile-apps