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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@everypay/googlepay-rn-bridge

v1.0.1

Published

EveryPay Google Pay React Native Bridge (Android Only)

Readme

@everypay/googlepay-rn-bridge

EveryPay Google Pay React Native Bridge (Android Only). Typescript support.

Installation

npm install @everypay/googlepay-rn-bridge
yarn add @everypay/googlepay-rn-bridge

Usage

import {
  GooglePayButton,
  type GooglePayButtonConfig,
  type PaymentProcessResponse
} from '@everypay/googlepay-rn-bridge';

// ...
function App(): React.JSX.Element {

  const config: GooglePayButtonConfig = {
    apiUsername: '<API_USERNAME>',
    apiSecret: '<API_SECRET>',
    apiUrl: '<EVERYPAY_API_URL>',
    environment: "TEST",  // or "PRODUCTION"
    countryCode: "EE",
    currencyCode: "EUR",
    accountName: "<EVERYPAY_ACCOUNT_NAME>",
    allowedCardNetworks: ["MASTERCARD", "VISA"],
    allowedCardAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"]
  }

  const handlePayment = async (res: PaymentProcessResponse) => {
    try{
      console.log('Google Pay payment result: ', res);
    } catch(e: any){
      console.error(`Google Pay error. Code: ${e.code}, message: ${e.message}`);
    }
  };

  return (
      <GooglePayButton
        onPressCallback={handlePayment}
        config={config}
        amount={1}
        theme="dark"
        label="Some test shopping"
        orderReference="ORDER1234"
        customerEmail="[email protected]"
      />
  );
}

Google Pay API Setup

Prerequisites

To use the Google Pay API on Android, your app must meet the following requirements:

  • Must be distributed through the Google Play store
  • Minimum SDK requirements:
    • minSdkVersion: 21 or higher
    • compileSdkVersion: 34 or higher
  • Supports React Native new architecture

Configuration Steps

  1. Enable Google Pay in your app by adding the following meta-data element to your android/app/src/main/AndroidManifest.xml file inside the <application> tag:
<meta-data
  android:name="com.google.android.gms.wallet.api.enabled"
  android:value="true"
/>

Props

GooglePayButton Props

| Prop Name | Type | Description | | ----------------- | ----------------------------------------------------- | ----------------------------------------------- | | onPressCallback | (result: PaymentProcessResponse) => void (optional) | Callback function called after payment process. | | config | GooglePayButtonConfig | Configuration object for Google Pay & EveryPay. | | theme | 'light' \| 'dark' (optional, default: 'dark') | Button theme. | | amount | number | Payment amount. | | label | string | Label for the payment (e.g., product name). | | orderReference | string | Unique reference for the order. | | customerEmail | string | Customer's email address. | | customerIp | string (optional) | Customer's IP address. |

GooglePayButtonConfig Fields

| Field | Type | Description | | ------------------------ | ----------------------------------------------- | ----------------------------------------- | | apiUsername | string | EveryPay API username. | | apiSecret | string | EveryPay API secret. | | apiUrl | string | EveryPay API base URL. | | environment | 'TEST' \| 'PRODUCTION' | Google Pay environment. (default: 'TEST') | | countryCode | string | Country code (e.g., 'EE'). | | currencyCode | string (optional) | Currency code (e.g., 'EUR'). | | accountName | string | EveryPay account name. | | allowedCardNetworks | ('MASTERCARD' \| 'VISA')[] (optional) | Allowed card networks. | | allowedCardAuthMethods | ('PAN_ONLY' \| 'CRYPTOGRAM_3DS')[] (optional) | Allowed card authentication methods. |

PaymentProcessResponse Example

// Success
{
  state: 'success'
}

// Failure
{
  state: 'failed',
  error: {
    name: 'EveryPayGooglePayError',
    code: 'PAYMENT_FAILED',
    message: 'Payment was declined',
    details: { /* optional extra info */ }
  }
}

Important Notes

License

MIT


Made with create-react-native-library Backward-compatibility