Capacitor plugin for Khipu
npm install capacitor-khipu
npx cap sync
No need for aditional steps
For Android to be able to locate the khenshin aar you need to add the maven repository of khenshin to the allproyects section of the android/build.gradle file.
Something like:
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://dev.khipu.com/nexus/content/repositories/khenshin' }
}
}
Note that google() and mavenCentral() repos are usually already added.
Khipu client for Android use Jetpack Compose technology, in order to do that the kotlin plugin must be enabled.
In the android/build.gradle file add the classpath for the org.jetbrains.kotlin:kotlin-gradle-plugin:<version>
artifact
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.google.gms:google-services:4.4.0'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
Note that the classpath for com.android.tools.build:gradle:<version>
and com.google.gms:google-services:<version>
are usually already there.
Then in the android/app/build.gradle file add the plugin at the top of the file
apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.android'
Note that the com.android.application
plugin is usually already there.
startOperation(options: StartOperationOptions) => Promise<KhipuResult>
Param | Type |
---|---|
options |
StartOperationOptions |
Returns: Promise<KhipuResult>
Prop | Type |
---|---|
operationId |
string |
exitTitle |
string |
exitMessage |
string |
exitUrl |
string |
result |
'OK' | 'ERROR' | 'WARNING' | 'CONTINUE' |
failureReason |
string |
continueUrl |
string |
events |
KhipuEvent[] |
Prop | Type |
---|---|
name |
string |
timestamp |
string |
type |
string |
Prop | Type |
---|---|
operationId |
string |
options |
KhipuOptions |
Prop | Type |
---|---|
locale |
string |
title |
string |
titleImageUrl |
string |
skipExitPage |
boolean |
theme |
'light' | 'dark' | 'system' |
colors |
KhipuColors |
showFooter |
boolean |
showMerchantLogo |
boolean |
showPaymentDetails |
boolean |
Prop | Type |
---|---|
lightBackground |
string |
lightOnBackground |
string |
lightPrimary |
string |
lightOnPrimary |
string |
lightTopBarContainer |
string |
lightOnTopBarContainer |
string |
darkBackground |
string |
darkOnBackground |
string |
darkPrimary |
string |
darkOnPrimary |
string |
darkTopBarContainer |
string |
darkOnTopBarContainer |
string |