
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Ruby on Rails SDK for CamPay Payment Gateway
CamPay is a Fintech service of the company TAKWID GROUP which launched its financial services in Cameroon from January 2021.
We provide businesses and institutions with solutions for collecting and transferring money online, via primarily Mobile Money(MTN and Orange).
With CamPay, simplify the purchasing experience for your customers thanks to our mobile money payment solutions, accessible via your website and/or mobile application.
These instructions will get you started with the CamPay SDK for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
gem install campay
or
gem campay
.env
then add:
gem 'dotenv'
to your gemfile in order to save your secret credentialscampay = Campay::CamPay.new(
ENV.fetch('PAY_UNIT_API_USERNAME'),
ENV.fetch('PAY_UNIT_API_PASSWORD'),
ENV.fetch('PAY_UNIT_MODE'))
collect = collect(
amount, #The amount you want to collect
currency, #XAF
from, #Phone number to request amount from - Must include country code
description, #some description
external_reference #Reference from the system initiating the transaction
)
puts collect
#{"reference": "bcedde9b-62a7-4421-96ac-2e6179552a1a", "external_reference":"12345678", "status": "SUCCESSFUL", "amount": 5, "currency": "XAF", "operator": "MTN", "code": "CP201027T00005", "operator_reference": "1880106956" }
status can be SUCCESSFUL or FAILED
link = campay.fetch_payment_link(
amount,
currency,
from,
description,
reference,
redirect_url
)
'''
Redirect your customer to the returned payment link
'''
status can be SUCCESSFUL or FAILED
Please enable API withdrawal under app settings before trying this request
disburse = campay.disburse(
amount,
currency,
to,
description,
external_reference
)
puts disburse
#{"reference": "bcedde9b-62a7-4421-96ac-2e6179552a1a", "external_reference":"12345678", "status": "SUCCESSFUL", "amount": 5, "currency": "XAF", "operator": "MTN", "code": "CP201027T00005", "operator_reference": "1880106956" }
status can be SUCCESSFUL or FAILED
balance = campay.fetch_balance
puts balance
#{"total_balance": 0, "mtn_balance": 0, "orange_balance": 0, "currency": "XAF"}
Please enable API withdrawal under app settings before trying this request
airtime = campay.transfer_airtime(
amount,
to,
external_reference
)
puts airtime
#{"reference": "bcedde9b-62a7-4421-96ac-2e6179552a1a", "external_reference":"12345678", "status": "SUCCESSFUL", "amount": 5, "currency": "XAF", "operator": "MTN", "code": "CP201027U00005", "operator_reference": "1880106956" }
status can be SUCCESSFUL or FAILED
👤 Stanley Enow Lekunze
👤 CHE NSOH BLANCHARD
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Campay project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that campay 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.