paytrace 0.1.14 → 0.1.15
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 +4 -4
- data/lib/paytrace/configuration.rb +2 -1
- data/lib/paytrace/version.rb +1 -1
- data/test/paytrace/configuration_spec.rb +4 -4
- data/test/scripts/run_change_password.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 251992bb528837bcd89638254f1cc8173fc319e7
|
4
|
+
data.tar.gz: fa64e72359cbe019d637e88c0fb4d056da706b1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef17056bab255daa9f06e97ea80b528d95fc2af7ac3a4094cfcb4cdf2019c48d70b197f0f1cad93cfcd38f6b343b785c8387750b796bc41b500fec423efa25b6
|
7
|
+
data.tar.gz: 53ea32dd344813193352b44622eaf602a156c5b895d0360c46994942f2eb7004313f3dfba26338a1314b159f8c1379eac8e9e99e0f407b57e56c87ec754b6628
|
@@ -13,7 +13,8 @@ module PayTrace
|
|
13
13
|
def update_password(params)
|
14
14
|
request = PayTrace::API::Request.new
|
15
15
|
request.set_param(:method, RESET_PASSWORD_METHOD)
|
16
|
-
request.
|
16
|
+
request.set_param(:new_password, params[:new_password])
|
17
|
+
request.set_param(:new_password_confirmation, params[:new_password])
|
17
18
|
gateway = PayTrace::API::Gateway.new
|
18
19
|
response = gateway.send_request(request)
|
19
20
|
|
data/lib/paytrace/version.rb
CHANGED
@@ -40,13 +40,13 @@ describe PayTrace::Configuration do
|
|
40
40
|
|
41
41
|
old_password = PayTrace.configuration.password
|
42
42
|
c = PayTrace::Configuration.new
|
43
|
-
c.update_password(new_password: 'foobar'
|
43
|
+
c.update_password(new_password: 'foobar')
|
44
44
|
|
45
45
|
PayTrace::API::Gateway.last_request.must_equal "UN~#{PayTrace.configuration.user_name}|PSWD~#{old_password}|TERMS~Y|" +
|
46
46
|
"METHOD~UpdatePassword|NEWPSWD~foobar|NEWPSWD2~foobar|"
|
47
47
|
|
48
48
|
PayTrace::API::Gateway.next_response = "RESPONSE~100. Your password was successfully updated."
|
49
|
-
c.update_password(new_password: old_password
|
49
|
+
c.update_password(new_password: old_password)
|
50
50
|
end
|
51
51
|
|
52
52
|
it "changes the config password when you successfully call update_password" do
|
@@ -55,11 +55,11 @@ describe PayTrace::Configuration do
|
|
55
55
|
|
56
56
|
old_password = PayTrace.configuration.password
|
57
57
|
c = PayTrace::Configuration.new
|
58
|
-
c.update_password(new_password: 'foobar'
|
58
|
+
c.update_password(new_password: 'foobar')
|
59
59
|
|
60
60
|
PayTrace.configuration.password.must_equal 'foobar'
|
61
61
|
|
62
62
|
PayTrace::API::Gateway.next_response = "RESPONSE~100. Your password was successfully updated."
|
63
|
-
c.update_password(new_password: old_password
|
63
|
+
c.update_password(new_password: old_password)
|
64
64
|
end
|
65
65
|
end
|
@@ -8,5 +8,5 @@ PayTrace::Debug.configure_test("tom_test_user", "password4", "dev2.paytrace.com"
|
|
8
8
|
PayTrace::Debug.trace {
|
9
9
|
# change my demo user password...
|
10
10
|
# note, if you run this, it won't run again because the password has been changed :)
|
11
|
-
PayTrace.configuration.update_password(new_password: 'password5'
|
11
|
+
PayTrace.configuration.update_password(new_password: 'password5')
|
12
12
|
}
|