razorpay 1.1.0 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c0396ec4e66f7709c0015dbd719d1228f16a263
4
- data.tar.gz: a07628e71d535bea177c8b6a8dce5f5e8eed41e5
3
+ metadata.gz: 17c4aad5f24c1236ebd6451887926d9bf5b45b34
4
+ data.tar.gz: ae0ef8f24f6de62bdf014e9a22b0a70de095a924
5
5
  SHA512:
6
- metadata.gz: 691135fd6c97c7f5160e11cfd4abacb7eba6f743beb6c700411e12748e732274498e0ba11bbf157beb73ad70ae64a69540c2110878bdb0c1599c07789e080e5d
7
- data.tar.gz: 46da895b2cddcede8094b96161890ca1b77adefdeeb289cc011215c230ddc80f8dc2de6f20fc455a16533ee04a54b42e054706b529e53d26db52205824f03932
6
+ metadata.gz: 127d16bbbc8b8a19a8cc4a0be9cab4d167781af3dd4fa847a4f9d7293044f732c5608f3eed52a82ec786280305fd80d5b35ddc3c448eeceaa5cd9f7f5652b012
7
+ data.tar.gz: eefee7a5c5011b3f88e0efec3763fc16ecda6f7469bf3e65a732adc3db1c228cef45ac8dea52f43c5fa0f39a23df67c967e5c1de4427fbb6610988dc66f115f5
data/.travis.yml CHANGED
@@ -1,7 +1,6 @@
1
1
  language: ruby # Auto-detected as well
2
2
  rvm:
3
- - "1.9.3"
4
3
  - "2.0.0"
5
- - "2.1.8"
6
- - "2.2.4"
7
- - "2.3.0"
4
+ - "2.1.10"
5
+ - "2.2.6"
6
+ - "2.3.3"
data/CHANGELOG CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Changelog for Razorpay-Ruby SDK.
4
4
 
5
+ ## Unreleased
6
+
7
+ ## [1.2.0] - 2016-11-23
8
+ ### Added
9
+ - Fixed payment.method as an attribute accessor
10
+
5
11
  ## [1.1.0] - 2016-02-25
6
12
  ### Added
7
13
  - Add support for Orders API
@@ -19,7 +25,8 @@ Changelog for Razorpay-Ruby SDK.
19
25
  ### Added
20
26
  - Initial Release
21
27
 
22
- [Unreleased]: https://github.com/razorpay/razorpay-ruby/compare/1.1.0...HEAD
28
+ [Unreleased]: https://github.com/razorpay/razorpay-ruby/compare/1.2.0...HEAD
29
+ [1.2.0]: https://github.com/razorpay/razorpay-ruby/compare/1.1.0...1.2.0
23
30
  [1.1.0]: https://github.com/razorpay/razorpay-ruby/compare/1.0.3...1.1.0
24
31
  [1.0.3]: https://github.com/razorpay/razorpay-ruby/compare/1.0.1...1.0.3
25
32
  [1.0.1]: https://github.com/razorpay/razorpay-ruby/compare/1.0.0...1.0.1
data/README.md CHANGED
@@ -8,7 +8,9 @@ This is the base ruby gem for interacting with the Razorpay API. This is primari
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
- gem 'razorpay'
11
+ ```rb
12
+ gem 'razorpay'
13
+ ```
12
14
 
13
15
  And then execute:
14
16
 
@@ -24,7 +26,9 @@ Remember to `require razorpay` before anything else.
24
26
 
25
27
  Next, you need to setup your key and secret using the following:
26
28
 
27
- Razorpay.setup("merchant_key_id", "merchant_key_secret")
29
+ ```rb
30
+ Razorpay.setup("merchant_key_id", "merchant_key_secret")
31
+ ```
28
32
 
29
33
  You can find your API keys at <https://dashboard.razorpay.com/#/app/keys>.
30
34
 
@@ -32,13 +36,17 @@ If you are using rails, the right place to do this might be `config/initializers
32
36
 
33
37
  The most common construct is capturing a payment, which you do via the following:
34
38
 
35
- Razorpay::Payment.fetch("pay-ment_id").capture({amount:500})
36
- # Note that the amount should come from your session, so as to verify
37
- # that the purchase was correctly done and not tampered
39
+ ```rb
40
+ Razorpay::Payment.fetch("pay-ment_id").capture({amount:500})
41
+ # Note that the amount should come from your session, so as to verify
42
+ # that the purchase was correctly done and not tampered
43
+ ```
38
44
 
39
45
  You can handle refunds using the following constructs:
40
46
 
41
- Razorpay::Payment.fetch("pay-ment_id").refund({amount:500})
47
+ ```rb
48
+ Razorpay::Payment.fetch("payment_id").refund({amount:500})
49
+ ```
42
50
 
43
51
  For other applications (such as fetching payments and refunds),
44
52
  see our online documentation on <https://docs.razorpay.com>
@@ -82,5 +90,3 @@ payments = order.payments
82
90
  4. Commit your changes (`git commit -am 'Add some feature'`)
83
91
  5. Push to the branch (`git push origin my-new-feature`)
84
92
  6. Create a new Pull Request
85
-
86
- ##
@@ -2,5 +2,5 @@
2
2
  module Razorpay
3
3
  BASE_URI = 'https://api.razorpay.com/v1/'.freeze
4
4
  TEST_URL = 'https://api.razorpay.com/'.freeze
5
- VERSION = '1.1.0'.freeze
5
+ VERSION = '1.2.0'.freeze
6
6
  end
@@ -32,5 +32,10 @@ module Razorpay
32
32
  raise ArgumentError, 'Please provide capture amount' unless options.key?(:amount)
33
33
  self.class.request.post "#{id}/capture", options
34
34
  end
35
+
36
+ def method
37
+ method_missing(:method)
38
+ end
39
+
35
40
  end
36
41
  end
@@ -9,5 +9,6 @@
9
9
  "error_code": null,
10
10
  "error_description": null,
11
11
  "udf": {},
12
- "created_at": 1400826750
13
- }
12
+ "created_at": 1400826750,
13
+ "method": "card"
14
+ }
@@ -21,6 +21,8 @@ module Razorpay
21
21
  payment = Razorpay::Payment.fetch(@payment_id)
22
22
  assert_instance_of Razorpay::Payment, payment, 'Payment not an instance of Payment class'
23
23
  assert_equal @payment_id, payment.id, 'Payment IDs do not match'
24
+ assert_equal 500, payment.amount, 'Payment amount is accessible'
25
+ assert_equal 'card', payment.method, 'Payment method is accessible'
24
26
  end
25
27
 
26
28
  def test_all_payments
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: razorpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abhay Rana
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-25 00:00:00.000000000 Z
11
+ date: 2016-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  requirements: []
152
152
  rubyforge_project:
153
- rubygems_version: 2.4.8
153
+ rubygems_version: 2.5.1
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: Razorpay's Ruby API