GithubHelp home page GithubHelp logo

heinrich-fresh / rxp-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from globalpayments/rxp-js

0.0 0.0 0.0 114 KB

Global Payments Ecommerce JavaScript Library

License: MIT License

JavaScript 100.00%

rxp-js's Introduction

Realex JS Library

You can sign up for a Realex account at https://developer.realexpayments.com

Hosted Payment Page (HPP) JS Library

Usage

The Javascript required to initialise the library is below. This code must only be executed when the DOM is fully loaded.

RealexHpp.init(payButtonId, merchantUrl, jsonFromServerSdk);
  • payButtonId - The ID of the button used to launch the lightbox.
  • merchantUrl - The URL to which the JSON response from Realex will be posted.
  • jsonFromServerSdk - The JSON output from the Realex HPP Server SDK.

Consuming the resulting POST

Once the payment has completed the Realex JSON response will be posted within to the supplied merchantUrl. The name of the field containing the JSON response is hppResponse.

Remote JS Library

Validation functions

  • validateCardNumber - validates card number format and performs a Luhn check
  • validateCardHolderName - validates card holder name is made up from ISO/IEC 8859-1:1998 characters
  • validateCvn - validates non-Amex CVN
  • validateAmexCvn - validates Amex CVN
  • validateExpiryDateFormat - validates expiry date format
  • validateExpiryDateNotInPast - validates expiry date is not in past

Usage

RealexRemote.validateCardNumber(cardNumber);
RealexRemote.validateCardHolderName(cardHolderName);
RealexRemote.validateCvn(cvn);
RealexRemote.validateAmexCvn(amexCvn);
RealexRemote.validateExpiryDateFormat(expiryDate);
RealexRemote.validateExpiryDateNotInPast(expiryDate);

License

See the LICENSE file.

rxp-js's People

Contributors

slogsdon avatar realexitso avatar seanmacdomhnall avatar heinrich-fresh avatar psyked avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.