solidus_culqi 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/.rubocop.yml +1 -1
- data/.travis.yml +2 -2
- data/Gemfile +6 -5
- data/README.md +7 -0
- data/app/models/solidus/gateway/culqi_gateway.rb +63 -19
- data/app/views/spree/checkout/existing_payment/_culqi.html.erb +3 -0
- data/db/migrate/20170919145201_add_installments_to_orders.rb +1 -1
- data/lib/solidus_culqi/gateway.rb +29 -0
- data/lib/solidus_culqi/support.rb +7 -0
- data/lib/solidus_culqi/version.rb +1 -1
- data/lib/solidus_culqi.rb +2 -0
- data/solidus_culqi.gemspec +2 -0
- data/spec/cassettes/Culqi_checkout/with_logged_user/store_card_in_wallet.yml +206 -0
- data/spec/cassettes/Culqi_checkout/with_unlogged_user/with_process_checkout/capture_payment.yml +207 -0
- data/spec/cassettes/Culqi_checkout/with_unlogged_user/with_process_checkout/process_order.yml +156 -0
- data/spec/cassettes/Culqi_checkout/with_unlogged_user/with_process_checkout/voids_a_payment.yml +207 -0
- data/spec/cassettes/Culqi_checkout_autocapture/with_valid_credit_card/can_process_a_valid_payment.yml +156 -0
- data/spec/cassettes/Culqi_checkout_autocapture/with_valid_credit_card/refunds_a_payment.yml +207 -0
- data/spec/features/culqi_checkout_autocapture_spec.rb +8 -8
- data/spec/features/culqi_checkout_spec.rb +71 -27
- data/spec/models/culqi_gateway.rb +16 -0
- data/spec/spec_helper.rb +16 -1
- data/spec/support/culqi_helper.rb +14 -6
- metadata +40 -2
@@ -0,0 +1,156 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.culqi.com/v2/customers/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- api.culqi.com
|
18
|
+
Authorization:
|
19
|
+
- Bearer sk_test_SpwICNI4YT0OSLHY
|
20
|
+
Content-Type:
|
21
|
+
- application/json
|
22
|
+
Cache-Control:
|
23
|
+
- no-cache
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 200
|
27
|
+
message: OK
|
28
|
+
headers:
|
29
|
+
Server:
|
30
|
+
- ":"
|
31
|
+
- nginx
|
32
|
+
Date:
|
33
|
+
- Thu, 12 Oct 2017 15:40:17 GMT
|
34
|
+
Content-Type:
|
35
|
+
- application/json;charset=UTF-8
|
36
|
+
Transfer-Encoding:
|
37
|
+
- chunked
|
38
|
+
Connection:
|
39
|
+
- keep-alive
|
40
|
+
Set-Cookie:
|
41
|
+
- JSESSIONID=018AF9E9A64486462984AE7ED481715C; Path=/api/; HttpOnly
|
42
|
+
X-Culqi-Tracking-Id:
|
43
|
+
- '1924581'
|
44
|
+
X-Culqi-Environment:
|
45
|
+
- test
|
46
|
+
X-Culqi-Version:
|
47
|
+
- 2.0.0
|
48
|
+
body:
|
49
|
+
encoding: ASCII-8BIT
|
50
|
+
string: !binary |-
|
51
|
+
eyJkYXRhIjpbeyJvYmplY3QiOiJjdXN0b21lciIsImlkIjoiY3VzX3Rlc3RfQ0FjU3JDa0JsOFpSOWJwVCIsImNyZWF0aW9uX2RhdGUiOjE1MDc4MjE1MTMwMDAsImVtYWlsIjoiZGFuaWVsZV9oZXNzZWxAbWlsbHMuY2EiLCJhbnRpZnJhdWRfZGV0YWlscyI6eyJmaXJzdF9uYW1lIjoiSGFuIiwibGFzdF9uYW1lIjoiU29sbyIsImFkZHJlc3MiOiJZVC0xMzAwIiwiYWRkcmVzc19jaXR5IjoiQWxhYmFtYSIsImNvdW50cnlfY29kZSI6IlVTIiwicGhvbmUiOiI1NTU1NTU1NTU1Iiwib2JqZWN0IjoiY2xpZW50In0sImNhcmRzIjpbeyJvYmplY3QiOiJjYXJkIiw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vdGhlcl9udW1iZXIiOiI3ODk5NTM2NTUifX1dLCJwYWdpbmciOnsicHJldmlvdXMiOiJodHRwczovL2FwaS5jdWxxaS5jb20vdjIvY3VzdG9tZXJzP2xpbWl0PTUwJmJlZm9yZT1jdXNfdGVzdF9DQWNTckNrQmw4WlI5YnBUIiwibmV4dCI6Imh0dHBzOi8vYXBpLmN1bHFpLmNvbS92Mi9jdXN0b21lcnM/bGltaXQ9NTAmYWZ0ZXI9Y3VzX3Rlc3RfaG5mUUVYRU1YSm5QWkE1VSIsImN1cnNvcnMiOnsiYmVmb3JlIjoiY3VzX3Rlc3RfQ0FjU3JDa0JsOFpSOWJwVCIsImFmdGVyIjoiY3VzX3Rlc3RfaG5mUUVYRU1YSm5QWkE1VSJ9fX0=
|
52
|
+
http_version:
|
53
|
+
recorded_at: Thu, 12 Oct 2017 15:40:17 GMT
|
54
|
+
- request:
|
55
|
+
method: post
|
56
|
+
uri: https://api.culqi.com/v2/cards/
|
57
|
+
body:
|
58
|
+
encoding: UTF-8
|
59
|
+
string: '{"customer_id":"cus_test_5KekHsuSguEzjzh8","token_id":"tkn_test_FpBWGIY1DCXOxi3m"}'
|
60
|
+
headers:
|
61
|
+
Accept-Encoding:
|
62
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
63
|
+
Accept:
|
64
|
+
- "*/*"
|
65
|
+
User-Agent:
|
66
|
+
- Ruby
|
67
|
+
Host:
|
68
|
+
- api.culqi.com
|
69
|
+
Authorization:
|
70
|
+
- Bearer sk_test_SpwICNI4YT0OSLHY
|
71
|
+
Content-Type:
|
72
|
+
- application/json
|
73
|
+
Cache-Control:
|
74
|
+
- no-cache
|
75
|
+
response:
|
76
|
+
status:
|
77
|
+
code: 201
|
78
|
+
message: Created
|
79
|
+
headers:
|
80
|
+
Server:
|
81
|
+
- ":"
|
82
|
+
- nginx
|
83
|
+
Date:
|
84
|
+
- Thu, 12 Oct 2017 15:40:21 GMT
|
85
|
+
Content-Type:
|
86
|
+
- application/json;charset=UTF-8
|
87
|
+
Transfer-Encoding:
|
88
|
+
- chunked
|
89
|
+
Connection:
|
90
|
+
- keep-alive
|
91
|
+
Set-Cookie:
|
92
|
+
- JSESSIONID=73AFC280F78DDDABBAD67FB069EC193C; Path=/api/; HttpOnly
|
93
|
+
X-Culqi-Tracking-Id:
|
94
|
+
- '1924582'
|
95
|
+
X-Culqi-Environment:
|
96
|
+
- test
|
97
|
+
X-Culqi-Version:
|
98
|
+
- 2.0.0
|
99
|
+
body:
|
100
|
+
encoding: ASCII-8BIT
|
101
|
+
string: !binary |-
|
102
|
+
eyJvYmplY3QiOiJjYXJkIiwiaWQiOiJjcmRfdGVzdF9MWWZQWmtOWTBvQzlaVno1IiwiYWN0aXZlIjp0cnVlLCJjcmVhdGlvbl9kYXRlIjoxNTA3Nzg5MzMzMDAwLCJjdXN0b21lcl9pZCI6ImN1c190ZXN0XzVLZWtIc3VTZ3VFemp6aDgiLCJzb3VyY2UiOnsib2JqZWN0IjoidG9rZW4iLCJpZCI6InRrbl90ZXN0X0ZwQldHSVkxRENYT3hpM20iLCJ0eXBlIjoiY2FyZCIsImNyZWF0aW9uX2RhdGUiOjE1MDc4MjI4MTIwMDAsImVtYWlsIjoiaGFuQGV4YW1wbGUuY29tIiwiY2FyZF9udW1iZXIiOiI0MTExMTEqKioqKioxMTExIiwibGFzdF9mb3VyIjoiMTExMSIsImFjdGl2ZSI6dHJ1ZSwiaWluIjp7Im9iamVjdCI6ImlpbiIsImJpbiI6IjQxMTExMSIsImNhcmRfYnJhbmQiOiJWaXNhIiwiY2FyZF90eXBlIjoiY3JlZGl0byIsImNhcmRfY2F0ZWdvcnkiOiJDbMOhc2ljYSIsImlzc3VlciI6eyJuYW1lIjoiSlBNT1JHQU4gQ0hBU0UgQkFOSywgTi5BLiIsImNvdW50cnkiOiJVTklURUQgU1RBVEVTIiwiY291bnRyeV9jb2RlIjoiVVMiLCJ3ZWJzaXRlIjpudWxsLCJwaG9uZV9udW1iZXIiOm51bGx9LCJpbnN0YWxsbWVudHNfYWxsb3dlZCI6WzIsNCw2LDgsMTAsMTJdfSwiY2xpZW50Ijp7ImlwIjoiMTc5LjcuMTUzLjIyNCIsImlwX2NvdW50cnkiOiJQZXLDuiIsImlwX2NvdW50cnlfY29kZSI6IlBFIiwiYnJvd3NlciI6bnVsbCwiZGV2aWNlX2ZpbmdlcnByaW50IjoiMTM0NzQwOTkzNSIsImRldmljZV90eXBlIjoiRXNjcml0b3JpbyJ9LCJtZXRhZGF0YSI6eyJjbGllbnRfaXAiOiIxNzkuNy4xNTMuMjI0In19LCJtZXRhZGF0YSI6e319
|
103
|
+
http_version:
|
104
|
+
recorded_at: Thu, 12 Oct 2017 15:40:21 GMT
|
105
|
+
- request:
|
106
|
+
method: post
|
107
|
+
uri: https://api.culqi.com/v2/charges/
|
108
|
+
body:
|
109
|
+
encoding: UTF-8
|
110
|
+
string: '{"amount":1999,"capture":true,"currency_code":"PEN","description":null,"email":"han@example.com","installments":0,"source_id":"crd_test_LYfPZkNY0oC9ZVz5"}'
|
111
|
+
headers:
|
112
|
+
Accept-Encoding:
|
113
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
114
|
+
Accept:
|
115
|
+
- "*/*"
|
116
|
+
User-Agent:
|
117
|
+
- Ruby
|
118
|
+
Host:
|
119
|
+
- api.culqi.com
|
120
|
+
Authorization:
|
121
|
+
- Bearer sk_test_SpwICNI4YT0OSLHY
|
122
|
+
Content-Type:
|
123
|
+
- application/json
|
124
|
+
Cache-Control:
|
125
|
+
- no-cache
|
126
|
+
response:
|
127
|
+
status:
|
128
|
+
code: 201
|
129
|
+
message: Created
|
130
|
+
headers:
|
131
|
+
Server:
|
132
|
+
- ":"
|
133
|
+
- nginx
|
134
|
+
Date:
|
135
|
+
- Thu, 12 Oct 2017 15:40:26 GMT
|
136
|
+
Content-Type:
|
137
|
+
- application/json;charset=UTF-8
|
138
|
+
Transfer-Encoding:
|
139
|
+
- chunked
|
140
|
+
Connection:
|
141
|
+
- keep-alive
|
142
|
+
Set-Cookie:
|
143
|
+
- JSESSIONID=EC14DE9D8F35EF7B60F5096281C72C70; Path=/api/; HttpOnly
|
144
|
+
X-Culqi-Tracking-Id:
|
145
|
+
- '1924585'
|
146
|
+
X-Culqi-Environment:
|
147
|
+
- test
|
148
|
+
X-Culqi-Version:
|
149
|
+
- 2.0.0
|
150
|
+
body:
|
151
|
+
encoding: ASCII-8BIT
|
152
|
+
string: !binary |-
|
153
|
+
eyJkdXBsaWNhdGVkIjpmYWxzZSwib2JqZWN0IjoiY2hhcmdlIiwiaWQiOiJjaHJfdGVzdF9oZ2RkQ0FKeHJEYXFnaW5PIiwiY3JlYXRpb25fZGF0ZSI6MTUwNzgyMjgyNTAwMCwiYW1vdW50IjoxOTk5LCJhbW91bnRfcmVmdW5kZWQiOjAsImN1cnJlbnRfYW1vdW50IjoxOTk5LCJpbnN0YWxsbWVudHMiOjAsImluc3RhbGxtZW50c19hbW91bnQiOm51bGwsImN1cnJlbmN5X2NvZGUiOiJQRU4iLCJlbWFpbCI6ImhhbkBleGFtcGxlLmNvbSIsImRlc2NyaXB0aW9uIjpudWxsLCJzb3VyY2UiOnsib2JqZWN0IjoiY2FyZCIsImlkIjoiY3JkX3Rlc3RfTFlmUFprTlkwb0M5WlZ6NSIsImFjdGl2ZSI6dHJ1ZSwiY3JlYXRpb25fZGF0ZSI6MTUwNzc4OTMzMzAwMCwiY3VzdG9tZXJfaWQiOiJjdXNfdGVzdF81S2VrSHN1U2d1RXpqemg4Iiwic291cmNlIjp7Im9iamVjdCI6InRva2VuIiwiaWQiOiJ0a25fdGVzdF9GcEJXR0lZMURDWE94aTNtIiwidHlwZSI6ImNhcmQiLCJjcmVhdGlvbl9kYXRlIjoxNTA3ODIyODEyMDAwLCJlbWFpbCI6ImhhbkBleGFtcGxlLmNvbSIsImNhcmRfbnVtYmVyIjoiNDExMTExKioqKioqMTExMSIsImxhc3RfZm91ciI6IjExMTEiLCJhY3RpdmUiOnRydW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GhvbmUiOiI1NTU1NTU1NTU1Iiwib2JqZWN0IjoiY2xpZW50In0sImRpc3B1dGUiOmZhbHNlLCJjYXB0dXJlIjp0cnVlLCJyZWZlcmVuY2VfY29kZSI6IlNZczZxUFExNW0iLCJtZXRhZGF0YSI6e30sInRvdGFsX2ZlZSI6ODksImZlZV9kZXRhaWxzIjp7ImZpeGVkX2ZlZSI6e30sInZhcmlhYmxlX2ZlZSI6eyJjdXJyZW5jeV9jb2RlIjoiUEVOIiwiY29tbWlzaW9uIjowLjAzNzUsInRvdGFsIjo3NX19LCJ0b3RhbF9mZWVfdGF4ZXMiOjE0LCJ0cmFuc2Zlcl9hbW91bnQiOjE5MTAsInBhaWQiOmZhbHNlLCJzdGF0ZW1lbnRfZGVzY3JpcHRvciI6IkNVTFFJKiIsInRyYW5zZmVyX2lkIjpudWxsfQ==
|
154
|
+
http_version:
|
155
|
+
recorded_at: Thu, 12 Oct 2017 15:40:26 GMT
|
156
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,207 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.culqi.com/v2/customers/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- api.culqi.com
|
18
|
+
Authorization:
|
19
|
+
- Bearer sk_test_SpwICNI4YT0OSLHY
|
20
|
+
Content-Type:
|
21
|
+
- application/json
|
22
|
+
Cache-Control:
|
23
|
+
- no-cache
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 200
|
27
|
+
message: OK
|
28
|
+
headers:
|
29
|
+
Server:
|
30
|
+
- ":"
|
31
|
+
- nginx
|
32
|
+
Date:
|
33
|
+
- Thu, 12 Oct 2017 15:39:29 GMT
|
34
|
+
Content-Type:
|
35
|
+
- application/json;charset=UTF-8
|
36
|
+
Transfer-Encoding:
|
37
|
+
- chunked
|
38
|
+
Connection:
|
39
|
+
- keep-alive
|
40
|
+
Set-Cookie:
|
41
|
+
- JSESSIONID=C15581CEBFB36842F598B9E3208E0D63; Path=/api/; HttpOnly
|
42
|
+
X-Culqi-Tracking-Id:
|
43
|
+
- '1924571'
|
44
|
+
X-Culqi-Environment:
|
45
|
+
- test
|
46
|
+
X-Culqi-Version:
|
47
|
+
- 2.0.0
|
48
|
+
body:
|
49
|
+
encoding: ASCII-8BIT
|
50
|
+
string: !binary |-
|
51
|
+
eyJkYXRhIjpbeyJvYmplY3QiOiJjdXN0b21lciIsImlkIjoiY3VzX3Rlc3RfQ0FjU3JDa0JsOFpSOWJwVCIsImNyZWF0aW9uX2RhdGUiOjE1MDc4MjE1MTMwMDAsImVtYWlsIjoiZGFuaWVsZV9oZXNzZWxAbWlsbHMuY2EiLCJhbnRpZnJhdWRfZGV0YWlscyI6eyJmaXJzdF9uYW1lIjoiSGFuIiwibGFzdF9uYW1lIjoiU29sbyIsImFkZHJlc3MiOiJZVC0xMzAwIiwiYWRkcmVzc19jaXR5IjoiQWxhYmFtYSIsImNvdW50cnlfY29kZSI6IlVTIiwicGhvbmUiOiI1NTU1NTU1NTU1Iiwib2JqZWN0IjoiY2xpZW50In0sImNhcmRzIjpbeyJvYmplY3QiOiJjYXJkIiwiaWQiOiJjcmRfdGVzdF9JUmhmSG5udmJ6cG4wZXMxIiwiYWN0aXZlIjp0cnVlLCJjcmVhdGlvbl9kYXRlIjoxNTA3ODIxNTE3MDAwLCJjdXN0b21lcl9pZCI6ImN1c190ZXN0X0NBY1NyQ2tCbDhaUjlicFQiLCJzb3VyY2UiOnsib2JqZWN0IjoidG9rZW4iLCJpZCI6InRrbl90ZXN0X2JaS0VORXR4UEdyMXhNUlEiLCJ0eXBlIjoiY2FyZCIsImNyZ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puUFpBNVUiLCJjdXJzb3JzIjp7ImJlZm9yZSI6ImN1c190ZXN0X0NBY1NyQ2tCbDhaUjlicFQiLCJhZnRlciI6ImN1c190ZXN0X2huZlFFWEVNWEpuUFpBNVUifX19
|
52
|
+
http_version:
|
53
|
+
recorded_at: Thu, 12 Oct 2017 15:39:29 GMT
|
54
|
+
- request:
|
55
|
+
method: post
|
56
|
+
uri: https://api.culqi.com/v2/cards/
|
57
|
+
body:
|
58
|
+
encoding: UTF-8
|
59
|
+
string: '{"customer_id":"cus_test_5KekHsuSguEzjzh8","token_id":"tkn_test_c8ChvbzCYW2PG5fO"}'
|
60
|
+
headers:
|
61
|
+
Accept-Encoding:
|
62
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
63
|
+
Accept:
|
64
|
+
- "*/*"
|
65
|
+
User-Agent:
|
66
|
+
- Ruby
|
67
|
+
Host:
|
68
|
+
- api.culqi.com
|
69
|
+
Authorization:
|
70
|
+
- Bearer sk_test_SpwICNI4YT0OSLHY
|
71
|
+
Content-Type:
|
72
|
+
- application/json
|
73
|
+
Cache-Control:
|
74
|
+
- no-cache
|
75
|
+
response:
|
76
|
+
status:
|
77
|
+
code: 201
|
78
|
+
message: Created
|
79
|
+
headers:
|
80
|
+
Server:
|
81
|
+
- ":"
|
82
|
+
- nginx
|
83
|
+
Date:
|
84
|
+
- Thu, 12 Oct 2017 15:39:33 GMT
|
85
|
+
Content-Type:
|
86
|
+
- application/json;charset=UTF-8
|
87
|
+
Transfer-Encoding:
|
88
|
+
- chunked
|
89
|
+
Connection:
|
90
|
+
- keep-alive
|
91
|
+
Set-Cookie:
|
92
|
+
- JSESSIONID=D8393139F63A2525F6EBD0E5D9C65FC7; Path=/api/; HttpOnly
|
93
|
+
X-Culqi-Tracking-Id:
|
94
|
+
- '1924572'
|
95
|
+
X-Culqi-Environment:
|
96
|
+
- test
|
97
|
+
X-Culqi-Version:
|
98
|
+
- 2.0.0
|
99
|
+
body:
|
100
|
+
encoding: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GllbnRfaXAiOiIxNzkuNy4xNTMuMjI0In19LCJtZXRhZGF0YSI6e319
|
103
|
+
http_version:
|
104
|
+
recorded_at: Thu, 12 Oct 2017 15:39:33 GMT
|
105
|
+
- request:
|
106
|
+
method: post
|
107
|
+
uri: https://api.culqi.com/v2/charges/
|
108
|
+
body:
|
109
|
+
encoding: UTF-8
|
110
|
+
string: '{"amount":1999,"capture":true,"currency_code":"PEN","description":null,"email":"han@example.com","installments":0,"source_id":"crd_test_LYfPZkNY0oC9ZVz5"}'
|
111
|
+
headers:
|
112
|
+
Accept-Encoding:
|
113
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
114
|
+
Accept:
|
115
|
+
- "*/*"
|
116
|
+
User-Agent:
|
117
|
+
- Ruby
|
118
|
+
Host:
|
119
|
+
- api.culqi.com
|
120
|
+
Authorization:
|
121
|
+
- Bearer sk_test_SpwICNI4YT0OSLHY
|
122
|
+
Content-Type:
|
123
|
+
- application/json
|
124
|
+
Cache-Control:
|
125
|
+
- no-cache
|
126
|
+
response:
|
127
|
+
status:
|
128
|
+
code: 201
|
129
|
+
message: Created
|
130
|
+
headers:
|
131
|
+
Server:
|
132
|
+
- ":"
|
133
|
+
- nginx
|
134
|
+
Date:
|
135
|
+
- Thu, 12 Oct 2017 15:39:39 GMT
|
136
|
+
Content-Type:
|
137
|
+
- application/json;charset=UTF-8
|
138
|
+
Transfer-Encoding:
|
139
|
+
- chunked
|
140
|
+
Connection:
|
141
|
+
- keep-alive
|
142
|
+
Set-Cookie:
|
143
|
+
- JSESSIONID=48FD9C44EE44322E01DEA895F5C84244; Path=/api/; HttpOnly
|
144
|
+
X-Culqi-Tracking-Id:
|
145
|
+
- '1924575'
|
146
|
+
X-Culqi-Environment:
|
147
|
+
- test
|
148
|
+
X-Culqi-Version:
|
149
|
+
- 2.0.0
|
150
|
+
body:
|
151
|
+
encoding: ASCII-8BIT
|
152
|
+
string: !binary |-
|
153
|
+
eyJkdXBsaWNhdGVkIjpmYW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jAzNzUsInRvdGFsIjo3NX19LCJ0b3RhbF9mZWVfdGF4ZXMiOjE0LCJ0cmFuc2Zlcl9hbW91bnQiOjE5MTAsInBhaWQiOmZhbHNlLCJzdGF0ZW1lbnRfZGVzY3JpcHRvciI6IkNVTFFJKiIsInRyYW5zZmVyX2lkIjpudWxsfQ==
|
154
|
+
http_version:
|
155
|
+
recorded_at: Thu, 12 Oct 2017 15:39:39 GMT
|
156
|
+
- request:
|
157
|
+
method: post
|
158
|
+
uri: https://api.culqi.com/v2/refunds/
|
159
|
+
body:
|
160
|
+
encoding: UTF-8
|
161
|
+
string: '{"amount":1999,"charge_id":"chr_test_Eo1Kz4D0AJodAd3P","reason":"solicitud_comprador"}'
|
162
|
+
headers:
|
163
|
+
Accept-Encoding:
|
164
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
165
|
+
Accept:
|
166
|
+
- "*/*"
|
167
|
+
User-Agent:
|
168
|
+
- Ruby
|
169
|
+
Host:
|
170
|
+
- api.culqi.com
|
171
|
+
Authorization:
|
172
|
+
- Bearer sk_test_SpwICNI4YT0OSLHY
|
173
|
+
Content-Type:
|
174
|
+
- application/json
|
175
|
+
Cache-Control:
|
176
|
+
- no-cache
|
177
|
+
response:
|
178
|
+
status:
|
179
|
+
code: 201
|
180
|
+
message: Created
|
181
|
+
headers:
|
182
|
+
Server:
|
183
|
+
- ":"
|
184
|
+
- nginx
|
185
|
+
Date:
|
186
|
+
- Thu, 12 Oct 2017 15:39:48 GMT
|
187
|
+
Content-Type:
|
188
|
+
- application/json;charset=UTF-8
|
189
|
+
Transfer-Encoding:
|
190
|
+
- chunked
|
191
|
+
Connection:
|
192
|
+
- keep-alive
|
193
|
+
Set-Cookie:
|
194
|
+
- JSESSIONID=4661D318B2924EE812438CE5F2D075AF; Path=/api/; HttpOnly
|
195
|
+
X-Culqi-Tracking-Id:
|
196
|
+
- '1924578'
|
197
|
+
X-Culqi-Environment:
|
198
|
+
- test
|
199
|
+
X-Culqi-Version:
|
200
|
+
- 2.0.0
|
201
|
+
body:
|
202
|
+
encoding: ASCII-8BIT
|
203
|
+
string: !binary |-
|
204
|
+
eyJvYmplY3QiOiJyZWZ1bmQiLCJpZCI6InJlZl90ZXN0X3VxTVM1aHZBTFZ5NkNOWGkiLCJjaGFyZ2VfaWQiOiJjaHJfdGVzdF9FbzFLejREMEFKb2RBZDNQIiwiY3JlYXRpb25fZGF0ZSI6MTUwNzgyMjc4NzAwMCwiYW1vdW50IjoxOTk5LCJyZWFzb24iOiJEZXZvbHVjacOzbiBzb2xpY2l0YWRhIHBvciBlbCBjb21lcmNpbyIsIm1ldGFkYXRhIjp7fX0=
|
205
|
+
http_version:
|
206
|
+
recorded_at: Thu, 12 Oct 2017 15:39:48 GMT
|
207
|
+
recorded_with: VCR 3.0.3
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
RSpec.describe "Culqi checkout autocapture", type: :feature do
|
3
|
+
RSpec.describe "Culqi checkout autocapture", :vcr, type: :feature, js: true do
|
4
4
|
let(:zone) { create(:zone) }
|
5
5
|
let(:country) { create(:country) }
|
6
6
|
let(:product) { create(:product) }
|
@@ -11,7 +11,7 @@ RSpec.describe "Culqi checkout autocapture", type: :feature do
|
|
11
11
|
create(:free_shipping_method)
|
12
12
|
Spree::Config.set(auto_capture: true)
|
13
13
|
setup_culqi_gateway
|
14
|
-
checkout_until_payment
|
14
|
+
checkout_until_payment(product)
|
15
15
|
end
|
16
16
|
|
17
17
|
context "with valid credit card" do
|
@@ -27,13 +27,13 @@ RSpec.describe "Culqi checkout autocapture", type: :feature do
|
|
27
27
|
click_button "Save and Continue"
|
28
28
|
end
|
29
29
|
|
30
|
-
it "can process a valid payment"
|
30
|
+
it "can process a valid payment" do
|
31
31
|
expect(page.current_url).to include("/checkout/confirm")
|
32
32
|
click_button "Place Order"
|
33
33
|
expect(page).to have_content("Your order has been processed successfully")
|
34
34
|
end
|
35
35
|
|
36
|
-
it "refunds a payment"
|
36
|
+
it "refunds a payment" do
|
37
37
|
reason = FactoryGirl.create(:refund_reason)
|
38
38
|
|
39
39
|
click_button "Place Order"
|
@@ -48,7 +48,7 @@ RSpec.describe "Culqi checkout autocapture", type: :feature do
|
|
48
48
|
end
|
49
49
|
|
50
50
|
context "when missing credit card number" do
|
51
|
-
it "shows an error"
|
51
|
+
it "shows an error" do
|
52
52
|
fill_in "Expiration", with: "01 / #{Time.now.year + 1}"
|
53
53
|
fill_in "Card Code", with: "123"
|
54
54
|
click_button "Save and Continue"
|
@@ -57,7 +57,7 @@ RSpec.describe "Culqi checkout autocapture", type: :feature do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
context "when missing expiration date" do
|
60
|
-
it "shows an error"
|
60
|
+
it "shows an error" do
|
61
61
|
fill_in "Card Number", with: "4242 4242 4242 4242"
|
62
62
|
fill_in "Card Code", with: "123"
|
63
63
|
click_button "Save and Continue"
|
@@ -66,8 +66,8 @@ RSpec.describe "Culqi checkout autocapture", type: :feature do
|
|
66
66
|
end
|
67
67
|
|
68
68
|
context "with an invalid credit card number" do
|
69
|
-
it "shows an error"
|
70
|
-
fill_in "Card Number", with: "1111 1111 1111"
|
69
|
+
it "shows an error" do
|
70
|
+
fill_in "Card Number", with: "1111 1111 1111", visible: false
|
71
71
|
fill_in "Expiration", with: "02 / #{Time.now.year + 1}"
|
72
72
|
fill_in "Card Code", with: "123"
|
73
73
|
click_button "Save and Continue"
|
@@ -1,50 +1,94 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
RSpec.describe "Culqi checkout", type: :feature do
|
3
|
+
RSpec.describe "Culqi checkout", :vcr, type: :feature, js: true do
|
4
4
|
let(:zone) { create(:zone) }
|
5
5
|
let(:country) { create(:country) }
|
6
6
|
let(:product) { create(:product) }
|
7
|
-
stub_authorization!
|
8
7
|
|
9
8
|
before do
|
10
9
|
zone.members << Spree::ZoneMember.create!(zoneable: country)
|
11
10
|
create(:store)
|
12
11
|
create(:free_shipping_method)
|
13
12
|
setup_culqi_gateway
|
14
|
-
checkout_until_payment
|
15
|
-
|
16
|
-
fill_in "Card Number", with: "4111 1111 1111 1111"
|
17
|
-
page.execute_script("$('.cardNumber').trigger('change')")
|
18
|
-
fill_in "Card Code", with: "123"
|
19
|
-
fill_in "Expiration", with: "09 / 20"
|
20
|
-
click_button "Save and Continue"
|
21
|
-
sleep(5) # Wait for API to return + form to submit
|
22
|
-
find(".culqiInstallments").select("2")
|
23
|
-
click_button "Save and Continue"
|
24
13
|
end
|
25
14
|
|
26
|
-
context
|
15
|
+
context 'with unlogged user' do
|
16
|
+
stub_authorization!
|
17
|
+
|
27
18
|
before do
|
28
|
-
|
29
|
-
|
19
|
+
checkout_until_payment(product)
|
20
|
+
|
21
|
+
fill_in "Card Number", with: "4111 1111 1111 1111", visible: false
|
22
|
+
page.execute_script("$('.cardNumber').trigger('change')")
|
23
|
+
fill_in "Card Code", with: "123"
|
24
|
+
fill_in "Expiration", with: "09 / 20"
|
25
|
+
click_button "Save and Continue"
|
26
|
+
sleep(5) # Wait for API to return + form to submit
|
27
|
+
find(".culqiInstallments").select("2")
|
28
|
+
click_button "Save and Continue"
|
30
29
|
end
|
31
30
|
|
32
|
-
|
33
|
-
|
31
|
+
context "with process checkout" do
|
32
|
+
before do
|
33
|
+
expect(page.current_url).to include("/checkout/confirm")
|
34
|
+
click_button "Place Order"
|
35
|
+
end
|
36
|
+
|
37
|
+
it "process order" do
|
38
|
+
expect(page).to have_content("Your order has been processed successfully")
|
39
|
+
payment = Spree::Order.last.payments.last
|
40
|
+
expect(payment.source.gateway_customer_profile_id).not_to be_nil
|
41
|
+
end
|
42
|
+
|
43
|
+
it "capture payment" do
|
44
|
+
visit spree.admin_order_payments_path(Spree::Order.last)
|
45
|
+
sleep(3)
|
46
|
+
click_icon(:capture)
|
47
|
+
expect(page).to have_content("Payment Updated")
|
48
|
+
end
|
49
|
+
|
50
|
+
it "voids a payment" do
|
51
|
+
visit spree.admin_order_payments_path(Spree::Order.last)
|
52
|
+
sleep(3)
|
53
|
+
click_icon(:void)
|
54
|
+
expect(page).to have_content("Payment Updated")
|
55
|
+
end
|
34
56
|
end
|
57
|
+
end
|
35
58
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
59
|
+
context 'with logged user' do
|
60
|
+
let(:user) { create(:user) }
|
61
|
+
|
62
|
+
before do
|
63
|
+
visit spree.login_path
|
64
|
+
fill_in 'Email', with: user.email
|
65
|
+
fill_in 'Password', with: user.password
|
66
|
+
click_button 'Login'
|
41
67
|
end
|
42
68
|
|
43
|
-
it
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
69
|
+
it 'store card in wallet' do
|
70
|
+
checkout_until_payment(product, user)
|
71
|
+
|
72
|
+
fill_in "Card Number", with: "4111 1111 1111 1111", visible: false
|
73
|
+
page.execute_script("$('.cardNumber').trigger('change')")
|
74
|
+
fill_in "Card Code", with: "123"
|
75
|
+
fill_in "Expiration", with: "09 / 20"
|
76
|
+
click_button "Save and Continue"
|
77
|
+
sleep(5)
|
78
|
+
find(".culqiInstallments").select("2")
|
79
|
+
click_button "Save and Continue"
|
80
|
+
click_button "Place Order"
|
81
|
+
expect(page).to have_content("Your order has been processed successfully")
|
82
|
+
|
83
|
+
checkout_until_payment(product, user)
|
84
|
+
if SolidusCulqi::Support.solidus_earlier('2.2.x')
|
85
|
+
source = user.payment_sources.first
|
86
|
+
else
|
87
|
+
source = user.wallet.wallet_payment_sources.first.payment_source
|
88
|
+
end
|
89
|
+
|
90
|
+
expect(page).to have_content(source.name)
|
91
|
+
expect(page).to have_content(source.display_number)
|
48
92
|
end
|
49
93
|
end
|
50
94
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Solidus::Gateway::CulqiGateway, type: :model do
|
4
|
+
let!(:gateway) { described_class.new }
|
5
|
+
|
6
|
+
context new_gateway: true do
|
7
|
+
it { gateway.respond_to?(:partial_name) }
|
8
|
+
it { expect(gateway.partial_name).to eq('culqi') }
|
9
|
+
it { expect(gateway.gateway_class).to eq(Solidus::Gateway::CulqiGateway) }
|
10
|
+
end
|
11
|
+
|
12
|
+
context old_gateway: true do
|
13
|
+
it { expect(gateway.method_type).to eq('culqi') }
|
14
|
+
it { expect(gateway.provider_class).to eq(Solidus::Gateway::CulqiGateway) }
|
15
|
+
end
|
16
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -18,6 +18,8 @@ require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
|
18
18
|
require 'rspec/rails'
|
19
19
|
require 'database_cleaner'
|
20
20
|
require 'ffaker'
|
21
|
+
require 'vcr'
|
22
|
+
require 'webmock'
|
21
23
|
require 'capybara/rspec'
|
22
24
|
require 'capybara/poltergeist'
|
23
25
|
require 'pry'
|
@@ -26,7 +28,7 @@ Capybara.register_driver(:poltergeist) do |app|
|
|
26
28
|
Capybara::Poltergeist::Driver.new app, timeout: 90
|
27
29
|
end
|
28
30
|
Capybara.javascript_driver = :poltergeist
|
29
|
-
Capybara.default_max_wait_time =
|
31
|
+
Capybara.default_max_wait_time = 30
|
30
32
|
|
31
33
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
32
34
|
# in spec/support/ and its subdirectories.
|
@@ -90,4 +92,17 @@ RSpec.configure do |config|
|
|
90
92
|
|
91
93
|
config.fail_fast = ENV['FAIL_FAST'] || false
|
92
94
|
config.order = 'random'
|
95
|
+
|
96
|
+
if SolidusCulqi::Support.solidus_earlier('2.3.x')
|
97
|
+
config.filter_run_excluding new_gateway: true
|
98
|
+
else
|
99
|
+
config.filter_run_excluding old_gateway: true
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
VCR.configure do |c|
|
104
|
+
c.cassette_library_dir = "spec/cassettes"
|
105
|
+
c.hook_into :webmock
|
106
|
+
c.ignore_localhost = true
|
107
|
+
c.configure_rspec_metadata!
|
93
108
|
end
|