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.
TODO...
TODO...
Ensure you have STRIPE_TEST_SECRET_KEY
as an ENV variable.
This progect uses dotenv so you can create a .env
file.
You can run the tests using rake test
.
Add the gem to your Gemfile: gem 'pay_me'
.
Run bundle install
to install it.
Run rails g pay_me:install
Add the following to your routes
...
pay_me_customerable_for :users
...
Add the following to your customer model controller
require 'pay_me/concerns/controllers/customerable'
...
class UsersController < BaseController
include PayMe::Concerns::Controllers::Customerable
...
Add the following to your customer model
require 'pay_me/concerns/models/customerable'
...
class User < ActiveRecord::Base
include PayMe::Concerns::Models::Customerable
...
The model will also need a receipt_email
attribute and customer_id
.
The installer will automatically add the following to your secrets.yml
for development
test
and production
.
secrets.yml
development:
###
# Other configs
###
stripe_publishable_key: <%= ENV['STRIPE_PUBLISHABLE_KEY'] %>
stripe_secret_key: <%= ENV['STRIPE_SECRET_KEY'] %>
stripe_webhook_secret: <%= ENV['STRIPE_WEBHOOK_SECRET'] %>
stripe_signing_secret: <%= ENV['STRIPE_SIGNING_SECRET'] %>
or using inheritance:
secrets.yml
stripe: &stripe
stripe_publishable_key: <%= ENV['STRIPE_PUBLISHABLE_KEY'] %>
stripe_secret_key: <%= ENV['STRIPE_SECRET_KEY'] %>
stripe_webhook_secret: <%= ENV['STRIPE_WEBHOOK_SECRET'] %>
stripe_signing_secret: <%= ENV['STRIPE_SIGNING_SECRET'] %>
development:
<<: *stripe
...
test:
<<: *stripe
...
production:
<<: *stripe
...
You will need to add the stripe keys to your ENV
.
STRIPE_PUBLISHABLE_KEY
is your stripe publishable key.STRIPE_SECRET_KEY
is your stripe secret key.STRIPE_WEBHOOK_SECRET
is a secret that is used for stripe as a password for basic authentication to the webhook. You can use rake secret
to generate a suitable secret. This is also used when configuring the stripe webhook in stripe: https://stripe:STRIPE_WEBHOOK_SECRET@myapplication.com/pay_me-stripe_webhooks
STRIPE_SIGNING_SECRET
is used by stripe to sign webhooks. It can be found in your stripe webhook settings.PayMe adds to rake task for caching Stripe plans locally to reduce calls to stripe. They are:
pay_me:stripe:add_stripe_plans
This will add missing Stripe plans, but not delete local ones that no longer exist on stripe.pay_me:stripe:sync_stripe_plans
This will add missing Stripe plans and delete local ones that don't exist on stripe.You are now setup!
ENV
ENV
ENV
Copyright (c) 2015, Pay Me is developed and maintained by Wildland
FAQs
Unknown package
We found that pay_me 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.