Code Monkey home page Code Monkey logo

secure-fields-sample's Introduction

Secure Fields examples

This project contains sample code for implementing a visually pleasing credit card form.

Further information can be found here:

Online demo

Visit the online demo here.

Note: Please only ever use secureFields.initTokenize(...) if you are a PCI Proxy customer.

React examples

For PCI Proxy customers

An example of how to integrate Secure Fields with React applications can be found in the react-example-initTokenize folder.

For Datatrans Payment Gateway customers

An example of how to integrate Secure Fields with React applications can be found in the react-example-init folder.

Angular examples

For PCI Proxy customers

An example of how to integrate Secure Fields with Angular 14 applications can be found in the angular-14-example folder.

secure-fields-sample's People

Contributors

crmatei avatar dmengelt avatar joebeeplanet avatar n3ssi3 avatar pstadler avatar richiehug avatar stavpanos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

secure-fields-sample's Issues

No npm library?

Hi Datatrans team,

It would seem the only way to load this library is over the minified cdn link, is that correct?

Is there a reason this isn't distributed through npm?

Thank you for your time.

Chris

Available version react hooks

Good afternoon, you have the react version with classes, but have you tried doing the same exercise with react hooks?

I appreciate your help.

Documentation for types of fields

Is there a link to the full documentation for secure fields? I have only found examples with the card number and CVV, but what about the expiration date and month? Are they not needed for this method of payment process?

Missing dependencies in useEffect in react-example-initTokenize

Problem Description

I am trying to use the react-example-initTokenize sample provided. I noticed that there are missing dependencies in the array in useEffect in the code.

Example 1

In the code below, the useEffect is missing 4 dependencies which are:
Here is a link to the code: https://github.com/datatrans/secure-fields-sample/blob/master/react-example-initTokenize/src/SecureFields.js#L51
cleanupSecureFields, initSecureFields, production, secureFields .

image

Example 2

In the code below, the useEffect is missing some dependancies: cardContainerClassNames, cvvContainerClassNames, secureFields
Here is a link to the code: https://github.com/datatrans/secure-fields-sample/blob/master/react-example-initTokenize/src/SecureFields.js#L73
image

Proposed Solution:

I believe that the dependencies should be added to avoid rendering bugs.

Input field triggers blur event on focus on ios safari and chrome

Hey guys :) I am using your react example in my project and I am putting it inside a Formik component. On IOS safari and chrome, whenever I click the CC field, the field loses focus and immediately emits a blur event. I have to click on the field around 3 times to make it focus. I cannot show a reproduction of the issue as it is internal code. Do you guys have any idea why would this happen ?

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.