Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bf-mokapay

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bf-mokapay

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Mokapay

Unofficial API wrapper for MOKA Payment System.

Installation

Add this line to your application's Gemfile:

gem 'mokapay', require: 'moka'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mokapay

Usage

require 'moka'

Moka.configure do |config|
  config.dealer_code  = '1730'
  config.username     = 'TestMoka1'
  config.password     = 'YHSUSHDYHUDHD'
  config.env          = 'test' # Default production 
end

Note: When making any request, you can use all parameters on the official documentation with snake case. For example you can use card_holder_full_name for CardHolderFullName on official documentation.

Create Direct Payment
payment = Moka::Payment.new({
  card_holder_full_name: 'Huseyin TUNC',
  card_number: '5269552233334444',
  exp_month: '12',
  exp_year: '2022',
  cvc_number: '000',
  amount: 10.10,
  client_ip: '1.2.3.4',
  other_trx_code: 1
})

payment.pay # Make request (also returns the response)
payment.success? # To check if it success
payment.response # Returns the response 
Create 3D Payment
payment = Moka::Payment.new({
  card_holder_full_name: 'Huseyin TUNC',
  card_number: '5269552233334444',
  exp_month: '12',
  exp_year: '2022',
  cvc_number: '000',
  amount: 10.10,
  client_ip: '1.2.3.4',
  other_trx_code: 1,
  redirect_url: 'http://localhost:3000/payments/success'
})

payment.pay_three_d

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/hsyntnc/mokapay. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 03 Aug 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc