borika 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +64 -1
- data/lib/borika/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ace4319a16e67d424adf9b9c8cd8e085b02272bef40dc7a7bfccef96b112eccb
|
4
|
+
data.tar.gz: dcc66bbe7919af254a132e23e0f478f6879c24ecb5c215affd897995f0f1b562
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6932f4a134a81ab7f817ce877af203538ad2d1e7b8bafc7f53deaeb07bb7450ac7c77c0b3e91f4b444c83737741af4189d013f5e002703bd522a2f9ff0d5bedf
|
7
|
+
data.tar.gz: 3cbe99abaca387b7a86a9d31beb605a28e3c6bf06923fe194996fd06859b957877de0eec586e8a4af31ebe233e94db88c4ea013bbe47a7c8212e249f13798992
|
data/README.md
CHANGED
@@ -1 +1,64 @@
|
|
1
|
-
|
1
|
+
[Unoffical] Borica Ruby Gem for Payments
|
2
|
+
|
3
|
+
[Visit the gem at RubyGems.org](https://rubygems.org/gems/borika)
|
4
|
+
|
5
|
+
[See Borica Bank webpage for Internet 3D Secure Payments](https://www.borica.bg/en/products-and-services/Sigurni-plashtaniya-v-Internet-3d-secure-za-kartodarjatelya)
|
6
|
+
|
7
|
+
### Getting started
|
8
|
+
|
9
|
+
Add the following line to your Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'borika'
|
13
|
+
```
|
14
|
+
|
15
|
+
or
|
16
|
+
```cmd
|
17
|
+
gem install borika
|
18
|
+
require 'borika'
|
19
|
+
```
|
20
|
+
|
21
|
+
Here is a possible configuration for development `config/environments/development.rb`:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
Borika.configure do |config|
|
25
|
+
config.private_key = File.binread "testPrivateKey.key"
|
26
|
+
config.private_key_password = "Password"
|
27
|
+
config.borika_terminal_id = "11111111" # Borika KEY
|
28
|
+
config.borika_url = "https://gatet.borica.bg/boreps/"
|
29
|
+
config.request_type = "registerTransaction"
|
30
|
+
end
|
31
|
+
```
|
32
|
+
This parameters are default but you can change it while using on the fly.
|
33
|
+
|
34
|
+
Note: You must send the signed CSR file to Borica BANK, otherwise you will get, certificate error.
|
35
|
+
|
36
|
+
### Example Usage
|
37
|
+
|
38
|
+
Let's create a url
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
order_id = rand(1..200000) # Give your uniq order_id
|
42
|
+
amaount = rand(100..50000) # Integer with cents
|
43
|
+
Borika::Request.new(order_id, amount).url
|
44
|
+
```
|
45
|
+
|
46
|
+
You can also give more parameters, copy the default initializer belowe and modify it.
|
47
|
+
```ruby
|
48
|
+
Borika::Request.new(order_id, amount, order_summary: "Order #{order_id}",
|
49
|
+
time: Time.now, language: 'EN', protocol_version: '1.0', currency: 'EUR',
|
50
|
+
process_no: 10, request_type: Borika.config.request_type, terminal_id: Borika.config.borika_terminal_id,
|
51
|
+
one_time_ticket: nil).url
|
52
|
+
```
|
53
|
+
|
54
|
+
### Testing
|
55
|
+
Not tested. Works with default parameters. Welcome to pull request.
|
56
|
+
|
57
|
+
### Contributors
|
58
|
+
This repository originally inspired from
|
59
|
+
[Genadi Samokovarov's Borica Gem](https://github.com/gsamokovarov/borica)
|
60
|
+
|
61
|
+
|
62
|
+
## License
|
63
|
+
|
64
|
+
GPL Licence. Copyleft. You can copy and modify this software.
|
data/lib/borika/version.rb
CHANGED