Skip to content

Commit

Permalink
Release 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardodevries committed Apr 6, 2016
2 parents 37ca527 + 24e446c commit 3335f0b
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 254 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ All notable changes to this project will be documented in this file.

#### v1.1.1 - 2016-04-06
- Update bundled cacert.pem file. Follows Mozilla's recommendations on invalid certificates.
- Changed [README.mdown](README.mdown) installation instructions.
- Changed [README.mdown](README.mdown) installation instructions to follow semantic versioning schema.
34 changes: 17 additions & 17 deletions README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ By far the easiest way to install the Mollie API client is to install it with [n

{
"dependencies": {
"mollie-api-node": "^1.1.0"
"mollie-api-node": "^1.1.1"
}
}

Expand All @@ -41,37 +41,37 @@ To successfully receive a payment, these steps should be implemented:
Requiring the library.

```javascript
Mollie = require("mollie-api-node");
Mollie = require("mollie-api-node");
```

Initializing the Mollie API client, and setting your API key.

```javascript
mollie = new Mollie.API.Client;
mollie.setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
mollie = new Mollie.API.Client;
mollie.setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
```

Creating a new payment.

```javascript
mollie.payments.create({
amount: 10.00,
description: "My first API payment",
redirectUrl: "https://webshop.example.org/order/12345/"
}, function (payment) {
response.writeHead(302, { Location: payment.getPaymentUrl() })
});
mollie.payments.create({
amount: 10.00,
description: "My first API payment",
redirectUrl: "https://webshop.example.org/order/12345/"
}, function (payment) {
response.writeHead(302, { Location: payment.getPaymentUrl() })
});
```

Retrieving a payment.

```javascript
mollie.payments.get(
payment.id
, function (payment) {
if (payment.isPaid())
console.log("Payment received.");
});
mollie.payments.get(
payment.id
, function (payment) {
if (payment.isPaid())
console.log("Payment received.");
});
```

## Want to help us make our API client even better? ##
Expand Down
Loading

0 comments on commit 3335f0b

Please sign in to comment.