
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Add this line to your application's Gemfile:
gem 'paylense-sdk'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install paylense-sdk
Add the following configurations in an initializer file (for example, config/initializers/paylense-sdk.rb
in a Rails app):
Paylense.configure do |config|
config.version = 'Paylense API version you plan to use'
config.envrionment = 'Specify if your testing the API or you are ready to do business'
config.api_key = 'Your Paylense API key'
config.api_secret = 'Your Paylense API secret'
end
Used to create an instance of collection
You can create an collection client with the following:
require 'paylense-sdk'
collection = Paylense::Collections.new
request_to_pay
: This operation is used to request a payment from a Payer. The payer will be asked to authorize the payment. The transaction is executed once the payer has authorized the payment. The transaction will be in status PENDING until it is authorized or declined by the payer or it is timed out by the system. The status of the transaction can be validated by using get_transaction_status
.
get_transaction_status
: Retrieve transaction information using the transaction_reference
returned by request_to_pay
. You can invoke it at intervals until the transaction fails or succeeds. If the transaction has failed, it will throw an appropriate error.
Used to create an instance of disbursement
You can create an disbursement client with the following:
require 'paylense-sdk'
disbursement = Paylense::Disbursements.new
transfer
: Used to transfer an amount from the owner’s account to a payee account. The status of the transaction can be validated by using the get_transaction_status
method.
get_transaction_status
: Retrieve transaction information using the transaction_reference
returned by transfer
. You can invoke it at intervals until the transaction fails or succeeds. If the transaction has failed, it will throw an appropriate error.
require 'paylense-sdk'
collection = Paylense::collection.new
transaction = collection.request_to_pay(
phone_number="256772123456", amount=600,
procession_number="123456789", narration="dd")
transaction_ref = transaction[:transaction_reference]
collection.get_transaction_status(transaction_ref)
All methods for Disbursements follow the same format as the examples shown above for Collections
The 'transfer' method for Disbursements follows the same format as 'request_to_pay' above.
For additional documentation, please refer to this link: https://docs.paylense.com
Bug reports and pull requests are welcome on GitHub at https://github.com/winopay/paylense-ruby-sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Install the gems using bundler
bundle install
Run the the unit tests:
rspec
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Paylense::Ruby project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that paylense-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.