Repository navigation
Expand file tree
/
Copy pathreflection.http
More file actions
88 lines (74 loc) · 2.21 KB
/
Copy pathreflection.http
File metadata and controls
88 lines (74 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@baseUrl = http://localhost:8080
# Define PLUGIN_ADMIN_TOKEN in the environment inherited by the HTTP client.
@adminToken = {{$processEnv PLUGIN_ADMIN_TOKEN}}
### 1. Listar proveedores externos (inicialmente ALPHA)
GET {{baseUrl}}/api/v1/reflection/plugins
Authorization: Bearer {{adminToken}}
### 2. Descriptor con capacidades, versión y hash del artefacto
GET {{baseUrl}}/api/v1/reflection/plugins/ALPHA
Authorization: Bearer {{adminToken}}
### 3. Inspeccionar clase; repetir para observar cache hit
GET {{baseUrl}}/api/v1/reflection/plugins/ALPHA/inspect
Authorization: Bearer {{adminToken}}
### 4. Procesar tarjeta con ALPHA
POST {{baseUrl}}/api/v1/payments
Content-Type: application/json
{
"paymentId": "PAY-1001",
"providerCode": "ALPHA",
"amount": 125.50,
"currency": "PEN",
"instrumentType": "CARD",
"pan": "4111111111111111",
"cardHolder": "Cliente Demo",
"expiryMonth": 12,
"expiryYear": 2030,
"cvv": "123"
}
### 5. Después de instalar BETA con scripts/install_plugins.py
POST {{baseUrl}}/api/v1/reflection/plugins/reload
Authorization: Bearer {{adminToken}}
### 6. BETA funciona sin reconstruir ni reiniciar el servicio
POST {{baseUrl}}/api/v1/payments
Content-Type: application/json
{
"paymentId": "PAY-1002",
"providerCode": "BETA",
"amount": 80,
"currency": "PEN",
"instrumentType": "CARD",
"pan": "4111111111111111",
"cardHolder": "Cliente Demo",
"expiryMonth": 12,
"expiryYear": 2030,
"cvv": "123"
}
### 7. Billetera con ALPHA (BETA devuelve 400 para este instrumento)
POST {{baseUrl}}/api/v1/payments
Content-Type: application/json
{
"paymentId": "PAY-1003",
"providerCode": "ALPHA",
"amount": 80,
"currency": "PEN",
"instrumentType": "WALLET",
"walletProvider": "YAPE-DEMO",
"walletToken": "demo-token"
}
### 8. Transferencia con ALPHA
POST {{baseUrl}}/api/v1/payments
Content-Type: application/json
{
"paymentId": "PAY-1004",
"providerCode": "ALPHA",
"amount": 80,
"currency": "USD",
"instrumentType": "BANK_TRANSFER",
"bank": "DEMO",
"accountNumber": "demo-account"
}
### 9. Métricas acumuladas por proveedor
GET {{baseUrl}}/api/v1/reflection/metrics
Authorization: Bearer {{adminToken}}
### 10. Health público de la PoC
GET {{baseUrl}}/actuator/health