promise_pay 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/promise_pay/session.rb +1 -3
- data/lib/promise_pay/version.rb +1 -1
- data/spec/promise_pay/session_spec.rb +19 -2
- 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: e0c048107ccfebb6495ee2ae85ba653759e0223e
|
4
|
+
data.tar.gz: b40fcdfac8462ce175d35a19bc059140f5d6dcd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16805d5abd93e49ec63297768c880ace48b95a97e80f95499d8d380f799d6bdd6cb50d7601f581d6624c3b01924b0c549a06a7faa6b63fd5c5c76d2e89c2c1fa
|
7
|
+
data.tar.gz: b65aa2b9604341517f614d3a817be23b6d6f55d44b1b06b5ac06d623ae0c598f7391c9b905b413d949a7e3212ae5ace65377f68ab08f639ee96e09a9396680a3
|
data/lib/promise_pay/session.rb
CHANGED
@@ -72,7 +72,7 @@ module PromisePay
|
|
72
72
|
external_buyer_id: external_buyer_id,
|
73
73
|
fee_ids: fee_ids,
|
74
74
|
payment_type_id: payment_type_id
|
75
|
-
}.to_param
|
75
|
+
}.reject { |k,v| v.nil? }.to_param
|
76
76
|
end
|
77
77
|
|
78
78
|
def enforce_valid_params!
|
@@ -89,9 +89,7 @@ module PromisePay
|
|
89
89
|
:currency,
|
90
90
|
:item_name,
|
91
91
|
:amount,
|
92
|
-
:seller_lastname,
|
93
92
|
:seller_firstname,
|
94
|
-
:buyer_lastname,
|
95
93
|
:buyer_firstname,
|
96
94
|
:seller_email,
|
97
95
|
:buyer_email,
|
data/lib/promise_pay/version.rb
CHANGED
@@ -47,8 +47,25 @@ describe PromisePay::Session do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
context "with invalid params" do
|
50
|
-
|
51
|
-
|
50
|
+
required_params =
|
51
|
+
[
|
52
|
+
:current_user_id,
|
53
|
+
:currency,
|
54
|
+
:item_name,
|
55
|
+
:amount,
|
56
|
+
:seller_firstname,
|
57
|
+
:buyer_firstname,
|
58
|
+
:seller_email,
|
59
|
+
:buyer_email,
|
60
|
+
:external_item_id,
|
61
|
+
:external_seller_id,
|
62
|
+
:external_buyer_id,
|
63
|
+
:fee_ids,
|
64
|
+
:payment_type_id
|
65
|
+
]
|
66
|
+
|
67
|
+
required_params.each do |param|
|
68
|
+
let(:invalid_params) { valid_params.reject { |k, v| k == param } }
|
52
69
|
let(:session) { described_class.new(invalid_params) }
|
53
70
|
|
54
71
|
it "raises an error if #{param[0]} option is missing" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: promise_pay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liam Norton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|