Capacitor plugin for Conketa
npm install capacitor-conekta
Register the plugin by importing it.
import "capacitor-conekta";
In file android/app/src/main/AndroidManifest.xml
add the following under <application></application>
:
<uses-library android:name ="org.apache.http.legacy" android:required ="false"/>
Register the plugin inside your android/app/src/main/java/**/**/MainActivity.java
file
import lat.bit.plugin.capacitor.conekta.ConektaClient;
[...]
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {
{
[...]
add(ConektaClient.class);
[...]
}
});
await Conekta.setPublicKey(<your conekta public key>);
const token = await Conekta.createToken({
cardNumber: '',
name: '',
expYear: '',
expMonth: '',
cvc: '',
});