zipMoney 1.0.1 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/Rakefile +20 -8
- data/lib/zipMoney/api/checkout.rb +1 -1
- data/lib/zipMoney/configuration.rb +3 -3
- data/lib/zipMoney/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 405a2f96f4ff146f445bc8d7df152175a22be4e9
|
4
|
+
data.tar.gz: e413fe819ce5516eac8ea445a2714c396304a996
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2391cfdf98196f2922617ae7ea029cf3bb4bb82218279d3f35124436c8fb657ea1f44916d1c200246ca072dab9ae1c7dc123550ae83fc056e6619a5fedad18a
|
7
|
+
data.tar.gz: 5f7bedeb0bd4c6e1f04ffae559dcc8465ff193d7bef3b81600fb9178791c62b845c4702e90c76f3c64e598b9c8e66edab6eb1c67aaf2b7f8198ef46278782f6e
|
data/README.md
CHANGED
@@ -38,10 +38,12 @@ checkout = ZipMoney::Checkout.new
|
|
38
38
|
checkout.params.charge = false
|
39
39
|
checkout.params.currency_code = "AUD"
|
40
40
|
checkout.params.txn_id = "12345"
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
quote.params.cart_url = "https://your-domain/checkout/cart/"
|
42
|
+
quote.params.success_url = "https://your-domain/zipmoney/express/success/"
|
43
|
+
quote.params.cancel_url = "https://your-domain/zipmoney/express/cancel/"
|
44
|
+
quote.params.error_url = "https://your-domain/zipmoney/express/error/"
|
45
|
+
quote.params.refer_url = "https://your-domain/zipmoney/express/refer/"
|
46
|
+
quote.params.decline_url = "https://your-domain/zipmoney/express/decline/"
|
45
47
|
checkout.params.order_id = "91005500"
|
46
48
|
|
47
49
|
# Order Info
|
@@ -98,6 +100,7 @@ end
|
|
98
100
|
```
|
99
101
|
##### Quote
|
100
102
|
Order should be created after payment is complete, usually when the zipMoney api invokes the /confirmorder endpoint of the store or on the return journey
|
103
|
+
|
101
104
|
```ruby
|
102
105
|
# Initialize the checkout
|
103
106
|
quote = ZipMoney::Quote.new
|
@@ -168,6 +171,7 @@ end
|
|
168
171
|
|
169
172
|
##### Refund
|
170
173
|
Performs full or partial refund of the order
|
174
|
+
|
171
175
|
```ruby
|
172
176
|
# Initialize the refund
|
173
177
|
refund = ZipMoney::Refund.new
|
@@ -200,6 +204,7 @@ end
|
|
200
204
|
|
201
205
|
##### Cancel
|
202
206
|
Performs cancellation of the order
|
207
|
+
|
203
208
|
```ruby
|
204
209
|
# Initialize the cancel
|
205
210
|
cancel = ZipMoney::Cancel.new
|
@@ -252,6 +257,7 @@ end
|
|
252
257
|
|
253
258
|
##### Capture
|
254
259
|
Captures the payment for the order
|
260
|
+
|
255
261
|
```ruby
|
256
262
|
# Initialize the capture
|
257
263
|
capture = ZipMoney::Capture.new
|
data/Rakefile
CHANGED
@@ -1,13 +1,25 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
-
|
3
2
|
require 'rspec/core/rake_task'
|
4
3
|
|
5
4
|
RSpec::Core::RakeTask.new('spec')
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
task :make do
|
7
|
+
if ENV['branch'] =~ /^(\*|\d+(\.\d+){0,2}(\.\*)?)$/
|
8
|
+
puts "Is a tag! So building gem ..."
|
9
|
+
Rake::Task["build"].invoke
|
10
|
+
else
|
11
|
+
puts "Not a tag!"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
task :publish do
|
16
|
+
if ENV['branch'] =~ /^(\*|\d+(\.\d+){0,2}(\.\*)?)$/
|
17
|
+
puts "Is a tag! So publishing gem to rubygems.org ..."
|
18
|
+
arguments = ['gem', 'push', "pkg/zipMoney-#{ENV['branch']}.gem"]
|
19
|
+
system(*arguments)
|
20
|
+
else
|
21
|
+
puts "Not a tag!"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
task :test => :spec
|
@@ -4,7 +4,7 @@ module ZipMoney
|
|
4
4
|
|
5
5
|
attr_accessor :params
|
6
6
|
|
7
|
-
Struct.new("CheckoutParams", :charge, :currency_code, :
|
7
|
+
Struct.new("CheckoutParams", :charge, :currency_code, :cart_url, :success_url, :cancel_url, :refer_url, :error_url, :decline_url, :in_store, :txn_id, :token, :merchant_id, :merchant_key,
|
8
8
|
:order_id, :order, :consumer, :billing_address, :shipping_address, :version, :metadata)
|
9
9
|
|
10
10
|
# Initializes a ZipMoney::Checkout object
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module ZipMoney
|
2
2
|
class Configuration
|
3
3
|
|
4
|
-
API_VERSION = "1.0.
|
4
|
+
API_VERSION = "1.0.4"
|
5
5
|
API_PLATFORM = "ruby"
|
6
|
-
API_NAME
|
6
|
+
API_NAME = "zipMoney Ruby SDK"
|
7
7
|
|
8
8
|
ENV_LIVE_API_URL = "https://api.zipmoney.com.au/v1/"
|
9
9
|
ENV_TEST_API_URL = "https://api.sandbox.zipmoney.com.au/v1/"
|
@@ -46,4 +46,4 @@ module ZipMoney
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
49
|
-
end
|
49
|
+
end
|
data/lib/zipMoney/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zipMoney
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sagar Bhandari
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|