react-native-lio
fornece a integração de aplicações que usam React Native à máquina CIELO Lio, implementando os principais métodos usados, baseado na documentação https://developercielo.github.io/manual/cielo-lio
Vale ressaltar que este pacote tem suporte apenas para Android, visto que é o SO utilizado pela LIO.
Instale o pacote
from npm
npm install react-native-lio
from yarn
yarn add react-native-lio
Adicione ao final do arquivo /android/build.gradle
allprojects {
...
repositories {
maven {
...
jcenter()
maven {
url("$rootDir/../node_modules/react-native-lio/android/cielo-sdk")
}
}
}
Adicione ou altere no android/app/src/main/AndroidManifest.xml o allowBackup para true
android:allowBackup="true"
react-native-lio | react-native |
---|---|
1.0.0 | <= 0.64.5 |
1.0.1 | <= 0.64.5 |
1.0.2 | > 0.64.5 |
Load library with client ID, accessToken and ec.
Request payment with credit on sight. amout, value to pay; orderId, order number to transaction;
Request payment with credit in installments. amout, value to pay; orderId, order number to transaction; *installments, number of installments
Request payment with credit on sight. amout, value to pay; orderId, order number to transaction;
Gets the machine informations.
Gets order list.
Creats a draft order.
Add items to order.
Print one line text using machine printter.
Print an image using machine printter.
If you have unexpected behavior, please create a clean project with the latest versions of react-native and react-native-lio
react-native init CleanProject
cd CleanProject/
yarn add react-native-lio
Make a reproduction of the problem in App.js
react-native run-android
Verify that it is still an issue with the latest version as specified in the previous step. If so, open a new issue, include the entire App.js
file, specify what platforms you've tested, and the results of running this command:
react-native info