goldenpay 0.1.1 → 0.1.2
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 +4 -4
- data/README.md +39 -14
- data/lib/goldenpay/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a173a17f7c1a35a8d97c9e66a660337010a84ac8
|
4
|
+
data.tar.gz: 71788811395a045ea19a801c356553461b8e6a97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c1a2e525e32f54d69b58ebf3a22a1e1a0c2029d47a231339f914ed9d3b60da180e185ca7b09ceff2160c67b7ffc488cb4f470b569b426718b7780d55fec6891
|
7
|
+
data.tar.gz: bc06af9ffe91fc895d31f0de7dc3ca2d447e69fa2426b4fba48239c6993335eb0510d4d6c88d9bbc28f5d50312f73470f1f7e27e5ce8474d06e145eab6e5d58d
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# Goldenpay
|
2
2
|
|
3
|
-
|
3
|
+
Unoffical Ruby interface to GoldenPay online payment processing system.
|
4
4
|
|
5
|
-
|
5
|
+
WARNING: This code is in no way affiliated with, authorised, maintained,
|
6
|
+
sponsored or endorsed by GoldenPay LLC or any of its affiliates or subsidiaries.
|
7
|
+
This is an independent and unofficial. Use at your own risk.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
@@ -20,24 +22,47 @@ Or install it yourself as:
|
|
20
22
|
|
21
23
|
$ gem install goldenpay
|
22
24
|
|
23
|
-
##
|
24
|
-
|
25
|
-
TODO: Write usage instructions here
|
26
|
-
|
27
|
-
## Development
|
25
|
+
## Configuration
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
```ruby
|
28
|
+
Goldenpay.configure do |config|
|
29
|
+
config.merchant_name = "your_merchant_name"
|
30
|
+
config.auth_key = "your_auth_key"
|
31
|
+
end
|
32
|
+
```
|
32
33
|
|
33
|
-
##
|
34
|
+
## Usage
|
34
35
|
|
35
|
-
|
36
|
+
```ruby
|
37
|
+
# Payment authorization
|
38
|
+
options = {
|
39
|
+
card_type: "v", # v for visa, or m for mastercard
|
40
|
+
lang: "en",
|
41
|
+
amount: "100",
|
42
|
+
description: "testing payment"
|
43
|
+
}
|
44
|
+
|
45
|
+
request_options = Goldenpay::Request.generate_options(options)
|
46
|
+
|
47
|
+
begin
|
48
|
+
payment_key = Goldenpay::Request.get_payment_key request_options
|
49
|
+
return redirect_to Goldenpay.payment_page_url + payment_key
|
50
|
+
rescue Goldenpay::Error => e
|
51
|
+
puts e.message
|
52
|
+
end
|
53
|
+
|
54
|
+
# Check transaction results
|
55
|
+
begin
|
56
|
+
results = Goldenpay::Request.get_results("payment_key")
|
57
|
+
rescue Goldenpay::Error => e
|
58
|
+
puts e.message
|
59
|
+
end
|
60
|
+
```
|
36
61
|
|
37
62
|
## License
|
38
63
|
|
39
64
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
40
65
|
|
41
|
-
##
|
66
|
+
## Copyright
|
42
67
|
|
43
|
-
|
68
|
+
Copyright (c) 1918-2023 Orkhan Maharramli
|
data/lib/goldenpay/version.rb
CHANGED