diff --git a/CHANGELOG.md b/CHANGELOG.md index 25b8a32..acc9d9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,24 +1,27 @@ ## CHANGE LOG -#####v0.1.1 +##### v0.1.1 * Created SDK * MoMo Deposits Support -#####v0.2.0 +##### v0.2.0 * Fixed Bugs * MoMo Withdrawal Support -####pre-0.2.1 +#### pre-0.2.1 * Added Better Response Management -####v0.2.2 +#### v0.2.2 * Bankcard support Added * Codebase Improved -####v0.2.3 +#### v0.2.3 * Currency Support Added to Deposits * Added Tests Coverage -####v0.2.4 +#### v0.2.4 * Added Vodafone Payment Examples -* Token Param documented for weird Vodafone payments \ No newline at end of file +* Token Param documented for weird Vodafone payments + +#### v0.4.1 +* Added Startbutton Payment Integration diff --git a/bygpay.gemspec b/bygpay.gemspec index d754a1a..81af62d 100644 --- a/bygpay.gemspec +++ b/bygpay.gemspec @@ -22,9 +22,9 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_development_dependency "rspec", "~> 3.0" + spec.add_development_dependency "rspec" spec.add_development_dependency "simplecov" spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0" - spec.add_dependency "http", "~> 4.4.1" - spec.add_dependency "hashie", "~> 3.6.0" + spec.add_dependency "http" + spec.add_dependency "hashie" end diff --git a/lib/bygpay.rb b/lib/bygpay.rb index f077e39..3d98783 100644 --- a/lib/bygpay.rb +++ b/lib/bygpay.rb @@ -8,6 +8,7 @@ require 'bygpay/deposit/rave' require 'bygpay/deposit/express_pay' require 'bygpay/deposit/paystack' +require 'bygpay/deposit/startbutton' require 'bygpay/deposit/hubtel' require 'bygpay/withdrawals' require 'bygpay/withdraw/mobile' diff --git a/lib/bygpay/configuration.rb b/lib/bygpay/configuration.rb index eaed5a1..40c56e7 100644 --- a/lib/bygpay/configuration.rb +++ b/lib/bygpay/configuration.rb @@ -4,7 +4,7 @@ class Configuration :deposit_mobile_path, :deposit_status_overide_path, :deposit_status_path, :withdraw_mobile_path, :withdraw_status_overide_path, :withdraw_status_path, :deposit_card_path, :deposit_rave_path, :deposit_expresspay_path, - :deposit_paystack_path, :deposit_hubtel_path + :deposit_paystack_path, :deposit_hubtel_path, :deposit_startbutton_path def initialize @base_url = nil @@ -14,6 +14,7 @@ def initialize @deposit_mobile_path = '/deposits/mobile' @deposit_rave_path = '/deposits/rave-redirect' @deposit_paystack_path = '/deposits/paystack' + @deposit_startbutton_path = '/deposits/startbutton' @deposit_hubtel_path = '/deposits/hubtel' @deposit_expresspay_path = '/deposits/expresspay' @deposit_card_path = '/deposits/card' @@ -25,4 +26,4 @@ def initialize @withdraw_status_path = '/withdrawals' end end -end \ No newline at end of file +end diff --git a/lib/bygpay/deposit/paystack.rb b/lib/bygpay/deposit/paystack.rb index b477f1b..17fc500 100644 --- a/lib/bygpay/deposit/paystack.rb +++ b/lib/bygpay/deposit/paystack.rb @@ -17,4 +17,4 @@ def charge(amount, payload = {}) end end end -end \ No newline at end of file +end diff --git a/lib/bygpay/deposit/startbutton.rb b/lib/bygpay/deposit/startbutton.rb new file mode 100644 index 0000000..8689714 --- /dev/null +++ b/lib/bygpay/deposit/startbutton.rb @@ -0,0 +1,20 @@ +module Bygpay + module Deposit + class Startbutton < Bygpay::Deposits + # { + # "customer_email" : "james.bolie@gmail.com", + # "customer_phone": null, + # "customer_firstname": null, + # "customer_lastname": null, + # "custom_logo": null, + # "country": "GH", + # "currency": "GHS", + # "redirect_url": "URL" + # } + # Perform ExpressPay Checkout Transaction + def charge(amount, payload = {}) + post(startbutton_deposit_endpoint, payload.merge(amount: amount)) + end + end + end +end diff --git a/lib/bygpay/utils.rb b/lib/bygpay/utils.rb index 485d42b..10ca19a 100644 --- a/lib/bygpay/utils.rb +++ b/lib/bygpay/utils.rb @@ -23,6 +23,10 @@ def paystack_deposit_endpoint Bygpay.configuration.deposit_paystack_path end + def startbutton_deposit_endpoint + Bygpay.configuration.deposit_startbutton_path + end + def hubtel_deposit_endpoint Bygpay.configuration.deposit_hubtel_path end @@ -81,4 +85,4 @@ def http_connect HTTP[Authorization: Bygpay.configuration.api_key] end end -end \ No newline at end of file +end diff --git a/lib/bygpay/version.rb b/lib/bygpay/version.rb index e024a3f..909eae5 100644 --- a/lib/bygpay/version.rb +++ b/lib/bygpay/version.rb @@ -1,3 +1,3 @@ module Bygpay - VERSION = "0.3.1" + VERSION = "0.4.1" end