
Product
Rubygems Ecosystem Support Now Generally Available
Socket's Rubygems ecosystem support is moving from beta to GA, featuring enhanced security scanning to detect supply chain threats beyond traditional CVEs in your Ruby dependencies.
paypal-sdk-buttonmanager-rails
Advanced tools
The PayPal Button Manager SDK provides Ruby APIs to create, and manage PayPal Payments Standard buttons programmatically.
Add this line to your application's Gemfile:
gem 'paypal-sdk-buttonmanager-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install paypal-sdk-buttonmanager-rails
For Rails application:
rails g paypal:sdk:install
For other ruby application, create a configuration file(config/paypal.yml
):
development: &default
username: jb-us-seller_api1.paypal.com
password: WX4WTU3S8MY44S7F
signature: AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy
app_id: APP-80W284485P519543T
http_timeout: 30
mode: sandbox
sandbox_email_address: Platform.sdk.seller@gmail.com
# # with certificate
# cert_path: "config/cert_key.pem"
# # with token authentication
# token: ESTy2hio5WJQo1iixkH29I53RJxaS0Gvno1A6.YQXZgktxbY4I2Tdg
# token_secret: ZKPhUYuwJwYsfWdzorozWO2U9pI
# # with Proxy
# http_proxy: http://proxy-ipaddress:3129/
# # with device ip address
# device_ipaddress: "127.0.0.1"
test:
<<: *default
production:
<<: *default
mode: live
Load Configurations from specified file:
PayPal::SDK::Core::Config.load('config/paypal.yml', ENV['RACK_ENV'] || 'development')
require 'paypal-sdk-buttonmanager-rails'
@api = PayPal::SDK::ButtonManagerRails::API.new(
:mode => "sandbox", # Set "live" for production
:app_id => "APP-80W284485P519543T",
:username => "jb-us-seller_api1.paypal.com",
:password => "WX4WTU3S8MY44S7F",
:signature => "AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy" )
# Build request object
@bm_create_button = @api.build_bm_create_button({
:ButtonType => "BUYNOW",
:ButtonCode => "HOSTED",
:ButtonVar => ["item_name=Testing","amount=5","return=http://localhost:3000/samples/button_manager/bm_create_button","notify_url=http://localhost:3000/samples/button_manager/ipn_notify"] })
# Make API call & get response
@bm_create_button_response = @api.bm_create_button(@bm_create_button)
# Access Response
if @bm_create_button_response.success?
@bm_create_button_response.Website
@bm_create_button_response.Email
@bm_create_button_response.HostedButtonID
else
@bm_create_button_response.Errors
end
FAQs
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.
Product
Socket's Rubygems ecosystem support is moving from beta to GA, featuring enhanced security scanning to detect supply chain threats beyond traditional CVEs in your Ruby dependencies.
Research
The Socket Research Team investigates a malicious npm package that appears to be an Advcash integration but triggers a reverse shell during payment success, targeting servers handling transactions.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.