mollie

Mollie Payments API wrapper (Creditcard, PayPal, Apple Pay, Sofort, Klarna, ...) mollie payment paypal ideal apple-pay sofort ing-home-pay bancontact giropay kbc paysafecard sepa pay
1.0.2 released
wout/mollie.cr
18 6 3
Wout

Mollie API client for Crystal

Example payment

Accepting iDEAL, Bancontact, SOFORT Banking, Creditcard, SEPA Bank transfer, SEPA Direct debit, PayPal, KBC/CBC Payment Button, Belfius Direct Net, paysafecard, ING Home’Pay, Gift cards, EPS, Giropay and Apple Pay online payments without fixed monthly costs or any punishing registration procedures. Just use the Mollie API to receive payments directly on your website or easily refund transactions to your customers.

Build Status GitHub version

Disclaimer

This is the unofficial Crystal shard for Mollie. It is directly ported from the Ruby version (mollie-ruby-api) but not an exact copy. Usage might vary from the Ruby version due to language differences and to make the most of Crystal's type system.

Requirements

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

  • Get yourself a free Mollie account. No sign up costs.
  • Create a new Website profile to generate API keys (live and test mode) and setup your webhook.
  • Now you're ready to use the Mollie API client in test mode.
  • In order to accept payments in live mode, payment methods must be activated in your account. Follow a few of steps, and let us handle the rest.

Installation

Add mollie as a depencency to your application's shard.yml:

dependencies:
  mollie:
    github: tilishop/mollie.cr

Then run shards install.

Usage

Configure your API key:

Mollie.configure do |config|
  config.api_key = ENV["MOLLIE_API_KEY"]
  # Timeouts (default is 60)
  # config.open_timeout = 60
  # config.read_timeout = 60
end

Create a payment:

payment = Mollie::Payment.create({
  amount: {
    value:    "10.00",
    currency: "EUR",
  },
  method:       "creditcard",
  description:  "My first API payment",
  redirect_url: "https://shop.org/order/12345",
  webhook_url:  "https://shop.org/mollie-webhook",    
})

Documentation

Contributing

  1. Fork it (https://github.com/your-github-user/mollie/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • wout - creator and maintainer
  • tilishop - owner and maintainer

License

BSD (Berkeley Software Distribution) License.

Support

Mollie Contact: www.mollie.com — info@mollie.com — +31 20-612 88 55

mollie:
  github: wout/mollie.cr
  version: ~> 1.0.2
License BSD
Crystal 0.33.0

Authors

Dependencies 1

  • wordsmith ~> 0.2
    {'github' => 'luckyframework/wordsmith', 'version' => '~> 0.2'}

Development Dependencies 2

  • ameba ~> 0.11.0
    {'github' => 'crystal-ameba/ameba', 'version' => '~> 0.11.0'}
  • webmock master
    {'branch' => 'master', 'github' => 'manastech/webmock.cr'}

Dependents 0

Last synced .
search fire star recently