securionpay 0.3.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/bin/console +2 -0
- data/lib/securionpay/blacklist.rb +24 -0
- data/lib/securionpay/cards.rb +9 -27
- data/lib/securionpay/charges.rb +31 -0
- data/lib/securionpay/communicator.rb +33 -25
- data/lib/securionpay/configuration.rb +22 -2
- data/lib/securionpay/credits.rb +23 -0
- data/lib/securionpay/cross_sale_offers.rb +27 -0
- data/lib/securionpay/customers.rb +27 -0
- data/lib/securionpay/disputes.rb +23 -0
- data/lib/securionpay/events.rb +15 -0
- data/lib/securionpay/file_uploads.rb +20 -0
- data/lib/securionpay/fraud_warnings.rb +15 -0
- data/lib/securionpay/plans.rb +27 -0
- data/lib/securionpay/securion_pay_exception.rb +16 -0
- data/lib/securionpay/subscriptions.rb +27 -0
- data/lib/securionpay/tokens.rb +15 -0
- data/lib/securionpay/transaction_base.rb +13 -0
- data/lib/securionpay/version.rb +3 -1
- data/lib/securionpay.rb +19 -1
- metadata +106 -33
- data/.codeclimate.yml +0 -25
- data/.gitignore +0 -10
- data/.rubocop.yml +0 -1156
- data/.ruby-version +0 -1
- data/.travis.yml +0 -9
- data/Gemfile +0 -4
- data/README.md +0 -113
- data/Rakefile +0 -7
- data/bin/setup +0 -8
- data/lib/securionpay/builders/path_builder.rb +0 -13
- data/securionpay-ruby.gemspec +0 -27
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.2.4
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/README.md
DELETED
@@ -1,113 +0,0 @@
|
|
1
|
-
# SecurionPay ruby gem
|
2
|
-
|
3
|
-
[](https://travis-ci.org/gwilczynski/securionpay-ruby)
|
4
|
-
[](https://codeclimate.com/github/gwilczynski/securionpay-ruby)
|
5
|
-
[](https://codeclimate.com/github/gwilczynski/securionpay-ruby/coverage)
|
6
|
-
[](https://codeclimate.com/github/gwilczynski/securionpay-ruby)
|
7
|
-
[](https://gemnasium.com/github.com/gwilczynski/securionpay-ruby)
|
8
|
-
|
9
|
-
If you don't already have SecurionPay account you can create it [here](https://securionpay.com/register).
|
10
|
-
|
11
|
-
## Installation
|
12
|
-
|
13
|
-
Add this line to your application's Gemfile:
|
14
|
-
|
15
|
-
```ruby
|
16
|
-
gem 'securionpay'
|
17
|
-
```
|
18
|
-
|
19
|
-
And then execute:
|
20
|
-
|
21
|
-
$ bundle
|
22
|
-
|
23
|
-
Or install it yourself as:
|
24
|
-
|
25
|
-
$ gem install securionpay
|
26
|
-
|
27
|
-
## Usage
|
28
|
-
|
29
|
-
Configuration:
|
30
|
-
|
31
|
-
|
32
|
-
```ruby
|
33
|
-
SecurionPay::Configuration.private_key = 'private_key'
|
34
|
-
```
|
35
|
-
|
36
|
-
If you want connect do different backent:
|
37
|
-
|
38
|
-
```ruby
|
39
|
-
SecurionPay::Configuration.service_url = 'https://api.chuck.norris.com'
|
40
|
-
```
|
41
|
-
|
42
|
-
### Create a new Card
|
43
|
-
Creates a new card object.
|
44
|
-
|
45
|
-
```ruby
|
46
|
-
customer_id = 'cust_id'
|
47
|
-
card = {
|
48
|
-
number: '4242424242424242',
|
49
|
-
expMonth: '11',
|
50
|
-
expYear: '2022',
|
51
|
-
cvc: '123',
|
52
|
-
cardholderName: 'John Doe',
|
53
|
-
}
|
54
|
-
|
55
|
-
SecurionPay::Cards.create(customer_id, card)
|
56
|
-
```
|
57
|
-
|
58
|
-
### Retrieve an existing Card
|
59
|
-
|
60
|
-
Retrieve an existing card object.
|
61
|
-
|
62
|
-
```ruby
|
63
|
-
customer_id = 'cust_id'
|
64
|
-
card_id = 'card_id'
|
65
|
-
|
66
|
-
SecurionPay::Cards.retrieve(customer_id, card_id)
|
67
|
-
```
|
68
|
-
|
69
|
-
### Update an existing Card
|
70
|
-
|
71
|
-
Update an existing card object.
|
72
|
-
|
73
|
-
```ruby
|
74
|
-
customer_id = 'cust_id'
|
75
|
-
card_id = 'card_id'
|
76
|
-
card = {
|
77
|
-
cardholderName: 'Mr Bean'
|
78
|
-
}
|
79
|
-
SecurionPay::Cards.update(customer_id, card_id, card)
|
80
|
-
```
|
81
|
-
|
82
|
-
### Delete a Card
|
83
|
-
|
84
|
-
Deletes an existing card object.
|
85
|
-
|
86
|
-
```ruby
|
87
|
-
customer_id = 'cust_id'
|
88
|
-
card_id = 'card_id'
|
89
|
-
SecurionPay::Cards.delete(customer_id, card_id)
|
90
|
-
```
|
91
|
-
|
92
|
-
### List Cards
|
93
|
-
|
94
|
-
List card objects for given customer.
|
95
|
-
|
96
|
-
```ruby
|
97
|
-
customer_id = 'cust_id'
|
98
|
-
SecurionPay::Cards.list(customer_id)
|
99
|
-
```
|
100
|
-
|
101
|
-
## Development
|
102
|
-
|
103
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
104
|
-
|
105
|
-
For mutation testing, run `mutant --include lib --require securionpay --use rspec SecurionPay*`
|
106
|
-
|
107
|
-
If you want to run integration tests: ``
|
108
|
-
|
109
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
110
|
-
|
111
|
-
## Contributing
|
112
|
-
|
113
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/securionpay/securionpay-ruby
|
data/Rakefile
DELETED
data/bin/setup
DELETED
data/securionpay-ruby.gemspec
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'securionpay/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "securionpay"
|
8
|
-
spec.version = SecurionPay::VERSION
|
9
|
-
spec.authors = ["Grzegorz Wilczynski"]
|
10
|
-
spec.email = ["support@securionpay.com"]
|
11
|
-
|
12
|
-
spec.summary = "SecurionPay ruby gem"
|
13
|
-
spec.description = "SecurionPay ruby gem"
|
14
|
-
spec.homepage = "https://securionpay.com"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
-
spec.bindir = "exe"
|
18
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_dependency 'httparty', '~> 0.13'
|
22
|
-
spec.add_development_dependency 'bundler', '~> 1.11'
|
23
|
-
spec.add_development_dependency "rake", "~> 11.1"
|
24
|
-
spec.add_development_dependency "rspec", "~> 3.4"
|
25
|
-
spec.add_development_dependency "pry", "~> 0.10"
|
26
|
-
spec.add_development_dependency "codeclimate-test-reporter", "~> 0.5"
|
27
|
-
end
|