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-yoco

v0.2.8

Published

The Yoco SDK allows app developers to integrate with Yoco card machines to accept in-person payments from within their application. The most common scenario is to accept Yoco payments from within your Point of Sale application.

Downloads

196

Readme

yoco-react-native-banner

React Native Yoco

The Yoco SDK allows app developers to integrate with Yoco card machines to accept in-person payments from within their application. The most common scenario is to accept Yoco payments from within your Point of Sale application.

This react native module is a wrapper around the native Yoco SDKs for iOS and Android, powered by Expo Modules.

Limitations

  • Printing and handling receipts is not supported yet
  • Only works using physical devices (not simulators)

Requirements

  • Please see the Yoco documentation for the latest requirements.
  • This is an Expo Module, therefore you need to install Expo in your project. Please see the Expo documentation for more information on this.

Installation

  • Install the package from npm:
npx expo install react-native-yoco
npx expo prebuild
  • If your app is to be installed on a Yoco device, additional steps are needed. If you are not installing it on a special Yoco device, please ignore this and the rest of the steps. Install expo-gradle-ext-vars:
npx expo install expo-gradle-ext-vars
  • Configure the plugin. expo-gradle-ext-vars will automatically be added as a plain string from the installation command above. Replace that string with this array:
[
  "expo-gradle-ext-vars",
  {
    "yocoDevice": true
  }
]

yocoDevice must be set to true if you are installing on a Yoco device

So your plugins should look something like this (if you have other plugins, they will be there too):

"plugins": [
      "react-native-yoco",
      [
        "expo-gradle-ext-vars",
        {
          "yocoDevice": true,
        }
      ],
]

Android

The PaymentsSDK uses the Data Binding Library and therefore requires any module using the library to enable data binding. https://developer.android.com/jetpack/androidx/releases/databinding

Also you will need to add the remote repository (maven url) to your gradle dependencies in your build.gradle

    repositories {
        mavenCentral()
        +maven { url 'https://yocotechnologies.jfrog.io/artifactory/public/' }
   }

iOS

  • You need to add the following in your Podfile, under ios:
  post_install do |installer|
    # This overrides YocoSDK deployment target to make it compatible
    # with expo modules
    installer.pods_project.targets.each do |target|
      if target.name == 'YocoSDK'
        target.build_configurations.each do |config|
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
        end
      end
    end

    # This is needed for Apple Silicon
    # see https://gitlab.com/yoco-public/yoco-sdk-mobile-ios/-/issues/1
    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
  end

License

MIT license. For more information, see the LICENSE file.