All Projects → joshnuss → Commerce_billing

joshnuss / Commerce_billing

Licence: mit
A payment processing library for Elixir

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to Commerce billing

Gringotts
A complete payment library for Elixir and Phoenix Framework
Stars: ✭ 396 (+132.94%)
Mutual labels:  stripe, payment, billing, gateway
Jetstream Cashier Billing Portal
Jetstream Cashier Billing Portal is a simple scaffolding billing portal to manage subscriptions, invoices and payment methods, built on top of Jetstream & Cashier Register.
Stars: ✭ 45 (-73.53%)
Mutual labels:  stripe, payment, billing
Stripe
A comprehensive PHP Library for the Stripe.
Stars: ✭ 256 (+50.59%)
Mutual labels:  stripe, payment, billing
drf-stripe-subscription
An out-of-box Django REST framework solution for payment and subscription management using Stripe.
Stars: ✭ 42 (-75.29%)
Mutual labels:  stripe, payment, billing
Payumbundle
Payum offers everything you need to work with payments. From simplest use cases to very advanced ones.
Stars: ✭ 509 (+199.41%)
Mutual labels:  stripe, payment
Stripe
Stripe library for Vapor
Stars: ✭ 151 (-11.18%)
Mutual labels:  stripe, payment
Vue Stripe
Stripe Checkout & Elements for Vue.js
Stars: ✭ 669 (+293.53%)
Mutual labels:  stripe, payment
Vue Stripe Payment
Vue wrapper for jquery.payment by stripe
Stars: ✭ 11 (-93.53%)
Mutual labels:  stripe, payment
stripe-update-card
💳 Expose a page that let your customers update their payment information on Stripe.
Stars: ✭ 16 (-90.59%)
Mutual labels:  stripe, payment
Moyasar Php
Moyasar PHP client library
Stars: ✭ 5 (-97.06%)
Mutual labels:  payment, gateway
Cashier Stripe
Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
Stars: ✭ 2,047 (+1104.12%)
Mutual labels:  stripe, billing
laravel-multi-payment
Laravel online gateway payment package with multi driver support
Stars: ✭ 22 (-87.06%)
Mutual labels:  payment, gateway
Dj Stripe
Django + Stripe Made Easy
Stars: ✭ 1,022 (+501.18%)
Mutual labels:  stripe, billing
Chip
A drop-in subscription billing UI for Laravel
Stars: ✭ 91 (-46.47%)
Mutual labels:  stripe, billing
nestjs-stripe
Provides an injectable Stripe client to nestjs modules
Stars: ✭ 126 (-25.88%)
Mutual labels:  stripe, payment
Kirby Pay
Make online payments with Kirby
Stars: ✭ 27 (-84.12%)
Mutual labels:  stripe, payment
Payumlaravelpackage
Payum offers everything you need to work with payments. From simplest use cases to very advanced ones.
Stars: ✭ 121 (-28.82%)
Mutual labels:  stripe, payment
PayumYiiExtension
Rich payment solutions for Yii framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more
Stars: ✭ 13 (-92.35%)
Mutual labels:  stripe, payment
Billing
A general purpose interface to Stripe that's optimized for Laravel 5 SaaS applications.
Stars: ✭ 14 (-91.76%)
Mutual labels:  stripe, billing
Payumserver
Payment processing microservice. Written in Symfony4
Stars: ✭ 103 (-39.41%)
Mutual labels:  stripe, payment

Commerce.Billing

Build Status

Payment processing library for Elixir. Based on Shopify's ActiveMerchant ruby gem

Supported Gateways

  • Bogus
  • Stripe

Advantages of Elixir

  • Fault tolerant: Each worker is supervised, so a new worker is started in the event of errors. Network errors are caught and payment is retried (not yet working).
  • Distributed: Run workers on different machines.
  • Scalable: Run multiple workers and adjust number of workers as needed.
  • Throughput: Takes advantage of all cores. For example on my laptop with 4 cores (2 threads per core), I can do 100 authorizations with Stripe in 10 seconds. Thats 864,000 transactions per day. ebay does 1.4M/day.
  • Hot code swap: Update code while the system is running

Card processing example

alias Commerce.Billing
alias Billing.{CreditCard, Address, Worker, Gateways}

config = %{credentials: {"sk_test_BQokikJOvBiI2HlWgH4olfQ2", ""},
           default_currency: "USD"}

Worker.start_link(Gateways.Stripe, config, name: :my_gateway)

card = %CreditCard{
  name: "John Smith",
  number: "4242424242424242",
  expiration: {2017, 12},
  cvc: "123"
}

address = %Address{
  street1: "123 Main",
  city: "New York",
  region: "NY",
  country: "US",
  postal_code: "11111"
}

case Billing.authorize(:my_gateway, 199.95, card, billing_address: address,
                                                   description: "Amazing T-Shirt") do
  {:ok,    %{authorization: authorization}} ->
    IO.puts("Payment authorized #{authorization}")

  {:error, %{code: :declined, reason: reason}} ->
    IO.puts("Payment declined #{reason}")

  {:error, %{code: error}} ->
    IO.puts("Payment error #{error}")
end

Road Map

  • Support multiple gateways (PayPal, Stripe, Authorize.net, Braintree etc..)
  • Support gateways that bill directly and those that use html integrations.
  • Support recurring billing
  • Each gateway is hosted in a worker process and supervised.
  • Workers can be pooled. (using poolboy)
  • Workers can be spread on multiple nodes
  • The gateway is selected by first calling the "Gateway Factory" process. The "Gateway Factory" decides which gateway to use. Usually it will just be one type based on configuration setting in mix.exs (i.e. Stripe), but the Factory can be replaced with something fancier. It will enable scenarios like:
    • Use one gateway for visa another for mastercard
    • Use primary gateway (i.e PayPal), but when PayPal is erroring switch to secondary/backup gateway (i.e. Authorize.net)
    • Currency specific gateway, i.e. use one gateway type for USD another for CAD
  • Retry on network failure

License

MIT

[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].