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

epay-payment-widget

v1.1.1

Published

Payment widget of epay, Halyk bank's online payment service

Downloads

20

Readme

Epay Widget

EpayPaymentWidget

react version GitHub license npm size

React Component of Epay Payment Widget

Documentation

Official documentation is on Epay halyk. This is a wrapper component for react.

Installation

npm i epay-payment-widget

Example

import {EpayPaymentWidget} from 'epay-payment-widget';
...
const [showWidget, setShowWidget] = useState(false);
...
<EpayPaymentWidget
    visible={showWidget}
    clientId='CLIENT_ID'
    clientSecret='CLIENT_SECRET'
    // oauthData={{}}
    terminalId='TERMINAL_ID'
    amount={500}
    paymentData={data}
    invoiceId={invoiceId}
    onWidgetClose={() => {}}
    devMode />

Props

| Property | Description | Type | Required | Default | |-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|-----------------------------------------------------------------------------------|------------------------------------| | visible | Open/close widget | boolean | yes | false | | clientId | Your client id from epay | string | yes, if oauthData is not specified. No, if oauthData is specified | | | clientSecret | Your client secret from epay | string | yes, if oauthData is not specified. No, if oauthData is specified | | | terminalId | Your terminal id from epay, which terminal you want to use | string | yes | | | amount | amount of money, cost | number | yes | | | invoiceId | Your invoice id | string | no | '' + new Date().valueOf() | | onWidgetClose | callback, which calls when widget closes. Accepts as a parameter object {success: boolean}. Weather of success based on the results of payment processing | function | no | function ({success: boolean}) {} | | devMode | There is two modes: dev and prod. If you use devMode you will work in a development environtment | boolean | no | false | | paymentData | List of payment parameters from official documentation | object | no, if you specify this object it will be priority | {} | | oauthData | Oauth object for payment processing from epay | object | yes, if clientId and clientSecret is not specified. No, if they are specified | |

If you need to get oauth object from backend, you can get that object from backend and pass it to the oauthData prop

paymentData

If you specify the properties of this object, it will be priority than above props

| Property | Description (in russian) | Type | Required | Default | |-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|---|---------| | invoiceId | Номер заказа, генерируется коммерсантом, должен быть уникальный для каждого нового заказа,от 6 до 15 цифр. Если ваш номер заказа содержит более 6 символов, то дополнительно уникальность должна соблюдаться по последним 6ти символам | string | no | | | invoiceIdAlt | альтернативный номер заказа, генерируется коммерсантом, должен быть уникальный для каждого нового заказа,от 6 до 15 цифр. | string | no | | | backLink | Ссылка для возврата в магазин при удачном платеже | string | no | | | failureBackLink | Ссылка для возврата в магазин при не удачном платеже | string | no | | | postLink | Уведомление о платеже | string | no | | | failurePostLink | Уведомление о неудачном платеже, если не заполнено, то информация будет отправленна на адрес указанный в postLink | string | no | | | language | Язык rus/kaz/eng | string | no | rus | | description | Описание заказа, допустимое количество символов 125 байтов | string | no | | | accountId | Не обязательное поле для указание идентификатора клиента магазина | string | no | | | terminal | Идентификатор магазина | string | no | | | amount | Сумма заказа | number | no | | | name | имя плательщика, только на латинице (не обязательно) | string | no | | | currency | Валюта | string | no | KZT | | data | дополнительное поле транслируется в отчете при заполнении (необязательно) | string | no | |

License

MIT