paytm 0.1.1 → 0.1.3

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: b30e076ec3cda9347786d7eaf0ad44386cb6bbef
4
- data.tar.gz: a405368469803cd8dc82015db44a6fd52385f947
3
+ metadata.gz: f8cdadc2cab60dfc95586e4177adddd97814745b
4
+ data.tar.gz: e6570f18a75e99296fb545e5193731446fd391a7
5
5
  SHA512:
6
- metadata.gz: a07ae8088d6f90a68c2b5cf10cbd21964d5085c6119b0d0dee81cd8c356de534cd54bbde3ddda9b6f94e1b406b9756bf367bcd01cfde9f6fddffa90ad5435bdd
7
- data.tar.gz: 400a2ea94515c9b4bbc9753ed0fda5ee7c77fb6d9871c998a7f4cb5baba12e1e85e41e23b7a5726eb077980f8a4eb2ce5eb92cd200b983b3d1b6f45e5283c6b4
6
+ metadata.gz: f86301a4d439ff96e5d4d5e275edfb193ba36be40918e9857bfee915f0739051b4cd4a43693072507f1ad1cef7552383acf3b15a4d2d6f334f7a02bb8bf096c2
7
+ data.tar.gz: 2b4d5c6924eb816d0c89dcd6ff66c7b916b2a47159bed3c4d4a557cea100c85e74a3a6466892c5705f6f0e1286b8145bb36741827e625d10c347a8e674002894
@@ -17,11 +17,11 @@ module Paytm
17
17
  attr_accessor :request_params
18
18
  end
19
19
 
20
- def self.generate_check_sum(params)
21
- request_params[:mid] = Paytm.guid[:merchant_guid]
20
+ def self.generate_check_sum(params, mid, merchant_key)
21
+ request_params[:mid] = mid
22
22
  request_params.merge!(params)
23
23
  modified_params = Hash[ request_params.map{ |k, v| [ k.to_s.upcase, v] } ]
24
- modified_params.merge!({'CHECKSUM' => EncryptionNewPG.new_pg_checksum(modified_params, Paytm.aes_key)})
24
+ modified_params.merge!({'CHECKSUM' => EncryptionNewPG.new_pg_checksum(modified_params, merchant_key)})
25
25
  modified_params
26
26
  end
27
27
 
data/lib/paytm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Paytm
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/paytm.rb CHANGED
@@ -46,10 +46,10 @@ module Paytm
46
46
  end
47
47
 
48
48
  def self.request_headers(params)
49
- check_sum_hash = EncryptionNewPG.new_pg_checksum_by_str(params.to_json, aes_key)
49
+ check_sum_hash = EncryptionNewPG.new_pg_checksum_by_str(params, aes_key)
50
50
  headers = {
51
51
  :user_agent => "github.com/ronakjain90/paytm/#{Paytm::VERSION}",
52
- :mid => guid[:merchant_guid],
52
+ :MID => guid[:merchant_guid],
53
53
  :checksumhash => check_sum_hash,
54
54
  :content_type => 'application/json'
55
55
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paytm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ronak Jain
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-29 00:00:00.000000000 Z
11
+ date: 2016-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler