Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.4.0 Preview #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
* Token Param documented for weird Vodafone payments

#### v0.4.1
* Added Startbutton Payment Integration
6 changes: 3 additions & 3 deletions bygpay.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions lib/bygpay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 3 additions & 2 deletions lib/bygpay/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -25,4 +26,4 @@ def initialize
@withdraw_status_path = '/withdrawals'
end
end
end
end
2 changes: 1 addition & 1 deletion lib/bygpay/deposit/paystack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ def charge(amount, payload = {})
end
end
end
end
end
20 changes: 20 additions & 0 deletions lib/bygpay/deposit/startbutton.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module Bygpay
module Deposit
class Startbutton < Bygpay::Deposits
# {
# "customer_email" : "[email protected]",
# "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
6 changes: 5 additions & 1 deletion lib/bygpay/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -81,4 +85,4 @@ def http_connect
HTTP[Authorization: Bygpay.configuration.api_key]
end
end
end
end
2 changes: 1 addition & 1 deletion lib/bygpay/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Bygpay
VERSION = "0.3.1"
VERSION = "0.4.1"
end