Skip to content

khipu/react-native-khenshin-wu

 
 

Repository files navigation

react-native-khenshin

Add the library to your project

npm install https://github.com/khipu/react-native-khenshin --save --force

Install and configure

Usage

import React from 'react';
import {SafeAreaView, TouchableOpacity, Text} from 'react-native';
import Khipu from 'react-native-khenshin';

function App(this: any): JSX.Element {
    const onStartPayment = () => {
        Khipu.startPaymentById('paymentId')
            .then(({status, result}) => {
                if (status === 'CONCILIATING') {
                    // khipu is conciliating the payment
                } else if (status === 'USER_CANCELED') {
                    // The user cancelled the transaction
                } else {
                    // Error!, see `result` for details
                    console.log(result);
                }
            })
            .catch((err: any) => console.log({err}));
    };

    return (
        <SafeAreaView>
            <ScrollView>
                <Header />
                <Button title={'pagar'} onPress={onStartPayment}></Button>
            </ScrollView>
        </SafeAreaView>
    );
}

Example project

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 51.5%
  • Objective-C 25.8%
  • Ruby 17.3%
  • JavaScript 5.4%