goldenpay 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -14
  3. data/lib/goldenpay/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 85d798f2214443bb1c22406069ce74e535722bf0
4
- data.tar.gz: c37e27a5fb62ee6d05008406070e940e3f1a6a4c
3
+ metadata.gz: a173a17f7c1a35a8d97c9e66a660337010a84ac8
4
+ data.tar.gz: 71788811395a045ea19a801c356553461b8e6a97
5
5
  SHA512:
6
- metadata.gz: 8309690e56aa46d38b1cb4b98e281dca7b4cdd4d4162b24ac7111804cd9a17875e02fe47a4cf2a187105316675b144627102dd9ec067c5bcc620963d9bf642cc
7
- data.tar.gz: 4d75212494762d97c81479bcae3d27ffb51183fb18045e856b596ed9d6ba328cc83927e13254b1e4c911a384b4b4dbd231ea73d240d0770c2d430cc0824ff63e
6
+ metadata.gz: 8c1a2e525e32f54d69b58ebf3a22a1e1a0c2029d47a231339f914ed9d3b60da180e185ca7b09ceff2160c67b7ffc488cb4f470b569b426718b7780d55fec6891
7
+ data.tar.gz: bc06af9ffe91fc895d31f0de7dc3ca2d447e69fa2426b4fba48239c6993335eb0510d4d6c88d9bbc28f5d50312f73470f1f7e27e5ce8474d06e145eab6e5d58d
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Goldenpay
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/goldenpay`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Unoffical Ruby interface to GoldenPay online payment processing system.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
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
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
25
+ ## Configuration
28
26
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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
- ## Contributing
34
+ ## Usage
34
35
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/goldenpay. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
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
- ## Code of Conduct
66
+ ## Copyright
42
67
 
43
- Everyone interacting in the Goldenpay project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/goldenpay/blob/master/CODE_OF_CONDUCT.md).
68
+ Copyright (c) 1918-2023 Orkhan Maharramli
@@ -1,3 +1,3 @@
1
1
  module Goldenpay
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goldenpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orkhan Maharramli