Skip to content

surjay/payment_processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

  • Ruby 2.7; Rails 5.2; postgres

Setup

  • bundle install
  • bin/rails db:migrate

Run Specs

  • bundle exec rspec spec/

Endpoints/Flow

  • Create Merchant
POST /v1/merchants
{
  name: "Company Name",
}
  • Create PaymentMethod
POST /v1/merchants/:merchant_id/payment_methods 
{
  method_type: "bank",
  bank_info: {
    name: "Chase",
    routing_number: "011000015",
    account_number: "456"
  }
}
  • Create Transaction
POST /v1/merchants/:merchant_id/transactions 
{
  to_merchant_id: 2, 
  scheduled_type: "future", 
  payment_method_id: 1, 
  amount: "5252.23", 
  scheduled_date: "2012-12-22"
}
  • Manually Generate Payouts
GeneratePayouts.new(payout_date: "2012-12-22").perform

This can be hooked up to a cron in the future (ie Heroku Advanced Scheduler, AWS Cloudwatch Scheduled Events, Sidekiq Scheduled Jobs, etc.)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published