Jamm SDK - Ruby
The official Ruby SDK for Jamm's payment API! We strongly recommend using the SDK for backend integration in order to simplify and streamline your development process!
Home »
Report Bug
·
Request Feature
How to Use
require 'jamm'
Jamm.client_id = '<your client id>'
Jamm.client_secret = '<your client id>'
Jamm.open_timeout = 30 # optionally
Jamm.read_timeout = 90 # optionally
# ex, create a deduction contract token
deduction_token = Jamm::Payment.create(
initial_charge: {
description: 'Jamm',
initial_amount: 10_000,
currency: 'JPY'
},
redirect: {
success_url: 'http://www.example.com/success',
failure_url: 'http://www.example.com/fail',
info_url: 'http://www.example.com/customer_service',
expired_at: "2023-11-07T15:30:00.000+09:00"
},
metadata: {
key1: 'value1',
key2: 'value2'
},
customers: {
name: "Taro Taro",
katakanaFirstName: "タロ",
katakanaLastName: "タロ",
gender: "MALE",
postNum: "112-0001",
address: "東京都渋谷区1−1−1"
email: "[email protected]",
phone: "010-1234-5678"
birthdate: "2000-01-01",
},
options: {
force_kyc: true
}
)
Installation
gem install jamm
If you want to build the gem from source:
gem build jamm.gemspec
Development
Test cases can be run with: bundle exec rake
Requirements
- Ruby 2.7.0 or above.
- rest-client