Skip to content

bhattis/beanstream-ruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bambora's Ruby SDK

Integration with Bambora’s payments gateway is a simple, flexible solution.

You can choose between a straightforward payment requiring very few parameters; or, you can customize a feature-rich integration.

To assist as a centralized record of all your sales, we also accept cash and cheque transactions.

For very detailed information on the Payments API, look at the Bambora developer portal.

TLS 1.2 support

For testing instructions with our TLS1.2-only server, please refer to our developer portal

Setup

To install the SDK you just need to simply install the gem file:

gem install beanstream --pre

Code Sample

Take a credit card Payment:

begin
  result = Beanstream.PaymentsAPI.make_payment(
  {
    :order_number => PaymentsAPI.generateRandomOrderId("test"),
    :amount => 100,
    :payment_method => PaymentMethods::CARD,
    :card => {
      :name => "Mr. Card Testerson",
      :number => "4030000010001234",
      :expiry_month => "07",
      :expiry_year => "22",
      :cvd => "123",
      :complete => true
    }
  })
  puts "Success! TransactionID: #{result['id']}"
  
rescue BeanstreamException => ex
  puts "Exception: #{ex.user_facing_message}"
end

Reporting Issues

Found a bug or want a feature improvement? Create a new Issue here on the github page.

About

Payment APIs for Beanstream

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%