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

react-native-onepay

v0.2.2

Published

Hash secure key and generate pay url for onepay

Readme

react-native-onepay

Hash secure key and generate pay url for onepay

Installation

npm install react-native-onepay

or

yarn add react-native-onepay

Usage

import OnepayHash from 'react-native-onepay-hash';

const [result, setResult] = useState<string>();

useEffect(() => {
  OnepayHash.generateURL({
    version: '2',
    command: 'pay',
    accessCode: '6BEB2546',
    merchant: 'TESTONEPAY',
    locale: 'en',
    returnUrl: 'https://localhost/returnurl',
    orderInfo: '123214125125',
    amount: '1000000',
    title: 'Test Payment',
    currency: 'VND',
    secretKey: '6D0870CDE5F24F34F3915FB0045120DB',
    baseUrl: 'https://mtf.onepay.vn/',
    merchTxnRef: new Date().getTime().toString(),
    againLink: 'https://scanme.eastplayers.io/cancel-payment',
    cardList: 'INTERNATIONAL',
  }).then((res) => setResult(res));
}, []);

 // ...

Props

| Prop | Type | Default | Note | |---|---|---|---| | version | String | 2 | Version module of payment gateway | | command | String | pay | Payment Function, value is “pay” | | accessCode | String | | Unique value for each merchant provided by OnePAY | | merchant | String | | Unique value for each merchant provided by OnePAY | | locale | String | | Language is used on the payment site Vietnamese: vn, English: en | | returnUrl | String | | Merchant’s URL Website for redirectresponse | | orderInfo | String | | Order infomation, it could be an order number or brief description of order | | amount | String | | The amount of the transaction, this value does not have decimal comma. Add “00” before redirect to payment gateway. If transaction amount is VND 25,000 then the amount is 2500000 (Add "00" will be handled by the package) | | title | String | | Title of payment gateway is shown on the cardholder’s browser | | currency | String | | Payment Currency | | secretKey | String | | | | baseUrl | String | | | | merchTxnRef | String | | A unique value is created by merchant then send to OnePAY | | againLink | String | | The link of website before redirecting to OnePAY | | cardList | INTERNATIONAL, DOMESTIC | | | | customerId? | String | | Customer's id. This one will be used to save customer's card on OnePAY | | customerEmail? | String | | Customer's email | | customerPhone? | String | | Customer's phone |

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT