Socket
Socket
Sign inDemoInstall

mollie-es6

Package Overview
Dependencies
23
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mollie-es6

Mollie module ready for ES6 usage


Version published
Weekly downloads
4
decreased by-66.67%
Maintainers
1
Install size
2.06 MB
Created
Weekly downloads
 

Readme

Source

Mollie ES6 API client for Node.js

Mollie API made ready for ES6 usage.

You can see a list of implemented functions at the bottom. Till Version 1.0.0, this is WIP

Requirements

To use the Mollie API client, the following things are required:

  • Node.js v4.4.2 or higher
  • You can Sign up here for free.

Installation

You can install this module with NPM:

npm install mollie-es6

Getting started

Examples are in Express.js

Import the library.

    import mollie from 'mollie-es6';

Set the basics needed

    mollie.api_key = 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM';

All callback functions now return promises, which you can either yield in a try / catch or resolve itfoo.then().catch()

Create a new payment.

    try {
        const payment = yield mollie.payments.create({
            amount:      10.00,
            description: "My first API payment",
            redirectUrl: "https://webshop.com/api/payments/response"
        });
        res.redirect(payment.getPaymentUrl());
    } catch (e) {
        // Handle error
    }

Retrieving a payment.

    try {
        const payment = yield mollie.payments.get(payment.id);
        if(payment.isPaid()) {
            console.log('Payment is paid');
        }
    } catch (e) {
        // Handle error
    }

Implemented Functions

Payments

FunctionalityImplemented
CreateYes
GetYes
ListYes

Methods

FunctionalityImplemented
ListYes
GetYes

Issuer

FunctionalityImplemented
ListYes
GetYes

Refunds

FunctionalityImplemented
CreateYes
GetYes
ListYes
CancelYes

Keywords

FAQs

Last updated on 12 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc