This library is deprecated. Please use Shift4 ruby gem.
If you don't already have SecurionPay account you can create it here.
Add this line to your application's Gemfile:
gem 'securionpay'
And then execute:
bundle
Or install it yourself as:
gem install securionpay
Configuration:
SecurionPay::Configuration.secret_key = 'pr_test_id'
If you want connect to different backend:
SecurionPay::Configuration.api_url = 'https://api.mysecurionpay.env'
SecurionPay::Configuration.uploads_url = 'https://uploads.mysecurionpay.env'
Creates a new card object.
customer_id = 'cust_id'
card = {
number: '4242424242424242',
expMonth: '11',
expYear: '2022',
cvc: '123',
cardholderName: 'John Doe',
}
SecurionPay::Cards.create(customer_id, card)
Retrieve an existing card object.
customer_id = 'cust_id'
card_id = 'card_id'
SecurionPay::Cards.retrieve(customer_id, card_id)
Update an existing card object.
customer_id = 'cust_id'
card_id = 'card_id'
card = {
cardholderName: 'Mr Bean'
}
SecurionPay::Cards.update(customer_id, card_id, card)
Deletes an existing card object.
customer_id = 'cust_id'
card_id = 'card_id'
SecurionPay::Cards.delete(customer_id, card_id)
List card objects for given customer.
customer_id = 'cust_id'
SecurionPay::Cards.list(customer_id)
blacklist_rule = {
ruleType: 'fingerprint',
fingerprint: '123abc456efg'
}
SecurionPay::Blacklist.create(blacklist_rule)
blacklist_rule_id = 'blr_number'
SecurionPay::Blacklist.retrieve(blacklist_rule_id)
blacklist_rule_id = 'blr_number'
SecurionPay::Blacklist.delete(blacklist_rule_id)
SecurionPay::Blacklist.list(deleted: true, limit: 100)
Please refer to detailed API docs (linked) for all available fields
- charges
- customers
- cards
- subscriptions
- plans
- events
- tokens
- blacklist
- checkoutRequest
- crossSaleOffers
- credits
- disputes
- fileUploads
- fraudWarnings
For further information, please refer to our official documentation at https://securionpay.com/docs.
Bug reports and pull requests are welcome on GitHub at https://github.com/securionpay/securionpay-ruby
After checking out the repo, run bundle setup
to install dependencies.
To run integration tests:
SECRET_KEY='sk_test_id' bundle exec rake spec:integration
To run style checks execute:
bundle exec rubocop