up-payment-service-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

payment-service-sdk

SDK for integrating UrbanPiper payment service into your application

Installation

Run npm install up-payment-service-sdk in your terminal

Usage

  1. First initialize the SDK
import PgService from 'up-payment-service-sdk';

PgService.init(params: PgServiceConfig);
  1. Get the list of gateways associated for your account
const resp = await PgService.gateways();
  1. Process the payment with your gateway of choice e.g. Razorpay
import PgService, { RazorpayService } from 'up-payment-service-sdk';

// init payment
const resp = await PgService.initPayment(params: InitPayment);

// init razorpay class
const rzp = new RazorpayService(params: RazorpayServiceConstructor);

// open pg
const resp = await rzp.openPG(params: OpenPG);

// capture payment
const resp = await rzp.capturePayment();

Package Sidebar

Install

npm i up-payment-service-sdk

Weekly Downloads

9

Version

0.0.3

License

MIT

Unpacked Size

53.8 kB

Total Files

11

Last publish

Collaborators

  • sajanurbanpiper