nimbleshop_stripe 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/nimbleshop_stripe/payments_controller.rb +9 -6
- data/app/controllers/nimbleshop_stripe/stripes_controller.rb +8 -22
- data/app/models/nimbleshop_stripe/stripe.rb +1 -1
- data/app/views/nimbleshop_stripe/payments/_new.html.erb +6 -2
- data/app/views/nimbleshop_stripe/stripes/_edit.html.erb +59 -24
- data/lib/nimbleshop_stripe/processor.rb +32 -64
- data/lib/tasks/nimbleshop_stripe_tasks.rake +2 -2
- data/test/unit/payment_method_test.rb +7 -7
- data/test/unit/processor_test.rb +35 -199
- data/test/vcr_cassettes/stripe/purchase-failure.yml +49 -0
- data/test/vcr_cassettes/stripe/purchase-success-for-refund.yml +113 -0
- data/test/vcr_cassettes/stripe/purchase-success.yml +112 -0
- data/test/vcr_cassettes/stripe/refund-success.yml +62 -0
- metadata +12 -28
- data/app/views/nimbleshop_stripe/stripes/_form.html.erb +0 -68
- data/lib/nimbleshop_stripe/util.rb +0 -32
- data/test/vcr_cassettes/authorize_net/authorize-failure.yml +0 -38
- data/test/vcr_cassettes/authorize_net/authorize-success.yml +0 -38
- data/test/vcr_cassettes/authorize_net/capture-failure.yml +0 -38
- data/test/vcr_cassettes/authorize_net/capture-success.yml +0 -38
- data/test/vcr_cassettes/authorize_net/purchase-failure.yml +0 -38
- data/test/vcr_cassettes/authorize_net/purchase-success.yml +0 -38
- data/test/vcr_cassettes/authorize_net/refund-failure.yml +0 -38
- data/test/vcr_cassettes/authorize_net/refund-success.yml +0 -38
- data/test/vcr_cassettes/authorize_net/void-authorize.yml +0 -38
- data/test/vcr_cassettes/authorize_net/void-failure.yml +0 -38
- data/test/vcr_cassettes/authorize_net/void-success.yml +0 -38
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sk_09SbpItoIMWYU8okpS23rnxIzgyW7:@api.stripe.com/v1/charges
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: amount=10048¤cy=usd&card=xxxxxx
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
User-Agent:
|
13
|
+
- Stripe/v1 ActiveMerchantBindings/1.26.0
|
14
|
+
X-Stripe-Client-User-Agent:
|
15
|
+
- ! '{"bindings_version":"1.26.0","lang":"ruby","lang_version":"1.9.3 p125 (2012-02-16)","platform":"x86_64-darwin11.4.0","publisher":"active_merchant","uname":"Darwin
|
16
|
+
Neeraj-Singhs-MacBook-Pro.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug
|
17
|
+
23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64"}'
|
18
|
+
X-Stripe-Client-User-Metadata:
|
19
|
+
- ! '{"ip":null}'
|
20
|
+
Accept:
|
21
|
+
- ! '*/*'
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 400
|
25
|
+
message: Bad Request
|
26
|
+
headers:
|
27
|
+
Server:
|
28
|
+
- nginx
|
29
|
+
Date:
|
30
|
+
- Wed, 31 Oct 2012 14:56:00 GMT
|
31
|
+
Content-Type:
|
32
|
+
- application/json;charset=utf-8
|
33
|
+
Content-Length:
|
34
|
+
- '100'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
Access-Control-Max-Age:
|
38
|
+
- '300'
|
39
|
+
Access-Control-Allow-Credentials:
|
40
|
+
- 'true'
|
41
|
+
Cache-Control:
|
42
|
+
- no-cache, no-store
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! "{\n \"error\": {\n \"message\": \"Invalid token id: xxxxxx\",\n
|
46
|
+
\ \"type\": \"invalid_request_error\"\n }\n}\n"
|
47
|
+
http_version:
|
48
|
+
recorded_at: Wed, 31 Oct 2012 14:56:00 GMT
|
49
|
+
recorded_with: VCR 2.2.5
|
@@ -0,0 +1,113 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sk_09SbpItoIMWYU8okpS23rnxIzgyW7:@api.stripe.com/v1/charges
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: amount=10048¤cy=usd&card=tok_0g3n2A0IthHLzf
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
User-Agent:
|
13
|
+
- Stripe/v1 ActiveMerchantBindings/1.26.0
|
14
|
+
X-Stripe-Client-User-Agent:
|
15
|
+
- ! '{"bindings_version":"1.26.0","lang":"ruby","lang_version":"1.9.3 p125 (2012-02-16)","platform":"x86_64-darwin11.4.0","publisher":"active_merchant","uname":"Darwin
|
16
|
+
Neeraj-Singhs-MacBook-Pro.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug
|
17
|
+
23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64"}'
|
18
|
+
X-Stripe-Client-User-Metadata:
|
19
|
+
- ! '{"ip":null}'
|
20
|
+
Accept:
|
21
|
+
- ! '*/*'
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Server:
|
28
|
+
- nginx
|
29
|
+
Date:
|
30
|
+
- Mon, 05 Nov 2012 04:41:41 GMT
|
31
|
+
Content-Type:
|
32
|
+
- application/json;charset=utf-8
|
33
|
+
Content-Length:
|
34
|
+
- '958'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
Access-Control-Max-Age:
|
38
|
+
- '300'
|
39
|
+
Access-Control-Allow-Credentials:
|
40
|
+
- 'true'
|
41
|
+
Cache-Control:
|
42
|
+
- no-cache, no-store
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! "{\n \"amount\": 10048,\n \"amount_refunded\": 0,\n \"created\":
|
46
|
+
1352090501,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\":
|
47
|
+
null,\n \"disputed\": false,\n \"failure_message\": null,\n \"fee\": 321,\n
|
48
|
+
\ \"id\": \"ch_0g3pxaKlHho2cr\",\n \"invoice\": null,\n \"livemode\": false,\n
|
49
|
+
\ \"object\": \"charge\",\n \"paid\": true,\n \"refunded\": false,\n \"card\":
|
50
|
+
{\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\":
|
51
|
+
null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n
|
52
|
+
\ \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\":
|
53
|
+
null,\n \"country\": \"US\",\n \"cvc_check\": \"pass\",\n \"exp_month\":
|
54
|
+
11,\n \"exp_year\": 2018,\n \"fingerprint\": \"G1wO2gxeRcPZjwaI\",\n
|
55
|
+
\ \"last4\": \"4242\",\n \"name\": null,\n \"object\": \"card\",\n
|
56
|
+
\ \"type\": \"Visa\"\n },\n \"fee_details\": [\n {\n \"type\":
|
57
|
+
\"stripe_fee\",\n \"application\": null,\n \"currency\": \"usd\",\n
|
58
|
+
\ \"description\": \"Stripe processing fees\",\n \"amount\": 321\n
|
59
|
+
\ }\n ]\n}\n"
|
60
|
+
http_version:
|
61
|
+
recorded_at: Mon, 05 Nov 2012 04:41:41 GMT
|
62
|
+
- request:
|
63
|
+
method: get
|
64
|
+
uri: https://api.stripe.com/v1/tokens/tok_0g3n2A0IthHLzf
|
65
|
+
body:
|
66
|
+
encoding: US-ASCII
|
67
|
+
string: ''
|
68
|
+
headers:
|
69
|
+
Accept:
|
70
|
+
- ! '*/*; q=0.5, application/xml'
|
71
|
+
Accept-Encoding:
|
72
|
+
- gzip, deflate
|
73
|
+
User-Agent:
|
74
|
+
- Stripe/v1 RubyBindings/1.7.2
|
75
|
+
Authorization:
|
76
|
+
- Bearer sk_09SbpItoIMWYU8okpS23rnxIzgyW7
|
77
|
+
X-Stripe-Client-User-Agent:
|
78
|
+
- ! '{"bindings_version":"1.7.2","lang":"ruby","lang_version":"1.9.3 p125 (2012-02-16)","platform":"x86_64-darwin11.4.0","publisher":"stripe","uname":"Darwin
|
79
|
+
Neeraj-Singhs-MacBook-Pro.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug
|
80
|
+
23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64"}'
|
81
|
+
response:
|
82
|
+
status:
|
83
|
+
code: 200
|
84
|
+
message: OK
|
85
|
+
headers:
|
86
|
+
Server:
|
87
|
+
- nginx
|
88
|
+
Date:
|
89
|
+
- Mon, 05 Nov 2012 04:41:45 GMT
|
90
|
+
Content-Type:
|
91
|
+
- application/json;charset=utf-8
|
92
|
+
Content-Length:
|
93
|
+
- '477'
|
94
|
+
Connection:
|
95
|
+
- keep-alive
|
96
|
+
Access-Control-Max-Age:
|
97
|
+
- '300'
|
98
|
+
Access-Control-Allow-Credentials:
|
99
|
+
- 'true'
|
100
|
+
Cache-Control:
|
101
|
+
- no-cache, no-store
|
102
|
+
body:
|
103
|
+
encoding: US-ASCII
|
104
|
+
string: ! "{\n \"created\": 1352090384,\n \"id\": \"tok_0g3n2A0IthHLzf\",\n
|
105
|
+
\ \"livemode\": false,\n \"object\": \"token\",\n \"used\": true,\n \"card\":
|
106
|
+
{\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\":
|
107
|
+
null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\":
|
108
|
+
null,\n \"country\": \"US\",\n \"exp_month\": 11,\n \"exp_year\":
|
109
|
+
2018,\n \"fingerprint\": \"G1wO2gxeRcPZjwaI\",\n \"last4\": \"4242\",\n
|
110
|
+
\ \"name\": null,\n \"object\": \"card\",\n \"type\": \"Visa\"\n }\n}\n"
|
111
|
+
http_version:
|
112
|
+
recorded_at: Mon, 05 Nov 2012 04:41:45 GMT
|
113
|
+
recorded_with: VCR 2.2.5
|
@@ -0,0 +1,112 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sk_09SbpItoIMWYU8okpS23rnxIzgyW7:@api.stripe.com/v1/charges
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: amount=10048¤cy=usd&card=tok_0eLPgnVqeoGqWd
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
User-Agent:
|
13
|
+
- Stripe/v1 ActiveMerchantBindings/1.26.0
|
14
|
+
X-Stripe-Client-User-Agent:
|
15
|
+
- ! '{"bindings_version":"1.26.0","lang":"ruby","lang_version":"1.9.3 p125 (2012-02-16)","platform":"x86_64-darwin11.4.0","publisher":"active_merchant","uname":"Darwin
|
16
|
+
Neeraj-Singhs-MacBook-Pro.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug
|
17
|
+
23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64"}'
|
18
|
+
X-Stripe-Client-User-Metadata:
|
19
|
+
- ! '{"ip":null}'
|
20
|
+
Accept:
|
21
|
+
- ! '*/*'
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Server:
|
28
|
+
- nginx
|
29
|
+
Date:
|
30
|
+
- Wed, 31 Oct 2012 14:50:42 GMT
|
31
|
+
Content-Type:
|
32
|
+
- application/json;charset=utf-8
|
33
|
+
Content-Length:
|
34
|
+
- '958'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
Access-Control-Max-Age:
|
38
|
+
- '300'
|
39
|
+
Access-Control-Allow-Credentials:
|
40
|
+
- 'true'
|
41
|
+
Cache-Control:
|
42
|
+
- no-cache, no-store
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! "{\n \"amount\": 10048,\n \"amount_refunded\": 0,\n \"created\":
|
46
|
+
1351695041,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\":
|
47
|
+
null,\n \"disputed\": false,\n \"failure_message\": null,\n \"fee\": 321,\n
|
48
|
+
\ \"id\": \"ch_0eLWIXVivQp0KE\",\n \"invoice\": null,\n \"livemode\": false,\n
|
49
|
+
\ \"object\": \"charge\",\n \"paid\": true,\n \"refunded\": false,\n \"card\":
|
50
|
+
{\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\":
|
51
|
+
null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n
|
52
|
+
\ \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\":
|
53
|
+
null,\n \"country\": \"US\",\n \"cvc_check\": \"pass\",\n \"exp_month\":
|
54
|
+
12,\n \"exp_year\": 2014,\n \"fingerprint\": \"G1wO2gxeRcPZjwaI\",\n
|
55
|
+
\ \"last4\": \"4242\",\n \"name\": null,\n \"object\": \"card\",\n
|
56
|
+
\ \"type\": \"Visa\"\n },\n \"fee_details\": [\n {\n \"type\":
|
57
|
+
\"stripe_fee\",\n \"currency\": \"usd\",\n \"amount\": 321,\n \"application\":
|
58
|
+
null,\n \"description\": \"Stripe processing fees\"\n }\n ]\n}\n"
|
59
|
+
http_version:
|
60
|
+
recorded_at: Wed, 31 Oct 2012 14:50:42 GMT
|
61
|
+
- request:
|
62
|
+
method: get
|
63
|
+
uri: https://api.stripe.com/v1/tokens/tok_0eLPgnVqeoGqWd
|
64
|
+
body:
|
65
|
+
encoding: US-ASCII
|
66
|
+
string: ''
|
67
|
+
headers:
|
68
|
+
Accept:
|
69
|
+
- ! '*/*; q=0.5, application/xml'
|
70
|
+
Accept-Encoding:
|
71
|
+
- gzip, deflate
|
72
|
+
User-Agent:
|
73
|
+
- Stripe/v1 RubyBindings/1.7.2
|
74
|
+
Authorization:
|
75
|
+
- Bearer sk_09SbpItoIMWYU8okpS23rnxIzgyW7
|
76
|
+
X-Stripe-Client-User-Agent:
|
77
|
+
- ! '{"bindings_version":"1.7.2","lang":"ruby","lang_version":"1.9.3 p125 (2012-02-16)","platform":"x86_64-darwin11.4.0","publisher":"stripe","uname":"Darwin
|
78
|
+
Neeraj-Singhs-MacBook-Pro.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug
|
79
|
+
23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64"}'
|
80
|
+
response:
|
81
|
+
status:
|
82
|
+
code: 200
|
83
|
+
message: OK
|
84
|
+
headers:
|
85
|
+
Server:
|
86
|
+
- nginx
|
87
|
+
Date:
|
88
|
+
- Wed, 31 Oct 2012 14:50:43 GMT
|
89
|
+
Content-Type:
|
90
|
+
- application/json;charset=utf-8
|
91
|
+
Content-Length:
|
92
|
+
- '477'
|
93
|
+
Connection:
|
94
|
+
- keep-alive
|
95
|
+
Access-Control-Max-Age:
|
96
|
+
- '300'
|
97
|
+
Access-Control-Allow-Credentials:
|
98
|
+
- 'true'
|
99
|
+
Cache-Control:
|
100
|
+
- no-cache, no-store
|
101
|
+
body:
|
102
|
+
encoding: US-ASCII
|
103
|
+
string: ! "{\n \"created\": 1351694601,\n \"id\": \"tok_0eLPgnVqeoGqWd\",\n
|
104
|
+
\ \"livemode\": false,\n \"object\": \"token\",\n \"used\": true,\n \"card\":
|
105
|
+
{\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\":
|
106
|
+
null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\":
|
107
|
+
null,\n \"country\": \"US\",\n \"exp_month\": 12,\n \"exp_year\":
|
108
|
+
2014,\n \"fingerprint\": \"G1wO2gxeRcPZjwaI\",\n \"last4\": \"4242\",\n
|
109
|
+
\ \"name\": null,\n \"object\": \"card\",\n \"type\": \"Visa\"\n }\n}\n"
|
110
|
+
http_version:
|
111
|
+
recorded_at: Wed, 31 Oct 2012 14:50:43 GMT
|
112
|
+
recorded_with: VCR 2.2.5
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sk_09SbpItoIMWYU8okpS23rnxIzgyW7:@api.stripe.com/v1/charges/ch_0g3pxaKlHho2cr/refund
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: amount=10048
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
User-Agent:
|
13
|
+
- Stripe/v1 ActiveMerchantBindings/1.26.0
|
14
|
+
X-Stripe-Client-User-Agent:
|
15
|
+
- ! '{"bindings_version":"1.26.0","lang":"ruby","lang_version":"1.9.3 p125 (2012-02-16)","platform":"x86_64-darwin11.4.0","publisher":"active_merchant","uname":"Darwin
|
16
|
+
Neeraj-Singhs-MacBook-Pro.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug
|
17
|
+
23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64"}'
|
18
|
+
X-Stripe-Client-User-Metadata:
|
19
|
+
- ! '{"ip":null}'
|
20
|
+
Accept:
|
21
|
+
- ! '*/*'
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Server:
|
28
|
+
- nginx
|
29
|
+
Date:
|
30
|
+
- Mon, 05 Nov 2012 04:59:33 GMT
|
31
|
+
Content-Type:
|
32
|
+
- application/json;charset=utf-8
|
33
|
+
Content-Length:
|
34
|
+
- '961'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
Access-Control-Max-Age:
|
38
|
+
- '300'
|
39
|
+
Access-Control-Allow-Credentials:
|
40
|
+
- 'true'
|
41
|
+
Cache-Control:
|
42
|
+
- no-cache, no-store
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! "{\n \"amount\": 10048,\n \"amount_refunded\": 10048,\n \"created\":
|
46
|
+
1352090501,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\":
|
47
|
+
null,\n \"disputed\": false,\n \"failure_message\": null,\n \"fee\": 321,\n
|
48
|
+
\ \"id\": \"ch_0g3pxaKlHho2cr\",\n \"invoice\": null,\n \"livemode\": false,\n
|
49
|
+
\ \"object\": \"charge\",\n \"paid\": true,\n \"refunded\": true,\n \"card\":
|
50
|
+
{\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\":
|
51
|
+
null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n
|
52
|
+
\ \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\":
|
53
|
+
null,\n \"country\": \"US\",\n \"cvc_check\": \"pass\",\n \"exp_month\":
|
54
|
+
11,\n \"exp_year\": 2018,\n \"fingerprint\": \"G1wO2gxeRcPZjwaI\",\n
|
55
|
+
\ \"last4\": \"4242\",\n \"name\": null,\n \"object\": \"card\",\n
|
56
|
+
\ \"type\": \"Visa\"\n },\n \"fee_details\": [\n {\n \"type\":
|
57
|
+
\"stripe_fee\",\n \"application\": null,\n \"currency\": \"usd\",\n
|
58
|
+
\ \"description\": \"Stripe processing fees\",\n \"amount\": 321\n
|
59
|
+
\ }\n ]\n}\n"
|
60
|
+
http_version:
|
61
|
+
recorded_at: Mon, 05 Nov 2012 04:59:33 GMT
|
62
|
+
recorded_with: VCR 2.2.5
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nimbleshop_stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-11-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: stripe
|
@@ -50,29 +50,20 @@ files:
|
|
50
50
|
- app/views/nimbleshop_stripe/payments/_stripe_instructions.html.erb
|
51
51
|
- app/views/nimbleshop_stripe/payments/_what_is_cvv.html.erb
|
52
52
|
- app/views/nimbleshop_stripe/stripes/_edit.html.erb
|
53
|
-
- app/views/nimbleshop_stripe/stripes/_form.html.erb
|
54
53
|
- config/routes.rb
|
55
54
|
- lib/nimbleshop_stripe/engine.rb
|
56
55
|
- lib/nimbleshop_stripe/gateway.rb
|
57
56
|
- lib/nimbleshop_stripe/processor.rb
|
58
|
-
- lib/nimbleshop_stripe/util.rb
|
59
57
|
- lib/nimbleshop_stripe.rb
|
60
58
|
- lib/tasks/nimbleshop_stripe_tasks.rake
|
61
59
|
- README.md
|
62
60
|
- test/test_helper.rb
|
63
61
|
- test/unit/payment_method_test.rb
|
64
62
|
- test/unit/processor_test.rb
|
65
|
-
- test/vcr_cassettes/
|
66
|
-
- test/vcr_cassettes/
|
67
|
-
- test/vcr_cassettes/
|
68
|
-
- test/vcr_cassettes/
|
69
|
-
- test/vcr_cassettes/authorize_net/purchase-failure.yml
|
70
|
-
- test/vcr_cassettes/authorize_net/purchase-success.yml
|
71
|
-
- test/vcr_cassettes/authorize_net/refund-failure.yml
|
72
|
-
- test/vcr_cassettes/authorize_net/refund-success.yml
|
73
|
-
- test/vcr_cassettes/authorize_net/void-authorize.yml
|
74
|
-
- test/vcr_cassettes/authorize_net/void-failure.yml
|
75
|
-
- test/vcr_cassettes/authorize_net/void-success.yml
|
63
|
+
- test/vcr_cassettes/stripe/purchase-failure.yml
|
64
|
+
- test/vcr_cassettes/stripe/purchase-success-for-refund.yml
|
65
|
+
- test/vcr_cassettes/stripe/purchase-success.yml
|
66
|
+
- test/vcr_cassettes/stripe/refund-success.yml
|
76
67
|
homepage: http://nimbleShop.org
|
77
68
|
licenses: []
|
78
69
|
post_install_message:
|
@@ -87,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
78
|
version: '0'
|
88
79
|
segments:
|
89
80
|
- 0
|
90
|
-
hash:
|
81
|
+
hash: 1227483310643251658
|
91
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
83
|
none: false
|
93
84
|
requirements:
|
@@ -96,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
87
|
version: '0'
|
97
88
|
segments:
|
98
89
|
- 0
|
99
|
-
hash:
|
90
|
+
hash: 1227483310643251658
|
100
91
|
requirements: []
|
101
92
|
rubyforge_project:
|
102
93
|
rubygems_version: 1.8.24
|
@@ -107,14 +98,7 @@ test_files:
|
|
107
98
|
- test/test_helper.rb
|
108
99
|
- test/unit/payment_method_test.rb
|
109
100
|
- test/unit/processor_test.rb
|
110
|
-
- test/vcr_cassettes/
|
111
|
-
- test/vcr_cassettes/
|
112
|
-
- test/vcr_cassettes/
|
113
|
-
- test/vcr_cassettes/
|
114
|
-
- test/vcr_cassettes/authorize_net/purchase-failure.yml
|
115
|
-
- test/vcr_cassettes/authorize_net/purchase-success.yml
|
116
|
-
- test/vcr_cassettes/authorize_net/refund-failure.yml
|
117
|
-
- test/vcr_cassettes/authorize_net/refund-success.yml
|
118
|
-
- test/vcr_cassettes/authorize_net/void-authorize.yml
|
119
|
-
- test/vcr_cassettes/authorize_net/void-failure.yml
|
120
|
-
- test/vcr_cassettes/authorize_net/void-success.yml
|
101
|
+
- test/vcr_cassettes/stripe/purchase-failure.yml
|
102
|
+
- test/vcr_cassettes/stripe/purchase-success-for-refund.yml
|
103
|
+
- test/vcr_cassettes/stripe/purchase-success.yml
|
104
|
+
- test/vcr_cassettes/stripe/refund-success.yml
|
@@ -1,68 +0,0 @@
|
|
1
|
-
<div class='well nimbleshop-payment-method-form-well' id='nimbleshop-stripe-form-well' style='display:none;'>
|
2
|
-
|
3
|
-
<%= form_for NimbleshopStripe::Stripe.first, url: '/nimbleshop_stripe/stripe',
|
4
|
-
remote: true,
|
5
|
-
html: { method: 'put',
|
6
|
-
id: 'nimbleshop-stripe-form',
|
7
|
-
class: 'nimbleshop-payment-method-form form-horizontal'} do |f| %>
|
8
|
-
|
9
|
-
<fieldset>
|
10
|
-
<div class='control-group'>
|
11
|
-
<%= f.label :publishable_key, nil, class: 'control-label' %>
|
12
|
-
<div class='controls'>
|
13
|
-
<%= f.text_field :publishable_key, class: 'span6' %>
|
14
|
-
</div>
|
15
|
-
</div>
|
16
|
-
|
17
|
-
<div class='control-group'>
|
18
|
-
<%= f.label :secret_key, nil, class: 'control-label' %>
|
19
|
-
<div class='controls'>
|
20
|
-
<%= f.text_field :secret_key, class: 'span6' %>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<div class='control-group'>
|
25
|
-
<%= f.label :business_name, nil, class: 'control-label' %>
|
26
|
-
<%= link_to '?', '#', 'data-content' => 'Please enter the name of the company as it would appear in the credit card statement. If are not sure what name would appear in the credit card statements then consult your merchant account provider.',
|
27
|
-
'data-original-title' => 'Business name' %>
|
28
|
-
<div class='controls'>
|
29
|
-
<%= f.text_field :business_name, class: 'span6' %>
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
|
33
|
-
<div class='control-group'>
|
34
|
-
<div class='controls'>
|
35
|
-
<label class='checkbox'>
|
36
|
-
<%= f.check_box :mode, {}, 'test', 'production' %> Enable test mode
|
37
|
-
<%= link_to '?', '#', class: 'help', 'data-content' => 'In the test mode real credit card numbers are not accepted.',
|
38
|
-
'data-original-title' => 'Test mode' %>
|
39
|
-
</label>
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<div class='control-group'>
|
44
|
-
<div class='controls'>
|
45
|
-
<label class='checkbox'>
|
46
|
-
<%= f.check_box :ssl, {}, 'enabled', 'disabled' %> Enable SSL requirement
|
47
|
-
<%= link_to '?', '#', class: 'help', 'data-content' => 'Enabling SSL requirement will force the payment page to be on SSL.',
|
48
|
-
'data-original-title' => 'SSL requirement' %>
|
49
|
-
</label>
|
50
|
-
</div>
|
51
|
-
</div>
|
52
|
-
|
53
|
-
</fieldset>
|
54
|
-
|
55
|
-
<div class='form-actions'>
|
56
|
-
<%= f.submit('Submit', class: 'btn btn-primary') %>
|
57
|
-
|
58
|
-
<%= link_to t(:cancel), nimbleshop_stripe.stripe_path, class: 'cancel btn' %>
|
59
|
-
</div>
|
60
|
-
<% end %>
|
61
|
-
|
62
|
-
</div>
|
63
|
-
|
64
|
-
<style>
|
65
|
-
.control-group a.help {
|
66
|
-
float: none;
|
67
|
-
}
|
68
|
-
</style>
|