1.3.1 • Published 6 months ago

@payze/payze-js v1.3.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

comment: <> (Stargazers)

comment: <> ( )

comment: <> ( View Demo)

comment: <> ( ·)

comment: <> ( Report Bug)

comment: <> ( )

About The Project

Payze is the best software platform for running an internet business. We handle money movement flow for our customers by giving them tools they need.

Getting Started

Installation

  1. Install payze package in your project
    npm install @payze/payze-js

Basic Usage

  1. Import payze-js SDK
    import {Payze} from "@payze/payze-js";
  2. initialize payze
    const payze = Payze('transactionId', {});
  3. include following html

    <div id="card">
      <div id="card-info">
    
      </div>
    </div>
  4. Render Card Elements

     payze.renderCardInfo();
  5. Validate Card Elements
     this.payze.validateCardInfo().subscribe((valid) => {
       this.valid = valid; // true or false
     });
  6. Pay functionality
     payze.pay();

Customization

// Payze SDK accepts 2 arguments: transactionId and styles object
// styles object is optional and can be used to customize card inputs
// Example usage: 
const payze = Payze('transactionId', {
  pan: 'font-size: 20px;',
  name: 'background-color: red;',
  date: 'font-size: 20px;background-color: #f00;',
  cvv: 'font-size: 20px;color: #f00;border-radius: 10px;',
  iframeHeight: '400', // height of iframe in pixels (default: 200)
  panError: 'Card number is invalid!', // error message for pan input
  expirationDateError: 'Date is invalid!', // error message for expiration date input
  cardHolderError: 'Cardholder name is required!', // error message for cardholder name input
  cvvError: 'CVV/CVC is required!', // error message for cvv/cvc input
  cardHolderPlaceholder: 'Cardholder Name', // placeholder for cardholder name input
  expirationDatePlaceholder: 'MM/YY', // placeholder for expiration date input
  successCallback: successCallbackFunction, // success callback
  errorCallback: errorCallbackFunction, // error callback
});
ParametersDescription
panCard Number input
nameCardholder Name input
dateExpiration Date input
iframeHeightIframe Height (Default: 200px)
panErrorError message for pan (Card number) input
expirationDateErrorError message for expiration date input
cardHolderErrorError message for Cardholder name
cvvErrorError message for CVV/CVC input
cardHolderPlaceholderPlaceholder for cardholder name
expirationDatePlaceholderPlaceholder for expiration date input
successCallbackSuccess Callback function
errorCallbackFail Callback function
DependenciesVersion
Rxjs^7.5.7

License

Distributed under the MIT License. See LICENSE.txt for more information.

1.3.1

6 months ago

1.3.0

6 months ago

1.2.0

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.1.23

1 year ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.22

1 year ago

1.1.21

1 year ago

1.1.20

1 year ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.0.9

2 years ago

1.1.7

2 years ago

1.0.8

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.0

3 years ago