Spreedly is a cloud-based credit card vault that allows users to work with multiple payment gateways simultaneously.
Payment Gateway?
Payment Processor?
Payment Aggregator?
Billing-Subscription Solution?
With that context, one critical thing I would recommend assessing the various services on is the amount of lock-in they engender: how hard will it be to bring things in-house or switch to a different service if your needs change down the road? What about if you want to keep using the service but need to switch payment gateways? Some businesses will use the same billing setup for their whole lifetime, but most will switch at least once, so be careful about painting yourself too tightly i
env = Spreedly::Environment.new(environment_key, access_secret)
transaction = env.purchase_on_gateway(gateway_token, payment_method_token, 4432)
transaction.succeeded? # => true
transaction.token # => "aGJlY5srn7TFeYKxO5pmwi3CyJd"
A Gateway
gateway = env.add_gateway(:test)
gateway.token # => "DnbEJaaY2egcVkCvg3s8qT38xgt"
####################################
# Grab info for supported gateways
###################################
env.gateway_options
A Payment Information aka payment method
Action payment method
env.verify_on_gateway(gateway_token, payment_method_token, retain_on_success: true)
auth_transaction = env.authorize_on_gateway(gateway_token, payment_method_token, 250)
if auth_transaction.succeeded?
capture_transaction = env.capture_transaction(auth_transaction.token)
end
capture_transaction = env.capture_transaction(auth_transaction.token, amount: 100)
env.purchase_on_gateway(gateway_token, payment_method_token, amount,
order_id: "123",
description: "The Description",
ip: "192.31.123.112",
merchant_name_descriptor: "SuperDuper Corp",
merchant_location_descriptor: "http://super.com",
currency_code: "GBP",
retain_on_success: true)