Skip to content

Commit

Permalink
Release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vernondegoede committed Jul 25, 2018
1 parent 8c488bb commit fdb35a9
Show file tree
Hide file tree
Showing 5 changed files with 314 additions and 36 deletions.
Empty file added CHANGELOG.MD
Empty file.
38 changes: 35 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ Please go to the [signup page](https://www.mollie.com/signup) to create a new Mo
3. [Installation](#installation)
4. [Configuring Mollie Gateway](#configuring-mollie-gateway)
5. [API endpoints](#api-endpoints)
6. [Upgrading](#upgrading)
6. [API documentation](#api-documentation)
6. [Want to help us make our API client even better?](#want-to-help-us-make-our-api-client-even-better)
6. [License](#license)
7. [Support](#support)

## Features

* Support for all available Mollie payment methods.
* Multicurrency payments
* Support for [one-click payments](https://www.mollie.com/en/features/checkout).
* Fast in-house support. You will always be helped by someone who knows our products intimately.
* Multiple translations: English and Dutch.
Expand Down Expand Up @@ -60,13 +65,40 @@ bundle exec rails g spree_mollie_gateway:install
7. Save and you're done!

## API endpoints
This gateway comes with a couple of API endpoints which seamlessly integrate with the Spree API.
This gateway comes with a couple of API endpoints which seamlessly integrate with the [Spree API](https://guides.spreecommerce.org/api/).

- <a href="docs/api">Overview of available API endpoints.</a>

## Upgrading

- <a href="docs/migration_v1_x.md">Migration from v1.x</a>
- <a href="docs/migration_v1_x.md">Migration from v1.x</a>

## API documentation

If you wish to learn more about our API, please visit the [Mollie API Documentation](https://docs.mollie.com).

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

Want to help us make our API client even better? We take [pull requests](https://github.com/mollie/mollie-api-ruby/pulls?utf8=%E2%9C%93&q=is%3Apr), sure. But how would you like to contribute to a technology oriented organization? Mollie is hiring developers and system engineers. [Check out our vacancies](https://jobs.mollie.com/) or [get in touch](mailto:[email protected]).

## License
BSD (Berkeley Software Distribution) License. Copyright (c) 2014-2018, Mollie B.V.
[BSD (Berkeley Software Distribution) License](https://opensource.org/licenses/bsd-license.php). Copyright (c) 2014-2018, Mollie B.V.

## Support
Contact: [www.mollie.com](https://www.mollie.com)[email protected] — +31 20-612 88 55

+ [More information about iDEAL via Mollie](https://www.mollie.com/en/payments/ideal/)
+ [More information about Credit card via Mollie](https://www.mollie.com/en/payments/credit-card/)
+ [More information about Bancontact via Mollie](https://www.mollie.com/en/payments/bancontact/)
+ [More information about SOFORT Banking via Mollie](https://www.mollie.com/en/payments/sofort/)
+ [More information about SEPA Bank transfer via Mollie](https://www.mollie.com/en/payments/bank-transfer/)
+ [More information about SEPA Direct debit via Mollie](https://www.mollie.com/en/payments/direct-debit/)
+ [More information about Bitcoin via Mollie](https://www.mollie.com/en/payments/bitcoin/)
+ [More information about PayPal via Mollie](https://www.mollie.com/en/payments/paypal/)
+ [More information about KBC/CBC Payment Button via Mollie](https://www.mollie.com/en/payments/kbc-cbc/)
+ [More information about Belfius Direct Net via Mollie](https://www.mollie.com/en/payments/belfius)
+ [More information about paysafecard via Mollie](https://www.mollie.com/en/payments/paysafecard/)
+ [More information about ING Home’Pay via Mollie](https://www.mollie.com/en/payments/ing-homepay/)
+ [More information about Gift cards via Mollie](https://www.mollie.com/en/payments/gift-cards)
+ [More information about EPS via Mollie](https://www.mollie.com/en/payments/eps)
+ [More information about Giropay via Mollie](https://www.mollie.com/en/payments/giropay)
4 changes: 3 additions & 1 deletion app/controllers/spree/api/v1/mollie_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ module V1
class MollieController < BaseController
def methods
mollie = Spree::PaymentMethod.find_by_type 'Spree::Gateway::MollieGateway'
payment_methods = mollie.available_methods methods_params
payment_methods = mollie.available_methods(methods_params).map {
|method| method.attributes
}

render json: payment_methods
end
Expand Down
306 changes: 275 additions & 31 deletions docs/api/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@

Returns a list of Mollie payment methods (and its issuers) which are enabled for your website profile.

## Headers

This endpoint behaves just like very other Spree API endpoint. If your endpoints require authentication, make sure you send the `X-Spree-Token` header.

## Parameters
This endpoint behaves just like very other Spree API endpoint. If your endpoints require authentication, make sure you sent the `X-Spree-Token` header.

If you would like to obtain a list of payment methods for a specific currency, you should send an `amount` object containing value and currency. Only methods that support the `amount` and `currency` are returned.

| URL Parameter | Required? |
| -------------------- | ----------:|
| amount[currency] | No |
| amount[value] | No |

## Example request

Expand All @@ -20,40 +30,274 @@ Content-Type: application/json; charset=utf-8

[
{
"attributes": {
"resource": "method",
"id": "ideal",
"description": "iDEAL",
"amount": {
"minimum": "0.01",
"maximum": "50000.00"
},
"image": {
"normal": "https://www.mollie.com/images/payscreen/methods/ideal.png",
"bigger": "https://www.mollie.com/images/payscreen/methods/ideal%402x.png"
},
"issuers": [
{
"resource": "issuer",
"id": "ideal_TESTNL99",
"name": "TBM Bank",
"method": "ideal",
"image": {
"normal": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/TESTNL99.png",
"bigger": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/TESTNL99%402x.png"
}
}
]
},
"resource": "method",
"id": "ideal",
"description": "iDEAL",
"amount": {
"minimum": "0.01",
"maximum": "50000.00"
"image": {
"size1x": "https://www.mollie.com/images/payscreen/methods/ideal.png",
"size2x": "https://www.mollie.com/images/payscreen/methods/ideal%402x.png"
},
"issuers": [
{
"resource": "issuer",
"id": "ideal_ABNANL2A",
"name": "ABN AMRO",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/ABNANL2A.png",
"size2x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/ABNANL2A.png"
}
},
{
"resource": "issuer",
"id": "ideal_ASNBNL21",
"name": "ASN Bank",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/ASNBNL21.png",
"size2x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/ASNBNL21.png"
}
},
{
"resource": "issuer",
"id": "ideal_BUNQNL2A",
"name": "bunq",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/BUNQNL2A.png",
"size2x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/BUNQNL2A.png"
}
},
{
"resource": "issuer",
"id": "ideal_INGBNL2A",
"name": "ING",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/INGBNL2A.png",
"size2x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/INGBNL2A.png"
}
},
{
"resource": "issuer",
"id": "ideal_KNABNL2H",
"name": "Knab",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/KNABNL2H.png",
"size2x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/KNABNL2H.png"
}
},
{
"resource": "issuer",
"id": "ideal_MOYONL21",
"name": "Moneyou",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/MOYONL21.png",
"size2x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/MOYONL21.png"
}
},
{
"resource": "issuer",
"id": "ideal_RABONL2U",
"name": "Rabobank",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/RABONL2U.png",
"size2x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/RABONL2U.png"
}
},
{
"resource": "issuer",
"id": "ideal_RBRBNL21",
"name": "RegioBank",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/RBRBNL21.png",
"size2x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/RBRBNL21.png"
}
},
{
"resource": "issuer",
"id": "ideal_SNSBNL2A",
"name": "SNS Bank",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/SNSBNL2A.png",
"size2x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/SNSBNL2A.png"
}
},
{
"resource": "issuer",
"id": "ideal_TRIONL2U",
"name": "Triodos Bank",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/TRIONL2U.png",
"size2x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/TRIONL2U.png"
}
},
{
"resource": "issuer",
"id": "ideal_FVLBNL22",
"name": "van Lanschot",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/FVLBNL22.png",
"size2x": "https://www.mollie.com/images/checkout/v2/ideal-issuer-icons/FVLBNL22.png"
}
}
],
"_links": {
"self": {
"href": "https://api.mollie.com/v2/methods/ideal",
"type": "application/hal+json"
}
}
},
{
"resource": "method",
"id": "creditcard",
"description": "Credit card",
"image": {
"size1x": "https://www.mollie.com/images/payscreen/methods/creditcard.png",
"size2x": "https://www.mollie.com/images/payscreen/methods/creditcard%402x.png"
},
"_links": {
"self": {
"href": "https://api.mollie.com/v2/methods/creditcard",
"type": "application/hal+json"
}
}
},
{
"resource": "method",
"id": "paypal",
"description": "PayPal",
"image": {
"normal": "https://www.mollie.com/images/payscreen/methods/ideal.png",
"bigger": "https://www.mollie.com/images/payscreen/methods/ideal%402x.png"
"size1x": "https://www.mollie.com/images/payscreen/methods/paypal.png",
"size2x": "https://www.mollie.com/images/payscreen/methods/paypal%402x.png"
},
"_links": {
"self": {
"href": "https://api.mollie.com/v2/methods/paypal",
"type": "application/hal+json"
}
}
},
{
"resource": "method",
"id": "bancontact",
"description": "Bancontact",
"image": {
"size1x": "https://www.mollie.com/images/payscreen/methods/mistercash.png",
"size2x": "https://www.mollie.com/images/payscreen/methods/mistercash%402x.png"
},
"_links": {
"self": {
"href": "https://api.mollie.com/v2/methods/mistercash",
"type": "application/hal+json"
}
}
},
{
"resource": "method",
"id": "banktransfer",
"description": "Bank transfer",
"image": {
"size1x": "https://www.mollie.com/images/payscreen/methods/banktransfer.png",
"size2x": "https://www.mollie.com/images/payscreen/methods/banktransfer%402x.png"
},
"_links": {
"self": {
"href": "https://api.mollie.com/v2/methods/banktransfer",
"type": "application/hal+json"
}
}
},
{
"resource": "method",
"id": "sofort",
"description": "SOFORT Banking",
"image": {
"size1x": "https://www.mollie.com/images/payscreen/methods/sofort.png",
"size2x": "https://www.mollie.com/images/payscreen/methods/sofort%402x.png"
},
"_links": {
"self": {
"href": "https://api.mollie.com/v2/methods/sofort",
"type": "application/hal+json"
}
}
},
{
"resource": "method",
"id": "kbc",
"description": "KBC/CBC Payment Button",
"image": {
"size1x": "https://www.mollie.com/images/payscreen/methods/kbc.png",
"size2x": "https://www.mollie.com/images/payscreen/methods/kbc%402x.png"
},
"issuers": [
{
"resource": "issuer",
"id": "cbc",
"name": "CBC",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/kbc-issuer-icons/cbc.png",
"size2x": "https://www.mollie.com/images/checkout/v2/kbc-issuer-icons/cbc.png"
}
},
{
"resource": "issuer",
"id": "kbc",
"name": "KBC",
"image": {
"size1x": "https://www.mollie.com/images/checkout/v2/kbc-issuer-icons/kbc.png",
"size2x": "https://www.mollie.com/images/checkout/v2/kbc-issuer-icons/kbc.png"
}
}
],
"_links": {
"self": {
"href": "https://api.mollie.com/v2/methods/kbc",
"type": "application/hal+json"
}
}
},
{
"resource": "method",
"id": "belfius",
"description": "Belfius Pay Button",
"image": {
"size1x": "https://www.mollie.com/images/payscreen/methods/belfius.png",
"size2x": "https://www.mollie.com/images/payscreen/methods/belfius%402x.png"
},
"_links": {
"self": {
"href": "https://api.mollie.com/v2/methods/belfius",
"type": "application/hal+json"
}
}
},
{
"resource": "method",
"id": "inghomepay",
"description": "ING Home'Pay",
"image": {
"size1x": "https://www.mollie.com/images/payscreen/methods/inghomepay.png",
"size2x": "https://www.mollie.com/images/payscreen/methods/inghomepay%402x.png"
},
"_links": {
"self": {
"href": "https://api.mollie.com/v2/methods/inghomepay",
"type": "application/hal+json"
}
}
},
{
"resource": "method",
"id": "bitcoin",
"description": "Bitcoin",
"image": {
"size1x": "https://www.mollie.com/images/payscreen/methods/bitcoin.png",
"size2x": "https://www.mollie.com/images/payscreen/methods/bitcoin%402x.png"
},
"_links": {
"self": {
"href": "https://api.mollie.com/v2/methods/bitcoin",
"type": "application/hal+json"
}
}
}
]
Expand Down
Loading

0 comments on commit fdb35a9

Please sign in to comment.