Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
whitelabelmachinename-ruby-sdk
Advanced tools
The WhiteLabelName Ruby library wraps around the WhiteLabelName API. This library facilitates your interaction with various services such as transactions, accounts, and subscriptions.
WhiteLabelName Web Service API
$ gem install whitelabelmachinename-ruby-sdk
The library needs to be configured with your account's space id, user id, and secret key which are available in your WhiteLabelName
account dashboard. Set space_id
, user_id
, and api_secret
to their values:
require 'whitelabelmachinename-ruby-sdk'
space_id = 405
app_user_id = 512
app_user_key = "FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ="
WhiteLabelMachineName.configure do |config|
config.user_id = app_user_id
config.authentication_key = app_user_key
end
# TransactionService
transaction_service = WhiteLabelMachineName::TransactionService.new
# TransactionPaymentPageService
transaction_payment_page_service = WhiteLabelMachineName::TransactionPaymentPageService.new
To get stated with sending transactions you can review the example below:
require 'whitelabelmachinename-ruby-sdk'
space_id = 405
app_user_id = 512
app_user_key = "FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ="
WhiteLabelMachineName.configure do |config|
config.user_id = app_user_id
config.authentication_key = app_user_key
end
# TransactionService
transaction_service = WhiteLabelMachineName::TransactionService.new
# TransactionPaymentPageService
transaction_payment_page_service = WhiteLabelMachineName::TransactionPaymentPageService.new
transaction = WhiteLabelMachineName::TransactionCreate.new({
billingAddress: WhiteLabelMachineName::AddressCreate.new({
city: "City",
country: "US",
emailAddress: "billing@address.com",
familyName: "Family",
givenName: "Given",
postCode: "98100",
postalState: "WA",
street: "Street"
}),
currency: 'EUR',
customerEmailAddress: "test@example.com",
customerPresence: WhiteLabelMachineName::CustomersPresence::VIRTUAL_PRESENT,
failedUrl: "http://localhost/failure",
invoiceMerchantReference: "order-1",
language: "en_US",
lineItems: [
WhiteLabelMachineName::LineItemCreate.new({
amountIncludingTax: 29.60,
name: "Item 1",
quantity: 1,
shippingRequired: true,
sku: "sku-1",
taxes: [
WhiteLabelMachineName::TaxCreate.new({
rate: 8,
title: "VAT"
})
],
type: WhiteLabelMachineName::LineItemType::PRODUCT,
uniqueId: "unique-id-item-1",
}),
WhiteLabelMachineName::LineItemCreate.new({
amountIncludingTax: 5.60,
name: "Test Shipping",
quantity: 1,
shippingRequired: false,
sku: "test-shipping",
taxes: [
WhiteLabelMachineName::TaxCreate.new({
rate: 8,
title: "VAT"
})
],
type: WhiteLabelMachineName::LineItemType::SHIPPING,
uniqueId: "unique-id-shipping-1",
}),
],
merchantReference: "order-1",
shippingAddress: WhiteLabelMachineName::AddressCreate.new({
city: "City",
country: "US",
emailAddress: "shipping@address.com",
familyName: "Family",
givenName: "Given",
postCode: "98100",
postalState: "WA",
street: "Street"
}),
shippingMethod: "Test Shipping",
successUrl: "http://localhost/success"
})
transaction = transaction_service.create(space_id, transaction)
payment_page_url = transaction_payment_page_service.payment_page_url(space_id, transaction.id)
# redirect to payment_page_url
Please see the license file for more information.
FAQs
Unknown package
We found that whitelabelmachinename-ruby-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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.