mellat 0.1.5 → 0.1.6

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: e6c57b69bb837674c81594d802acbc4161312291
4
- data.tar.gz: 0978338621d321fcee00e5bf6a21937eb84ca672
3
+ metadata.gz: a49296fda88c49416c81505be3e81a8f75da8490
4
+ data.tar.gz: 74ab62bc9e7a32e617ee67281d7176b283f0065f
5
5
  SHA512:
6
- metadata.gz: 5682b7373e4f64353db87f8be2eeefb1fcfc7740569ceda98a5748d5b64e6b592ee04a2a693970b31a3b67386585807cd290662c32d1a813456441881c00581e
7
- data.tar.gz: 46b0806c8d29d4733fa10a2ed3c3def16ba4bbcb103b3827fdca0705db5204821099fb83d9aa6a98c7b5579ba1ffafb72764b5a0db1aa2ca0991b8bb9440e549
6
+ metadata.gz: 0361ffda9dfa4710c47dcbcd97ac49c8f19345a28b8bf0dd5a0488d724c015838981cd34d3d79bf815cc9490115a9a1f56a537c2fdd4fbb5072f04b372edcfe6
7
+ data.tar.gz: fd9b3f1fc495fd32713df877077c76aa6f577b37dd4e510f130d1b341ca89b36c84b3db0765dd5218ad8f4310be88094d81d21d6de7d29df5b29ffa30d1c57a1
@@ -2,22 +2,28 @@
2
2
  require 'mellat/plug/unique_bank_code'
3
3
  module Mellat
4
4
 
5
- module BankName
5
+ module BankHelper
6
6
  def to_bank
7
7
  id=self.to_s[0...6]
8
8
  return Mellat::UniqueBankCode::IDS[id]
9
9
  end
10
+
11
+ def bank_url
12
+ id=self.to_s[0...6]
13
+ return Mellat::UniqueBankCode::URLS[id]
14
+ end
15
+
10
16
  end
11
17
 
12
18
  end
13
19
 
14
20
  class Integer
15
21
  # Patch Integer class to include `to_bank` method
16
- include Mellat::BankName
22
+ include Mellat::BankHelper
17
23
 
18
24
  end
19
25
 
20
26
  class String
21
27
  # Patch Integer class to include `to_bank` method
22
- include Mellat::BankName
28
+ include Mellat::BankHelper
23
29
  end
@@ -27,5 +27,36 @@ module Mellat
27
27
  '627381' => 'بانک انصار',
28
28
  '639370' => 'بانک مهر اقتصاد',
29
29
  }
30
+
31
+ URLS = {
32
+ '603799' => 'https://www.bmi.ir',
33
+ '589210' => 'http://www.banksepah.ir',
34
+ '627648' => 'https://www.edbi.ir',
35
+ '627961' => 'http://www.bim.ir',
36
+ '603770' => 'http://www.bki.ir',
37
+ '628023' => 'http://www.bank-maskan.ir',
38
+ '627760' => 'http://www.postbank.ir',
39
+ '502908' => 'http://www.ttbank.ir',
40
+ '627412' => 'http://www.enbank.ir',
41
+ '622106' => 'http://www.parsian-bank.ir',
42
+ '502229' => 'http://www.bpi.ir',
43
+ '627488' => 'http://www.karafarinbank.ir',
44
+ '621986' => 'https://www.sb24.com',
45
+ '639346' => 'http://www.sinabank.ir',
46
+ '639607' => 'http://www.sbank.ir',
47
+ '636214' => 'https://www.ba24.ir',
48
+ '502806' => 'http://www.shahr-bank.ir',
49
+ '502938' => 'http://www.bank-day.org',
50
+ '603769' => 'http://www.bsi.ir',
51
+ '610433' => 'http://www.bankmellat.ir',
52
+ '627353' => 'http://www.tejaratbank.ir',
53
+ '589463' => 'https://www.rb24.ir/',
54
+ '627381' => 'https://www.ansarbank.com',
55
+ '639370' => 'https://www.mebank.ir',
56
+ }
57
+
58
+
59
+
60
+
30
61
  end
31
62
  end
@@ -1,5 +1,5 @@
1
1
  module Mellat
2
2
 
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
 
5
5
  end
data/lib/mellat.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require "mellat/version"
2
2
  require "mellat/requisition"
3
3
  require "mellat/respond"
4
- require "mellat/plug/bank_name"
4
+ require "mellat/plug/bank_helper"
5
5
 
6
6
  module Mellat
7
7
 
@@ -15,6 +15,7 @@ module Mellat
15
15
 
16
16
  class Configuration
17
17
  attr_accessor :terminalId, :userName, :userPassword, :wsdl, :callBackUrl
18
+
18
19
  def initialize
19
20
 
20
21
  end
data/mellat.gemspec CHANGED
@@ -9,19 +9,20 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["mohammad mahmoudi"]
10
10
  spec.email = ["mm580486@gmail.com"]
11
11
 
12
- spec.summary = %q{A gem to to send and verify payments with mellat bank}
12
+ spec.summary = %q{A gem for send and verify payments with mellat bank(beh pardakht)}
13
13
  spec.homepage = "https://github.com/mm580486/mellat"
14
- spec.license = "MIT"
14
+ spec.license = "WTFPL"
15
15
 
16
16
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
17
  # to allow pushing to a single host or delete this section to allow pushing to any host.
18
18
 
19
- spec.add_dependency 'savon', ['~> 2.0']
20
- spec.add_dependency 'i18n', ['~> 0.8.0']
19
+ spec.add_dependency 'savon', ['~> 2.0']
20
+ spec.add_dependency 'i18n', ['~> 0.8.0']
21
21
 
22
22
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
23
23
  f.match(%r{^(test|spec|features)/})
24
24
  end
25
+
25
26
  spec.bindir = "exe"
26
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
28
  spec.require_paths = ["lib"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mellat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - mohammad mahmoudi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-05 00:00:00.000000000 Z
11
+ date: 2017-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon
@@ -99,7 +99,7 @@ files:
99
99
  - lib/generators/mellat/install_generator.rb
100
100
  - lib/generators/templates/mellat_initializer.rb
101
101
  - lib/mellat.rb
102
- - lib/mellat/plug/bank_name.rb
102
+ - lib/mellat/plug/bank_helper.rb
103
103
  - lib/mellat/plug/unique_bank_code.rb
104
104
  - lib/mellat/requisition.rb
105
105
  - lib/mellat/respond.rb
@@ -107,7 +107,7 @@ files:
107
107
  - mellat.gemspec
108
108
  homepage: https://github.com/mm580486/mellat
109
109
  licenses:
110
- - MIT
110
+ - WTFPL
111
111
  metadata: {}
112
112
  post_install_message:
113
113
  rdoc_options: []
@@ -128,5 +128,5 @@ rubyforge_project:
128
128
  rubygems_version: 2.5.1
129
129
  signing_key:
130
130
  specification_version: 4
131
- summary: A gem to to send and verify payments with mellat bank
131
+ summary: A gem for send and verify payments with mellat bank(beh pardakht)
132
132
  test_files: []