amplifypay_ruby 1.0.0 → 1.0.1

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: 4ada543d08ed0b4791d17d2ad4359680fb93efa2
4
- data.tar.gz: 3806d7ba20e5413e86b6cc2de12596222372372a
3
+ metadata.gz: 5f87f7c7cd7e2cc68e08a12f997b93567e51bed4
4
+ data.tar.gz: 1e015159dd4a4f2a6a8754164c8322615d1a4758
5
5
  SHA512:
6
- metadata.gz: bef4e01cb9ebc78945da4ee122b8aa6293c9ef536020a830a976cefef2a5f17d5e93c69a473db521184784092d7d91dcf35cc7d68005263040fb9941acb1cf4c
7
- data.tar.gz: 0fdc33c309240781b78ab64084baec114dea10643d241ad90711f68b28465c9b96b219abad6afe91ea33670e024c1a69c7e437688fed4a8f9126bce650602b40
6
+ metadata.gz: 99751c696967ef6057977b4354ef603c54ce11546dc11b940aee7e1c3395d97d5fc3654bb41ac66f0185ead8c6aca29cb72e6c52d49fa851edee0d229735246e
7
+ data.tar.gz: 93780ec4b36f86f3dc1d6f0e6676958b990ba116331cad6fbe303c950b8de8a85899d574c4350c40f44c94a06f5e53ace150fe06e40d1fee6948702e6e7398f5
data/README.md CHANGED
@@ -29,14 +29,18 @@ If you are using rails you may create an file under `RAILS_ROOT/config/initializ
29
29
 
30
30
  AmplifypayRuby::Setup.merchant_id = "YOUR_MERCHANT_ID"
31
31
  AmplifypayRuby::Setup.private_key = "YOUR_API_PRIVATE_KEY"
32
+ AmplifypayRuby::Setup.redirect_url = "http://example.com/order"
33
+
32
34
 
33
35
  ## Create your Checkout Invoice
34
36
 
35
37
  co = AmplifypayRuby::Checkout::Invoice.new
36
38
 
37
- ## Set the total amount to be charged ! Important
39
+ ## Set transaction details ! Important
38
40
 
39
41
  co.total_amount = 1200.99
42
+ co.customer = {"email" => "john.doe@mail.com", "name" => "John Doe"}
43
+ co.trans_id = 23437888888
40
44
 
41
45
 
42
46
  ## Redirecting to your checkout invoice page
@@ -47,8 +51,12 @@ If you are using rails you may create an file under `RAILS_ROOT/config/initializ
47
51
  @message = co.response_text
48
52
  end
49
53
 
50
-
51
-
54
+ ## Verifying transactions
55
+
56
+ if co.confirm(transactionRef)
57
+ //your logic e.g
58
+ @message = co.response_text
59
+ end
52
60
 
53
61
 
54
62
  ## Contributing
@@ -52,7 +52,7 @@ module AmplifypayRuby
52
52
  customerEmail: @customer["email"],
53
53
  customerName: @customer["name"],
54
54
  Amount: @total_amount,
55
- redirectUrl: @redirect_url ,
55
+ redirectUrl: AmplifypayRuby::Setup.redirect_url,
56
56
  paymentDescription: @paymentDescription
57
57
  }
58
58
  end
@@ -2,8 +2,7 @@ module AmplifypayRuby
2
2
  module Setup
3
3
  @@merchant_id = nil
4
4
  @@private_key = nil
5
- @@public_key = nil
6
- @@token = nil
5
+ @@redirect_url = nil
7
6
  @@mode = "test"
8
7
 
9
8
  ROOT_URL_BASE = "https://api.amplifypay.com"
@@ -17,6 +16,8 @@ module AmplifypayRuby
17
16
  def self.merchant_id; @@merchant_id; end
18
17
  def self.private_key=(private_key); @@private_key = private_key; end
19
18
  def self.private_key; @@private_key; end
19
+ def self.redirect_url=(redirect_url); @@redirect_url = redirect_url; end
20
+ def self.redirect_url; @@redirect_url; end
20
21
 
21
22
 
22
23
  def self.mode=(mode); @@mode = mode; end
@@ -1,3 +1,3 @@
1
1
  module AmplifypayRuby
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amplifypay_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Innocent