paygate-ruby 0.1.6 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +45 -28
- data/LICENSE.txt +21 -21
- data/README.md +327 -316
- data/Rakefile +3 -2
- data/data/card_bin_20191001.xlsx +0 -0
- data/data/config.yml +2744 -2686
- data/lib/paygate/aes.rb +150 -150
- data/lib/paygate/aes_ctr.rb +133 -133
- data/lib/paygate/configuration.rb +16 -16
- data/lib/paygate/helpers/form_helper.rb +155 -80
- data/lib/paygate/member.rb +21 -21
- data/lib/paygate/profile.rb +30 -30
- data/lib/paygate/response.rb +25 -25
- data/lib/paygate/transaction.rb +58 -47
- data/lib/paygate/version.rb +3 -3
- data/lib/paygate-ruby.rb +48 -48
- data/spec/integration/paygate_spec.rb +9 -0
- data/spec/spec_helper.rb +10 -0
- data/vendor/assets/javascripts/paygate.js +86 -81
- metadata +38 -26
- data/.gitignore +0 -9
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -4
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/data/card_bin_20190201.xlsx +0 -0
- data/paygate-ruby.gemspec +0 -24
@@ -1,81 +1,86 @@
|
|
1
|
-
window.Paygate = (function() {
|
2
|
-
function Paygate() {}
|
3
|
-
|
4
|
-
Paygate.fieldsMap = {
|
5
|
-
mid: 'mid',
|
6
|
-
locale: 'langcode',
|
7
|
-
charset: 'charset',
|
8
|
-
title: 'goodname',
|
9
|
-
currency: 'goodcurrency',
|
10
|
-
amount: 'unitprice',
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
return
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
1
|
+
window.Paygate = (function() {
|
2
|
+
function Paygate() {}
|
3
|
+
|
4
|
+
Paygate.fieldsMap = {
|
5
|
+
mid: 'mid',
|
6
|
+
locale: 'langcode',
|
7
|
+
charset: 'charset',
|
8
|
+
title: 'goodname',
|
9
|
+
currency: 'goodcurrency',
|
10
|
+
amount: 'unitprice',
|
11
|
+
meta1: 'goodoption1',
|
12
|
+
meta2: 'goodoption2',
|
13
|
+
meta3: 'goodoption3',
|
14
|
+
meta4: 'goodoption4',
|
15
|
+
meta5: 'goodoption5',
|
16
|
+
payMethod: 'paymethod',
|
17
|
+
customerName: 'receipttoname',
|
18
|
+
customerEmail: 'receipttoemail',
|
19
|
+
cardNumber: 'cardnumber',
|
20
|
+
expiryYear: 'cardexpireyear',
|
21
|
+
expiryMonth: 'cardexpiremonth',
|
22
|
+
cvv: 'cardsecretnumber',
|
23
|
+
cardAuthCode: 'cardauthcode',
|
24
|
+
responseCode: 'replycode',
|
25
|
+
responseMessage: 'replyMsg',
|
26
|
+
tid: 'tid',
|
27
|
+
profileNo: 'profile_no',
|
28
|
+
hashResult: 'hashresult'
|
29
|
+
};
|
30
|
+
|
31
|
+
Paygate.openPayApiForm = function() {
|
32
|
+
return document.querySelector('form[name=PGIOForm]');
|
33
|
+
};
|
34
|
+
|
35
|
+
Paygate.openPayApiScreen = function() {
|
36
|
+
return document.querySelector('#PGIOscreen');
|
37
|
+
};
|
38
|
+
|
39
|
+
Paygate.openPayApiFields = function() {
|
40
|
+
var formChildren = Array.from(this.openPayApiForm().children);
|
41
|
+
return formChildren.filter(function(el) {
|
42
|
+
return el.tagName === 'INPUT';
|
43
|
+
});
|
44
|
+
}
|
45
|
+
|
46
|
+
Paygate.findInputByName = function(name) {
|
47
|
+
var mappedName = this.fieldsMap[name];
|
48
|
+
return this.openPayApiFields().filter(function(el) {
|
49
|
+
return el.name === mappedName;
|
50
|
+
})[0];
|
51
|
+
};
|
52
|
+
|
53
|
+
Paygate.cardAuthCode = function() {
|
54
|
+
return this.findInputByName('cardAuthCode').value;
|
55
|
+
};
|
56
|
+
|
57
|
+
Paygate.responseCode = function() {
|
58
|
+
return this.findInputByName('responseCode').value;
|
59
|
+
};
|
60
|
+
|
61
|
+
Paygate.responseMessage = function() {
|
62
|
+
return this.findInputByName('responseMessage').value;
|
63
|
+
};
|
64
|
+
|
65
|
+
Paygate.tid = function() {
|
66
|
+
return this.findInputByName('tid').value;
|
67
|
+
};
|
68
|
+
|
69
|
+
Paygate.profileNo = function() {
|
70
|
+
return this.findInputByName('profileNo').value;
|
71
|
+
};
|
72
|
+
|
73
|
+
Paygate.hashResult = function() {
|
74
|
+
return this.findInputByName('hashResult').value;
|
75
|
+
};
|
76
|
+
|
77
|
+
Paygate.fillInput = function(field, value) {
|
78
|
+
this.findInputByName(field).value = value;
|
79
|
+
};
|
80
|
+
|
81
|
+
Paygate.submitForm = function() {
|
82
|
+
doTransaction(document.PGIOForm);
|
83
|
+
};
|
84
|
+
|
85
|
+
return Paygate;
|
86
|
+
})();
|
metadata
CHANGED
@@ -1,60 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paygate-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jagdeepsingh
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description:
|
42
56
|
email:
|
43
57
|
- jagdeepsingh.125k@gmail.com
|
44
58
|
executables: []
|
45
59
|
extensions: []
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
48
|
-
- ".gitignore"
|
49
62
|
- CHANGELOG.md
|
50
|
-
- CODE_OF_CONDUCT.md
|
51
|
-
- Gemfile
|
52
63
|
- LICENSE.txt
|
53
64
|
- README.md
|
54
65
|
- Rakefile
|
55
|
-
-
|
56
|
-
- bin/setup
|
57
|
-
- data/card_bin_20190201.xlsx
|
66
|
+
- data/card_bin_20191001.xlsx
|
58
67
|
- data/config.yml
|
59
68
|
- lib/paygate-ruby.rb
|
60
69
|
- lib/paygate/aes.rb
|
@@ -66,13 +75,14 @@ files:
|
|
66
75
|
- lib/paygate/response.rb
|
67
76
|
- lib/paygate/transaction.rb
|
68
77
|
- lib/paygate/version.rb
|
69
|
-
-
|
78
|
+
- spec/integration/paygate_spec.rb
|
79
|
+
- spec/spec_helper.rb
|
70
80
|
- vendor/assets/javascripts/paygate.js
|
71
|
-
homepage:
|
81
|
+
homepage:
|
72
82
|
licenses:
|
73
83
|
- MIT
|
74
84
|
metadata: {}
|
75
|
-
post_install_message:
|
85
|
+
post_install_message:
|
76
86
|
rdoc_options: []
|
77
87
|
require_paths:
|
78
88
|
- lib
|
@@ -87,8 +97,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
97
|
- !ruby/object:Gem::Version
|
88
98
|
version: '0'
|
89
99
|
requirements: []
|
90
|
-
rubygems_version: 3.
|
91
|
-
signing_key:
|
100
|
+
rubygems_version: 3.2.3
|
101
|
+
signing_key:
|
92
102
|
specification_version: 4
|
93
|
-
summary: Ruby wrapper for PayGate payment gateway
|
94
|
-
test_files:
|
103
|
+
summary: Ruby wrapper for PayGate Korea payment gateway
|
104
|
+
test_files:
|
105
|
+
- spec/integration/paygate_spec.rb
|
106
|
+
- spec/spec_helper.rb
|
data/.gitignore
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at jagdeep.singh@vinsol.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "paygate"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/data/card_bin_20190201.xlsx
DELETED
Binary file
|
data/paygate-ruby.gemspec
DELETED
@@ -1,24 +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 "paygate/version"
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "paygate-ruby"
|
8
|
-
spec.version = Paygate::VERSION
|
9
|
-
spec.authors = ["jagdeepsingh"]
|
10
|
-
spec.email = ["jagdeepsingh.125k@gmail.com"]
|
11
|
-
|
12
|
-
spec.summary = 'Ruby wrapper for PayGate payment gateway'
|
13
|
-
spec.license = "MIT"
|
14
|
-
|
15
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
16
|
-
f.match(%r{^(test|spec|features)/})
|
17
|
-
end
|
18
|
-
spec.bindir = "exe"
|
19
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
-
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
spec.add_development_dependency "bundler", "~> 1.15"
|
23
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
-
end
|