Skip to content

Commit a431ff8

Browse files
author
gabino
committed
re-record card activation with valid card number
1 parent 0184ecb commit a431ff8

File tree

2 files changed

+32
-53
lines changed

2 files changed

+32
-53
lines changed
Lines changed: 28 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,91 @@
11
interactions:
22
- request:
3-
body: '{"number": "4122943400023502", "exp_month": 11, "exp_year": 24, "cvv2":
4-
"123"}'
3+
body: '{"number": "5448750001621241", "exp_month": 11, "exp_year": 24, "cvv2":
4+
"111"}'
55
headers:
6-
Accept:
7-
- '*/*'
8-
Accept-Encoding:
9-
- gzip, deflate
106
Authorization:
117
- DUMMY
12-
Connection:
13-
- keep-alive
148
Content-Length:
159
- '78'
1610
Content-Type:
1711
- application/json
1812
User-Agent:
19-
- cuenca-python/0.7.1
13+
- cuenca-python/2.0.0.dev3
2014
X-Cuenca-Api-Version:
2115
- '2020-03-19'
22-
X-Cuenca-LoginId:
23-
- ULj4BvmWfnRkGk62g321ikiQ
16+
X-Cuenca-LoginToken:
17+
- LTtwn7EyHrRyG7dBe927XWew
2418
method: POST
2519
uri: https://sandbox.cuenca.com/card_activations
2620
response:
2721
body:
28-
string: '{"id":"CAAmnPW-msFSUK0V0fpjnC_UQ","created_at":"2021-03-26T19:25:36.504000","user_id":"US1237","ip_address":"200.56.74.39,
29-
10.5.52.181","card_uri":"/cards/CA2XIurUccQIcqvPGNpdTm7k","success":true}'
22+
string: '{"id":"CAAEkTme9YJRQGmZgTJhSpBdg","created_at":"2025-01-08T22:40:46.834250","user_id":"US1w9BJ0DZ9kSdac39ur14Nf","ip_address":"10.0.2.68","card_uri":"/cards/CAPpdShtSGR0m__EmAmH7dWg","success":true,"bin":"544875","deactivated_at":null}'
3023
headers:
3124
Connection:
3225
- keep-alive
3326
Content-Length:
34-
- '214'
27+
- '235'
3528
Content-Type:
3629
- application/json
3730
Date:
38-
- Fri, 26 Mar 2021 19:25:36 GMT
39-
X-Amzn-Trace-Id:
40-
- Root=1-605e352f-728c710217fdaeb646ffeb5a;Sampled=0
31+
- Wed, 08 Jan 2025 22:40:47 GMT
4132
X-Request-Time:
42-
- 'value: 1.241'
33+
- 'value: 1.156'
4334
x-amz-apigw-id:
44-
- cz0_aGfEiYcFkHw=
35+
- EFzFPFpRCYcEk8Q=
4536
x-amzn-Remapped-Connection:
4637
- keep-alive
4738
x-amzn-Remapped-Content-Length:
48-
- '214'
39+
- '235'
4940
x-amzn-Remapped-Date:
50-
- Fri, 26 Mar 2021 19:25:36 GMT
41+
- Wed, 08 Jan 2025 22:40:47 GMT
5142
x-amzn-Remapped-Server:
52-
- nginx/1.18.0
53-
x-amzn-Remapped-x-amzn-RequestId:
54-
- d825e840-021f-4ea3-885b-47136dc4b951
43+
- nginx/1.26.2
5544
x-amzn-RequestId:
56-
- b7e4b2a6-e501-44be-adfe-ab8d1437915b
45+
- 0dfcf94e-9d46-447c-96d7-4fbaf1668ce0
5746
status:
5847
code: 201
5948
message: Created
6049
- request:
6150
body: null
6251
headers:
63-
Accept:
64-
- '*/*'
65-
Accept-Encoding:
66-
- gzip, deflate
6752
Authorization:
6853
- DUMMY
69-
Connection:
70-
- keep-alive
7154
User-Agent:
72-
- cuenca-python/0.7.1
55+
- cuenca-python/2.0.0.dev3
7356
X-Cuenca-Api-Version:
7457
- '2020-03-19'
75-
X-Cuenca-LoginId:
76-
- ULj4BvmWfnRkGk62g321ikiQ
58+
X-Cuenca-LoginToken:
59+
- LTtwn7EyHrRyG7dBe927XWew
7760
method: GET
78-
uri: https://sandbox.cuenca.com/cards/CA2XIurUccQIcqvPGNpdTm7k
61+
uri: https://sandbox.cuenca.com/cards/CAPpdShtSGR0m__EmAmH7dWg
7962
response:
8063
body:
81-
string: '{"id":"CA2XIurUccQIcqvPGNpdTm7k","created_at":"2019-11-13T21:15:44.877000","updated_at":"2019-11-13T21:15:44.877000","user_id":"US1237","number":"4122943400023502","exp_month":11,"exp_year":24,"cvv2":"123","type":"physical","status":"active","pin":"1234","issuer":"accendo","funding_type":"debit","pin_block":""}'
64+
string: '{"id":"CAPpdShtSGR0m__EmAmH7dWg","created_at":"2021-02-26T06:56:36.285000","updated_at":"2025-01-08T22:40:46.233000","user_id":"US1w9BJ0DZ9kSdac39ur14Nf","platform_id":"PTZbBlk__kQt-wfwzP5nwA9A","number":"5448750001621241","exp_month":11,"exp_year":24,"cvv2":"111","type":"physical","status":"active","pin":"1111","issuer":"cuenca","funding_type":"credit","card_holder_user_id":null,"deactivated_at":null,"manufacturer":"manufacturer","cvv":"111","icvv":"111","is_dynamic_cvv":false,"first_validation":null,"pin_block":null,"pin_block_switch":null,"pin_attempts_failed":0}'
8265
headers:
8366
Connection:
8467
- keep-alive
8568
Content-Length:
86-
- '330'
69+
- '572'
8770
Content-Type:
8871
- application/json
8972
Date:
90-
- Fri, 26 Mar 2021 19:25:37 GMT
91-
X-Amzn-Trace-Id:
92-
- Root=1-605e3530-41588b232c2acbdb55635076;Sampled=0
73+
- Wed, 08 Jan 2025 22:40:48 GMT
9374
X-Request-Time:
94-
- 'value: 0.423'
75+
- 'value: 0.716'
9576
x-amz-apigw-id:
96-
- cz0_pGfNCYcFVlA=
77+
- EFzFdFIeCYcEs9g=
9778
x-amzn-Remapped-Connection:
9879
- keep-alive
9980
x-amzn-Remapped-Content-Length:
100-
- '330'
81+
- '572'
10182
x-amzn-Remapped-Date:
102-
- Fri, 26 Mar 2021 19:25:37 GMT
83+
- Wed, 08 Jan 2025 22:40:48 GMT
10384
x-amzn-Remapped-Server:
104-
- nginx/1.18.0
105-
x-amzn-Remapped-x-amzn-RequestId:
106-
- 5e9c4391-baff-4bc8-a71a-d515803b6c99
85+
- nginx/1.26.2
10786
x-amzn-RequestId:
108-
- 52340184-a7f4-4ecf-b905-51e7a1a38805
87+
- 48813814-edea-47dc-b7f8-5ef6069da98b
10988
status:
11089
code: 200
11190
message: OK
112-
version: 1
91+
version: 1

tests/resources/test_card_activations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
@pytest.mark.vcr
99
def test_card_activation():
1010
values = dict(
11-
number='4122943400023502',
11+
number='5448750001621241',
1212
exp_month=11,
1313
exp_year=24,
14-
cvv2='123',
14+
cvv2='111',
1515
)
1616
card_activation = CardActivation.create(**values)
1717
assert card_activation.success
18-
assert card_activation.user_id == 'US1237'
18+
assert card_activation.user_id == 'US1w9BJ0DZ9kSdac39ur14Nf'
1919
card = card_activation.card
2020
assert all(getattr(card, key) == value for key, value in values.items())
21-
assert card.user_id == 'US1237'
21+
assert card.user_id == 'US1w9BJ0DZ9kSdac39ur14Nf'
2222
assert card.status is CardStatus.active
2323

2424

0 commit comments

Comments
 (0)