Coder Social home page Coder Social logo

heartland-tokenization-jquery-library's Introduction

PCI Friendly Card Tokenization

This plugin allows you to use your SecureSubmit Public API Key to convert a credit card into a secure Token which can be charged in a PCI friendly way.

Refer to the Heartland Payment Systems SecureSubmit website for examples.

Usage

Just include this script after jQuery. Requires jQuery 1.4+.

<script src='jquery.js'></script>
<script src='jquery.securesubmit.js'></script>

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

heartland-tokenization-jquery-library's People

Contributors

chessmess avatar markhagan avatar russelleverett avatar securesubmit-buildmaster avatar slogsdon avatar zacharylund avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

heartland-tokenization-jquery-library's Issues

'Unexpected token o' on requests

Following the example of iframe/jquery hybrid implementation example from https://github.com/hps/heartland-example-code and Heartland API docs, anytime the iframe form is submitted an 'Unexpected token o' is thrown.

This happens becausea an object and not a string is passed into JOSN.parse on line 540:

            HPS.Messages.receiveMessage(function(m){
                var data = JSON.parse(m.data); //m.data is not a string
                switch(data.action) {
                    case 'tokenize': {
                        HPS.tokenize_iframe(data.message);
                        break;
                    }
                    case 'setStyle': {
                        HPS._setStyle(data.id, data.style);
                        HPS._resizeFrame();
                        break;
                    }
                    case 'appendStyle': {
                        HPS._appendStyle(data.id, data.style);
                        HPS._resizeFrame();
                        break;
                    }
                    case 'setText': {
                        HPS._setText(data.id, data.text);
                        HPS._resizeFrame();
                        break;
                    }
                    case 'setPlaceholder': {
                        HPS._setPlaceholder(data.id, data.text);
                        break;
                    }
                }
            }, '*');

Here is a jsfiddle example.

Looking at the commit history this was a recent change (last 14 days at the time of writing this) that changed/added the JSON.parse. The previous commit works as expected.

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.