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

payment-providers

v0.0.8

Published

Purple Style Labs - Core PaymentProviders Plugin

Downloads

9

Readme

Purple Style Labs - Core PaymentProviders Plugin

Project Scope

The project will fulfill the following requirments

  • View payment providers for Tenant
  • Apply Tenant's config to payment providers
  • Integrate various payment providers
  • Give appropriate hooks to apply styling for Tenant

Contributing

Please read CONTRIBUTING to get started


Usage

npm i payment-providers
yarn add payment-providers

Please checkout the demo file to get started.

Available Providers PaymentProvider

  • Razorpay: rzp
  • PayPal: ppl
  • CC Avenue: cca

These codes are used to identify payment providers in the PaymentProviders array


<paymentProviders> Component

Top level configuration for our paymentProviders system. It accepts config:PaymentProvidersConfig as a prop.

This is the only component you will need to import and use as a site developer.

<paymentProviders
  :config="config"
  @success="successHandler"
  @error="errorHandler"
  @dismiss="dismissHandler"
/>

Config :PaymentProvidersConfig

config: {
  siteName: String,
  paymentProviders: ['rzp', 'ppl'],
  payerData: Object,
  orderData: Object,
  tenantData: Object,
  razorpayConfig: RazorpayConfig,
  paypalConfig: PaypalConfig
}

paymentProviders Required : Ordered array of Payment providers. Set this to add/remove/order payment options

razorpayConfig Required if rzp in paymentProviders : Configuration options for RazorPay

paypalConfig Required if ppl in paymentProviders : Configuration options for PayPal


PaymentProviders Events

success error dismiss

Razorpay Configuration :RazorpayConfig

Details for Razorpay integration. Check Razorpay Docs for more details

 razorpayConfig: {
  key: 'YOUR_KEY_ID',
  name: 'Acme Corp',
  description: 'Test Transaction',
  image: 'https://example.com/your_logo',
  theme: {
    color: '#3399cc',
  },
},

key Required : Key ID generated from the Dashboard

name : Name of company as set in Razorpay Dashboard

prefill : Prefeill client details. Can be Empty

theme : Theme color of site

image : Site logo. Must be an absolute path.

amount Not Required Auto-set by backend : The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be 29935.


PayPal Configuration :PaypalConfig

Details for PayPal integration. Check Paypal Docs for more details

 paypalConfig: {
   key: String
 },

key Required : Key ID generated from the Dashboard


Sub-Component Definitions

Only for internal use. Not exporeted outside component scope.

<razorpay> Component

<razorpay :config="config.razorpayConfig" />

<paypal> Component

<paypal :config="config.paypalConfig" />