0.1.13 • Published 3 years ago

@chzdo_apps/react-paystack-flutter-payment v0.1.13

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

Getting Started with React-Paystack-Flutter-Payment

This is a Component for Paystack and Flutter Wave Payments.

About

Yes, there are options for react component for several gateways. However, this component combines Paystack and Flutter Wave with an addition Feature.

You can pass your verification uri to the component and it verifies your payment and returns response from your API.

Installation

NPM

npm install @chzdo_apps/react-paystack-flutter-payment

or Yarn

yarn add @chzdo_apps/react-paystack-flutter-payment

Yes, there are options for react component for several gateways. However, this component combines Paystack and Flutter Wave with an addition Feature.

You can pass your verification uri to the component and it verifies your payment and returns response from your API.

Example

 import { PayStack , FlutterWave } from "@chzdo_apps/react-paystack-flutter-payment"

...
          <PayStack

            config={{
            email: state.email,
            amount: state.amount,
               }}
          verify={{
            url: "<your API URL>",
            options: {
            method: "<Your Prefered Request Method>"             
            },
            Component: ()=><i  class="fas fa-spin"></i>
          }}
          currency="NGN"
          publicKey="Your Paystack public Key"
          onSuccess={(r) => console.log(r)}
          onClose={() => console.log('closed')}
          text={'Pay'}
          buttonStyle={{
            background: 'blue',
            borderWidth: 0,
            boxShadow: "0px 1px 2px 5px black",
       
          }}
          channels={["bank", "card"]}
        />

        <FlutterWave

          customer={{
            email: state.email,
            phonenumber: state.phone,
            name: state.name  }}
            amount={state.amount}
            currency="NGN"
           verify={{
            url: "<your API URL>",
            options: {
            method: "<Your Prefered Request Method>",
            },
            Component: ()=><i  class="fas fa-spin"></i>
          }}
          publicKey="Your Flutter wave Key"
          onSuccess={(r) => console.log(r)}
          onClose={(e) => console.log('closed',e)}
          text={'Flutter Product'}
          buttonStyle={{
            background: 'red',
            borderWidth: 0,
            boxShadow: "0px 1px 2px 5px black",
            cursor: 'grab'
          }}
        />

Props

General

PropDescriptionExpected Value
publicKeyYour payment Public Keystring
onSuccessThe callback function after paymentFunction
onCloseThe callback function when user closes the dialogFunction
buttonStyleStyles for the payment buttonCSSProperties
textCaption on the buttondefault : pay
verifyThis is used if you want the component to verify the transaction. The Response Object will be return in the onSuccess Note: Do not pass this prop if you do not want the component to handle the verificationurl : uri, options: All Request Params,Component: A react Functional Component
referenceUnique reference for each transactiondefault : The component generates ref if prop is not passed

Paystack

PropDescriptionExpected Value
configThis contains information about the payercheck paystack documentation for possible optios

You can check paystack documentation for props you can pass to the component. You can check Flutter Wave documentation for props you can pass to the component.

0.1.13

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago