1.4.1 • Published 6 months ago

expo-paypal v1.4.1

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Expo-Paypal

Paypal integration with expo ReactNative by Zeeshan Karim

Installation :

npm i expo-paypal 

Usage :

Before using this package please make sure your props are valid and all the required info are filled up in paypal.html inside package folder

    import PayPal from "expo-paypal";

    const PaymentScreen=()=>{


  const sendPayment = async (startProcess) => {
      if (amount === null) {
        alert("Please enter amount")
        return;
      }
      startProcess()
    };


    <View style={{flex:1}}>
     <PayPal
        popupContainerStyle={{ height: 400 }}
        onPress={(startProcess) => sendPayment(startProcess)}
        title="Submit"
        buttonStyles={styles?.Button}
        btnTextStyles={styles?.text}
        amount={23}//i.e $20
        success={(a) => {
              //callback after payment has been successfully compleated
              console.log(a)
        }}
        failed={(a) => {
              //callback if payment is failed
              console.log(a)
        }}
        />
    </View>
    }

Props

  • amount : Total amount that is payed through paypal. (Required)-(STRING OR NUMBER)
  • popupContainerStyle={}
  • buttonStyles={}
  • btnTextStyles={}
  • success : Callback that is fired after transaction has been Successful. (Optional)-(FUNCTION)
  • failed : Callback that is fired if transaction has is failed. (Optional)-(FUNCTION)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

1.2.0

6 months ago

1.2.4

6 months ago

1.4.1

6 months ago

1.2.3

6 months ago

1.4.0

6 months ago

1.2.2

6 months ago

1.3.0

6 months ago

1.2.1

6 months ago

1.1.2

1 year ago

1.1.1

1 year ago

1.0.0

1 year ago