npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-paymob

v0.3.28

Published

react native paymob sdk

Downloads

90

Readme

react-native-paymob

react native paymob sdk

Installation

yarn add https://github.com/a-eid/react-native-paymob

IOS

IOS installation is almost automatic, the one thing you need to do is to create an empty Swift file in your project.

Screen Shot 2021-06-23 at 4 55 15 PM

Screen Shot 2021-06-23 at 4 55 27 PM

file name does not matter ( I think )

Screen Shot 2021-06-23 at 4 55 34 PM

choose create bridging header.

Screen Shot 2021-06-23 at 4 55 38 PM

there should be a swift file and a bridging header in your project.

Screen Shot 2021-06-23 at 4 56 33 PM

Android

1- in AndroidManifest.xml

  • add xmlns:tools="http://schemas.android.com/tools" to manifest tag
  • make sure to have these 2 attributes in the application tag android:supportsRtl="false" tools:replace="android:supportsRtl, android:allowBackup"
  • make sure to have the following values in android/app/res/values/colors.xml ( create the file if you don't have it already )
  <resources>
     <color name="white">#FFF</color>
     <color name="colorPrimary">#6200EE</color>
     <color name="colorPrimaryDark">#03DAC5</color>
     <color name="colorAccent">#03DAC5</color>
     <color name="ThemeColor"> 	#FF0000 </color>
   </resources>

Usage

import { Paymob, useDidDismissPaymob } from 'react-native-paymob';

useDidDismissPaymob(
	// make sure to not use destruction here  to get proper typing.
	// & use React.useCallback
  React.useCallback((data) => {
    console.log(data);
  }, [])
);


// some event handler
   Paymob.presentPayVC({
      billingData: {
        apartment: 'NA',
        email: 'NA',
        floor: 'NA',
        first_namae: 'NA',
        street: 'NA',
        building: 'NA',
        phone_number: 'NA',
        shipping_method: 'NA',
        postal_code: 'NA',
        city: 'NA',
        country: 'NA',
        last_name: 'NA',
        state: 'NA',
      },
      paymentKey: "your payment key",
      saveCardDefault: false,
      showSaveCard: false,
      showAlerts: false,
      isEnglish: true,
      showScanCardButton: false,
    });

Note

the library was created to cover our use case only, but we are open to adding more features if we have the time.

Contributing

All Pull Requests are welcome See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT