0.2.0 • Published 8 months ago

paypal-fee v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

paypal-fee

Package Version Code Coverage

NOTE: PayPal has significantly changed their fee structure, this module needs to be rewritten to be useful as of today.

features

  • Written in TypeScript
  • Less than 2kB of code
  • No runtime dependencies
  • Supports ESM and CommonJS
  • Comprehensive integration tests

requirements

  • Node 16+

usage

To use this module, simply install it using your favorite package manager and then import the calculateFee function.

calculateFee takes a payment value in USD and a PaymentType, and returns a fee amount in USD.

Payment types are as follows:

example

import { calculateFee, PaymentType } from 'paypal-fee';

const fee = calculateFee(100, PaymentType.GoodsAndServices);

console.log(fee);

will output 3.98.

0.2.0

8 months ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

2 years ago

0.1.0

2 years ago