GithubHelp home page GithubHelp logo

monei / monei-payments-demo Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 1.0 2.77 MB

Sample store accepting universal payments on the web with MONEI

Home Page: https://payments-demo.monei.com

JavaScript 44.68% CSS 3.91% Handlebars 51.41%
monei monei-components node javascript payments payment-methods payment-request card-payments accept-payments monei-payments monei-account

monei-payments-demo's Introduction

MONEI Payments Demo

This demo features a sample e-commerce store that uses MONEI Components and the Payments API to illustrate how to accept Credit Card, Bizum, PayPal, Apple Pay, Google Pay payments on the web.

You can see this demo app running in test mode on payments-demo.monei.com.

Overview

MONEI Payments Demo Preview

This demo provides an all-in-one example for integrating with MONEI on the web:

Features
Beautiful UI components for Credit Card, Bizum, 4xcard by Cofidis, PayPal, Apple Pay, Google Pay payments. This demo uses pre-built MONEI Components customized to fit the app design, including the Card Input Component which provides real-time validation, formatting, and autofill.
🔐 Dynamic 3D Secure for Visa and Mastercard. The app automatically handles the correct flow to complete card payments with 3D Secure, whether it’s required by the card.
🚀 Built-in proxy for local HTTPS and webhooks. Card payments require HTTPS and asynchronous payment methods with redirects rely on webhooks to complete transactions—ngrok is integrated so the app is served locally over HTTPS.
🔧 Webhook signing. We allow for webhook signature verification, which is a recommended security practice.
📱 Responsive design. The checkout experience works on all screen sizes.

Payments Integration with MONEI Components

The frontend code for the demo is in the public/ directory.

The core logic of the MONEI integration is mostly contained within two files:

  1. public/javascripts/payment.js initializes and renders MONEI Components for different payment methods
  2. server/routes.js defines the routes on the backend that create MONEI payments and receive payment results with the callback.

Getting Started with Node

You’ll need the following:

  • Node.js >=10.0.0
  • Modern browser that supports ES6.
  • MONEI account to accept payments (sign up for free).

Running the Node Server

Copy the environment variables file from the root of the repository:

cp .env.example .env

Update .env with your own MONEI Account ID and API key and. These environment variables are loaded and used in server/config.js.

Install dependencies using npm:

npm install

Start the local server:

npm run start

Lastly, you will see the ngrok URL to serve our app via HTTPS. For example:

https://<example>.ngrok.io

Use this URL in your browser to start the demo.

Deploy

monei-payments-demo's People

Contributors

jcuervas avatar jimmyn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hwakstar

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.