Skip to content
payzeioPublic

About

No description, website, or topics provided.

Resources

Stars

9 stars

Watchers

1 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

Repository files navigation


Logo

Payze JS SDK

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
});
Parameters Description
pan Card Number input
name Cardholder Name input
date Expiration Date input
iframeHeight Iframe Height (Default: 200px)
panError Error message for pan (Card number) input
expirationDateError Error message for expiration date input
cardHolderError Error message for Cardholder name
cvvError Error message for CVV/CVC input
cardHolderPlaceholder Placeholder for cardholder name
expirationDatePlaceholder Placeholder for expiration date input
successCallback Success Callback function
errorCallback Fail Callback function
Dependencies Version
Rxjs ^7.5.7

License

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

About

No description, website, or topics provided.

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages