Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
The Bleumi Pay SDK helps you integrate Algo, Algorand Standard Asset, Ethereum, ERC-20, RSK, RSK ERC-20 & xDai payments and payouts into your business or application. The SDK bundles Bleumi Pay API into one SDK to ease implementation and support.
bleumi-pay-sdk-ruby is a Ruby library that provides an interface between your Ruby application and Bleumi Pay API. This tutorial covers the basics, including examples, needed to use the SDK.
Ruby 1.9+
Bleumi Pay SDK uses API keys to authenticate requests. You can obtain an API key through the Bleumi Pay Dashboard.
To install,
gem install bleumi_pay_sdk_ruby
Add the following in the Gemfile:
gem 'bleumi_pay_sdk_ruby', :git => 'https://github.com/bleumi/bleumi_pay_sdk_ruby.git'
The following code generates an unique checkout URL to accept payment from the buyer:
# load the gem
require 'bleumi_pay_sdk_ruby'
# setup authorization
BleumiPay.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['x-api-key'] = '<YOUR_API_KEY>'
end
api_instance = BleumiPay::HostedCheckoutsApi.new
create_checkout_url_request = BleumiPay::CreateCheckoutUrlRequest.new # CreateCheckoutUrlRequest | Specify checkout URL creation parameters.
begin
create_checkout_url_request = BleumiPay::CreateCheckoutUrlRequest.new # CreatePayoutRequest | Specify payout creation parameters.
create_checkout_url_request.id = '<ID>' # Eg. 1
create_checkout_url_request.currency = "<CURRENCY>" # Eg. USD
create_checkout_url_request.amount = "<AMOUNT>" # Eg. 10
create_checkout_url_request.success_url = "<SUCCESS_URL>" # Eg. https://demo.store/api/completeOrder
create_checkout_url_request.cancel_url = "<CANCEL_URL>" # Eg. https://demo.store/api/cancelOrder
create_checkout_url_request.token = '<TOKEN>' # Replace <TOKEN> by anyone of the following values: 'ETH' or 'XDAI' or 'XDAIT' or ECR-20 Contract Address or 'RBTC' or RSK ECR-20 Contract Address or 'Asset ID' of Algorand Standard Asset. | Optional
create_checkout_url_request.chain = BleumiPay::Chain::GOERLI # Replace with any Chain as required
#Generate a unique checkout URL to accept payment.
result = api_instance.create_checkout_url(create_checkout_url_request)
p result
rescue BleumiPay::ApiError => e
puts "Exception when calling HostedCheckoutsApi->create_checkout_url: #{e}"
end
More examples can be found under each method in SDK Classes section.
Class | Method | HTTP request | Description |
---|---|---|---|
BleumiPay::HostedCheckoutsApi | create_checkout_url | POST /v1/payment/hc | Generate a unique checkout URL to accept payment. |
BleumiPay::HostedCheckoutsApi | list_tokens | GET /v1/payment/hc/tokens | Retrieve all tokens configured for the Hosted Checkout in your account in the Bleumi Pay Dashboard. |
BleumiPay::HostedCheckoutsApi | validate_checkout_payment | POST /v1/payment/hc/validate | Validate the GET parameters passed by Hosted Checkout in successUrl upon successfully completing payment. |
BleumiPay::PaymentsApi | get_payment | GET /v1/payment/{id} | Retrieve the wallet addresses & token balances for a given payment |
BleumiPay::PaymentsApi | list_payments | GET /v1/payment | Retrieve all payments created. |
BleumiPay::PaymentsApi | settle_payment | POST /v1/payment/{id}/settle | Settle a specific amount of a token for a given payment to the transferAddress and remaining balance (if any) will be refunded to the buyerAddress |
BleumiPay::PaymentsApi | refund_payment | POST /v1/payment/{id}/refund | Refund the balance of a token for a given payment to the buyerAddress |
BleumiPay::PaymentsApi | get_payment_operation | GET /v1/payment/{id}/operation/{txid} | Retrieve a payment operation for a specific payment. |
BleumiPay::PaymentsApi | list_payment_operations | GET /v1/payment/{id}/operation | Retrieve all payment operations for a specific payment. |
BleumiPay::PayoutsApi | create_payout | POST /v1/payout | Create a payout. |
BleumiPay::PayoutsApi | list_payouts | GET /v1/payout | Returns a list of payouts |
Copyright 2019 Bleumi, Inc.
Code licensed under the MIT License.
FAQs
Unknown package
We found that bleumi_pay_sdk_ruby 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.