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

ts-payment

v1.0.1

Published

Bootstraped payment portal for RazorPay and Paypal

Downloads

2

Readme

Ts Payment

Bootstraped payment portal for RazorPay and Paypal

Installation

Ts Payment

Ts Payment is available as an npm package.

npm:

npm install ts-payment

yarn:

yarn add ts-payment

Getting started with Ts Payment

Examples

RazorPay :
import * as React from "react";
import PaymentApp from "ts-payment";

const configuration = {
  RPKeyId: "razor_pay_key_id",
  paymentMethod: "RazorPay", // RazorPay or PayPal
  country: "IN", // Counntry Code
  currency: "USD", // Currency Code
  paymentInfo: {
    title: "Welcome to Techsophy Payment",
    // Title to be displayed in payment detail model container
    description: "Bootstraped payment portal for RazorPay and Paypal",
    // Description to be displayed in payment detail model container
    payerName: "John Doe", // Payer Name
    payerMobile: "9999999999", // Payer Mobile Number
    payerEmail: "[email protected]", // Payer Email address
    payerCity: "testCity", // City
    amount: "1", // transaction amount
  },
  RPPaymentValidator: function (event) {},
  // Your code to handle the event from RazorPay
};

function App() {
  return <PaymentApp configuration={configuration} />;
}

Click this link to know how to create RazorPay KeyId.

PayPal :
import * as React from "react";
import PaymentApp from "ts-payment";

const configuration = {
  PPkey: "Paypal_pay_key_id",
  paymentMethod: "PayPal", // RazorPay or PayPal
  country: "IN", // Counntry Code
  currency: "USD", // Currency Code
  paymentInfo: {
    title: "Welcome to Techsophy Payment",
    // Title to be displayed in payment detail model container
    description: "Bootstraped payment portal for RazorPay and Paypal",
    // Description to be displayed in payment detail model container
    payerName: "John Doe", // Payer Name
    payerMobile: "9999999999", // Payer Mobile Number
    payerEmail: "[email protected]", // Payer Email address
    payerCity: "testCity", // City
    amount: "1", // transaction amount
  },
  PPApprove: function (event) {},
  PPCancel: function (event) {},
  PPClick: function ({ data, actions }) {},
  PPError: function (event) {},
  // Your code to handle various event from Paypal
};

function App() {
  return <PaymentApp configuration={configuration} />;
}

Click this link to sign in or sign up the Paypal account.

You can quickly set up your PayPal Key by login to your PayPal account or on to the PayPal app & look for the PayPal key option.

  • Visit the set-up link.

  • Click Let's go.

  • Choose the payment method you want to use with'ur PayPal Key.

  • Click Agree & Get Your Key.

Once you complete the set-up process, you'll be able to view your PayPal Key virtual card number, expiration date & security code. You'll also be able to save the PayPal Key to your browser.

If you are looking to use this package in react typescript template please use "noImplicitAny": false, in your tsconfig.json file to avoid type issues.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.