transbank-sdk 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/publish-lib.yml +55 -0
- data/CHANGELOG.md +53 -11
- data/README.md +46 -26
- data/lib/transbank/sdk/common/api_constants.rb +2 -2
- data/lib/transbank/sdk/shared/request_service.rb +12 -6
- data/lib/transbank/sdk/version.rb +1 -1
- data/lib/transbank/sdk/webpay/oneclick/mall_transaction.rb +0 -52
- data/lib/transbank/sdk/webpay/transaccion_completa/mall_transaction.rb +0 -55
- data/lib/transbank/sdk/webpay/transaccion_completa/transaction.rb +0 -50
- data/lib/transbank/sdk/webpay/webpay_plus/mall_transaction.rb +0 -55
- data/lib/transbank/sdk/webpay/webpay_plus/transaction.rb +0 -51
- metadata +5 -8
- data/.travis.yml +0 -10
- data/Dockerfile +0 -5
- data/Makefile +0 -24
- data/docker-compose.yml +0 -20
- data/sdk_test.sh +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9df240bb39ebfec8fe1d6df24389ae30918d52fc
|
4
|
+
data.tar.gz: c49264215b6e818cc94a2c2e596a86f069c9e4e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 883ad418e9f1f421bd3b097591ab5e955a5bfda92683d9a7893f08c4be041c6cdfe68efef25d2c4f6d277b745d32b8b0a35f3bbed60a127bec4a1dff1c8099a7
|
7
|
+
data.tar.gz: 7be5c486595297097e33da126a7a64ae9d83337786e4e50100150bf1a31a5f85706b3352dd339181b084711ca0eba1a1d612e266727c42432973dfc75d43ec8a
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
|
6
|
+
# GitHub recommends pinning actions to a commit SHA.
|
7
|
+
# To get a newer version, you will need to update the SHA.
|
8
|
+
# You can also reference a tag or branch, but the action may change without warning.
|
9
|
+
|
10
|
+
name: Publish Ruby Gem
|
11
|
+
|
12
|
+
on:
|
13
|
+
push:
|
14
|
+
tags:
|
15
|
+
- '*'
|
16
|
+
|
17
|
+
jobs:
|
18
|
+
build:
|
19
|
+
name: Build + Publish
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
permissions:
|
22
|
+
packages: write
|
23
|
+
contents: read
|
24
|
+
|
25
|
+
steps:
|
26
|
+
- uses: actions/checkout@v3
|
27
|
+
- name: Set up Ruby 2.4
|
28
|
+
uses: ruby/setup-ruby@v1
|
29
|
+
with:
|
30
|
+
ruby-version: 2.4
|
31
|
+
- run: |
|
32
|
+
bundle install
|
33
|
+
|
34
|
+
- name: Publish to GPR
|
35
|
+
run: |
|
36
|
+
mkdir -p $HOME/.gem
|
37
|
+
touch $HOME/.gem/credentials
|
38
|
+
chmod 0600 $HOME/.gem/credentials
|
39
|
+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
40
|
+
gem build *.gemspec
|
41
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
42
|
+
env:
|
43
|
+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
44
|
+
OWNER: ${{ github.repository_owner }}
|
45
|
+
|
46
|
+
- name: Publish to RubyGems
|
47
|
+
run: |
|
48
|
+
mkdir -p $HOME/.gem
|
49
|
+
touch $HOME/.gem/credentials
|
50
|
+
chmod 0600 $HOME/.gem/credentials
|
51
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
52
|
+
gem build *.gemspec
|
53
|
+
gem push *.gem
|
54
|
+
env:
|
55
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,31 @@
|
|
1
1
|
# Changelog
|
2
|
+
|
2
3
|
Todos los cambios notables a este proyecto serán documentados en este archivo.
|
3
4
|
|
4
5
|
El formato está basado en [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
6
|
y este proyecto adhiere a [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
7
|
|
7
|
-
## [4.0.0] -
|
8
|
+
## [4.0.0] - 2024-03-20
|
9
|
+
|
10
|
+
### Changed
|
11
|
+
|
12
|
+
- Downgrade del API de la versión 1.3 a la versión 1.2
|
13
|
+
|
14
|
+
### Fixed
|
15
|
+
|
16
|
+
- Corregido un error en RequestService que causaba problemas debido a la dependencia de `.blank?`, que no es parte de la biblioteca estándar de Ruby
|
17
|
+
|
18
|
+
## [3.0.2] - 2023-03-7
|
19
|
+
|
20
|
+
### Fixed
|
21
|
+
|
22
|
+
- Se corrige el manejo de errores del método delete en Oneclick Mall
|
23
|
+
|
24
|
+
## Added
|
25
|
+
|
26
|
+
- En caso de error se verifica si el response tiene body y en caso de no tenerlo se retorna el status
|
27
|
+
|
28
|
+
## [3.0.0] - 2022-09-19
|
8
29
|
|
9
30
|
### Fixed
|
10
31
|
|
@@ -19,7 +40,9 @@ y este proyecto adhiere a [Semantic Versioning](http://semver.org/spec/v2.0.0.ht
|
|
19
40
|
- Se agrega los métodos 'increaseAmount', 'increaseAuthorizationDate', 'reversePreAuthorizedAmount', 'deferredCaptureHistory' a las versiones diferidas de WebpayPlus, WebpayPlus Mall, Oneclick Mall, Transaccion Completa y Transaccion Completa Mall
|
20
41
|
|
21
42
|
## [2.0.1] - 2022-06-14
|
43
|
+
|
22
44
|
### Fixed
|
45
|
+
|
23
46
|
- Se soluciona error en método refund para transacciones Webpay Plus Mall. Muchas gracias por tu aporte @danirod
|
24
47
|
|
25
48
|
## [2.0.0] - 2022-01-03
|
@@ -46,25 +69,34 @@ y este proyecto adhiere a [Semantic Versioning](http://semver.org/spec/v2.0.0.ht
|
|
46
69
|
- Se agrega un módulo de constantes con las claves de comercio de integración: 'IntegrationApiKeys'
|
47
70
|
|
48
71
|
## [1.5.1] - 2021-04-12
|
72
|
+
|
49
73
|
### Added
|
74
|
+
|
50
75
|
- Se agrega captura diferida en Transacción Completa y Transacción Completa Mall
|
51
76
|
|
52
77
|
## [1.4.1] - 2021-03-30
|
78
|
+
|
53
79
|
### Fixed
|
80
|
+
|
54
81
|
- Se agrega parámetro de estado faltante en respuesta de Commit y Status en Webpay Plus
|
55
82
|
- Se agrega dependencia JSON (~> 2.0) para evitar problemas al recibir respuesta de Commit
|
56
83
|
- Se arregla endpoint de captura en Webpay Plus
|
57
84
|
|
58
85
|
## [1.4.0] - 2020-12-03
|
86
|
+
|
59
87
|
### Added
|
88
|
+
|
60
89
|
- Se agregan métodos de configuración para integración a Webpay Plus en sus modalidades diferidas y mall diferida.
|
61
90
|
- Se agregan métodos de configuración para integración a Webpay Oneclick en su modalidad mall diferida.
|
62
91
|
|
63
92
|
### Fixed
|
93
|
+
|
64
94
|
- Se arregla forma en que se lee configuración del SDK, estaba tomando valores de una constante en vez de la variable de clase correspondiente. Este arreglo es para todos los productos con la excepción de Onepay
|
65
95
|
|
66
96
|
## [1.3.1] - 2020-10-29
|
97
|
+
|
67
98
|
### Fixed
|
99
|
+
|
68
100
|
- Se revierte commit que elimina requires necesarios para productos REST
|
69
101
|
|
70
102
|
## [1.3.0] - 2020-10-26
|
@@ -72,33 +104,43 @@ y este proyecto adhiere a [Semantic Versioning](http://semver.org/spec/v2.0.0.ht
|
|
72
104
|
### Added
|
73
105
|
|
74
106
|
- Se agrega soporte para:
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
107
|
+
- Webpay Plus Rest
|
108
|
+
- modalidad normal
|
109
|
+
- modalidad captura diferida
|
110
|
+
- modalidad mall
|
111
|
+
- modalidad mall captura diferida
|
112
|
+
- Patpass by Webpay Rest
|
113
|
+
- Patpass Comercio Rest
|
114
|
+
- Transacción completa Rest
|
115
|
+
- modalidad mall
|
116
|
+
- Oneclick Mall Captura diferida
|
85
117
|
|
86
118
|
## [1.2.0] - 2019-12-26
|
119
|
+
|
87
120
|
### Added
|
121
|
+
|
88
122
|
- Se agrega soporte para Oneclick Mall y Transacción Completa en sus versiones REST.
|
89
123
|
|
90
124
|
## [1.1.0] - 2018-04-08
|
125
|
+
|
91
126
|
### Added
|
127
|
+
|
92
128
|
- Se agregaron los parámetros `qr_width_height` y `commerce_logo_url` a Options, para definir el tamaño del QR generado para la transacción, y especificar la ubicación del logo de comercio para ser mostrado en la aplicación móvil de Onepay. Puedes configurar estos parámetros globalmente o por transacción.
|
93
129
|
|
94
130
|
## [1.0.2] - 2018-11-29
|
131
|
+
|
95
132
|
### Fixed
|
133
|
+
|
96
134
|
- Corrige problema que evitaba poder utilizar un `CHANNEL` distinto a `WEB`
|
97
135
|
|
98
136
|
## [1.0.1] - 2018-10-24
|
137
|
+
|
99
138
|
### Fixed
|
139
|
+
|
100
140
|
- Cambios para subir automáticamente la gema a RubyGems cuando se hace un nuevo release
|
101
141
|
|
102
142
|
## [1.0.0] - 2018-10-23
|
143
|
+
|
103
144
|
### Added
|
145
|
+
|
104
146
|
- Primer lanzamiento del SDK
|
data/README.md
CHANGED
@@ -9,23 +9,26 @@ SDK Oficial de Transbank
|
|
9
9
|
# Instalación
|
10
10
|
|
11
11
|
Puedes instalar el SDK directamente
|
12
|
+
|
12
13
|
```bash
|
13
14
|
gem install transbank-sdk
|
14
15
|
```
|
15
16
|
|
16
17
|
o añadirlo a tu `Gemfile`
|
18
|
+
|
17
19
|
```ruby
|
18
20
|
gem 'transbank-sdk'
|
19
21
|
```
|
22
|
+
|
20
23
|
y luego ejecutar
|
24
|
+
|
21
25
|
```bash
|
22
26
|
bundle install
|
23
27
|
```
|
24
|
-
## Documentación
|
25
28
|
|
26
|
-
|
29
|
+
## Documentación
|
27
30
|
|
28
|
-
|
31
|
+
Puedes encontrar toda la documentación de cómo usar este SDK en el sitio https://www.transbankdevelopers.cl.
|
29
32
|
|
30
33
|
La documentación relevante para usar este SDK es:
|
31
34
|
|
@@ -34,45 +37,62 @@ La documentación relevante para usar este SDK es:
|
|
34
37
|
|
35
38
|
## Información para contribuir y desarrollar este SDK
|
36
39
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
40
|
+
#### Short lead tokens
|
41
|
+
|
42
|
+
`WIP` = En progreso.
|
43
|
+
|
44
|
+
`feat` = Nuevos features.
|
45
|
+
|
46
|
+
`fix` = Corrección de un bug.
|
47
|
+
|
48
|
+
`docs` = Cambios solo de documentación.
|
49
|
+
|
50
|
+
`style` = Cambios que no afectan el significado del código. (espaciado, formateo de código, comillas faltantes, etc)
|
51
|
+
|
52
|
+
`refactor` = Un cambio en el código que no arregla un bug ni agrega una funcionalidad.
|
53
|
+
|
54
|
+
`perf` = Cambio que mejora el rendimiento.
|
55
|
+
|
56
|
+
`test` = Agregar test faltantes o los corrige.
|
57
|
+
|
58
|
+
`chore` = Cambios en el build o herramientas auxiliares y librerías.
|
59
|
+
|
60
|
+
`revert` = Revierte un commit.
|
61
|
+
|
62
|
+
`release` = Para liberar una nueva versión.
|
41
63
|
|
42
64
|
### Standares
|
43
65
|
|
44
66
|
- Para los commits respetamos las siguientes normas: https://chris.beams.io/posts/git-commit/
|
45
67
|
- Usamos ingles, para los mensajes de commit.
|
46
68
|
- Se pueden usar tokens como WIP, en el subject de un commit, separando el token con `:`, por ejemplo:
|
47
|
-
`WIP: This is a useful commit message`
|
69
|
+
`WIP: This is a useful commit message`
|
48
70
|
- Para los nombres de ramas también usamos ingles.
|
49
71
|
- Se asume, que una rama de feature no mezclada, es un feature no terminado.
|
50
72
|
- El nombre de las ramas va en minúsculas.
|
51
73
|
- Las palabras se separan con `-`.
|
52
74
|
- Las ramas comienzan con alguno de los short lead tokens definidos, por ejemplo: `feat/tokens-configuration`
|
53
75
|
|
54
|
-
|
55
|
-
##### Commits
|
56
|
-
- WIP = Trabajo en progreso.
|
57
|
-
##### Ramas
|
58
|
-
- feat = Nuevos features
|
59
|
-
- chore = Tareas, que no son visibles al usuario.
|
60
|
-
- bug = Resolución de bugs.
|
76
|
+
### **Reglas** 📖
|
61
77
|
|
62
|
-
|
78
|
+
1. Todo PR debe incluir test o evidencia de que funcione correctamente(gif, foto).
|
79
|
+
2. El PR debe tener 2 o más aprobaciones para poder mezclarse.
|
80
|
+
3. Si un commit revierte un commit anterior deberá comenzar con "revert:" seguido del mensaje del commit anterior.
|
63
81
|
|
64
|
-
###
|
65
|
-
Primero y solamente una vez para instalar gemas debes usar el siguiente comando en una terminal.
|
66
|
-
```bash
|
67
|
-
make build
|
68
|
-
```
|
82
|
+
### **Pull Request**
|
69
83
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
84
|
+
- Usar un lenguaje imperativo y en tiempo presente: "change" no "changed" ni "changes".
|
85
|
+
- El título del los PR y mensajes de commit no pueden comenzar con una letra mayúscula.
|
86
|
+
- No se debe usar punto final en los títulos o descripción de los commits.
|
87
|
+
- El título del PR debe comenzar con el short lead token definido para la rama, seguido de : y una breve descripción del cambio.
|
88
|
+
- La descripción del PR debe detallar los cambios.
|
89
|
+
- La descripción del PR debe incluir evidencias de que los test se ejecutan de forma correcta.
|
90
|
+
- Se pueden usar gif o videos para complementar la descripción o evidenciar el funcionamiento del PR.
|
91
|
+
|
92
|
+
### Todas las mezclas a master se hacen mediante Pull Request.
|
74
93
|
|
75
94
|
### Deploy de una nueva versión.
|
95
|
+
|
76
96
|
Para generar una nueva versión, se debe crear un PR (con un título "Prepare release X.Y.Z" con los valores que correspondan para `X`, `Y` y `Z`). Se debe seguir el estándar semver para determinar si se incrementa el valor de `X` (si hay cambios no retrocompatibles), `Y` (para mejoras retrocompatibles) o `Z` (si sólo hubo correcciones a bugs).
|
77
97
|
|
78
98
|
En ese PR deben incluirse los siguientes cambios:
|
@@ -82,4 +102,4 @@ En ese PR deben incluirse los siguientes cambios:
|
|
82
102
|
|
83
103
|
Luego de obtener aprobación del pull request, debe mezclarse a master e inmediatamente generar un release en GitHub con el tag `vX.Y.Z`. En la descripción del release debes poner lo mismo que agregaste al changelog.
|
84
104
|
|
85
|
-
Con eso
|
105
|
+
Con eso Github Actions generará automáticamente una nueva versión de la librería y la publicará en RubyGems.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Transbank
|
2
2
|
module Common
|
3
3
|
module ApiConstants
|
4
|
-
WEBPAY_ENDPOINT = 'rswebpaytransaction/api/webpay/v1.
|
5
|
-
ONECLICK_ENDPOINT = 'rswebpaytransaction/api/oneclick/v1.
|
4
|
+
WEBPAY_ENDPOINT = 'rswebpaytransaction/api/webpay/v1.2'.freeze
|
5
|
+
ONECLICK_ENDPOINT = 'rswebpaytransaction/api/oneclick/v1.2'.freeze
|
6
6
|
PATPASS_ENDPOINT = 'restpatpass/v1/services'.freeze
|
7
7
|
|
8
8
|
BUY_ORDER_LENGTH = 26;
|
@@ -46,16 +46,22 @@ module Transbank
|
|
46
46
|
http_method = build_method(method, uri, body)
|
47
47
|
|
48
48
|
response = http.request(http_method)
|
49
|
+
|
49
50
|
if response.is_a? Net::HTTPSuccess
|
50
|
-
return nil if response.body.empty?
|
51
|
+
return nil if response.body.nil? || response.body.empty?
|
51
52
|
return JSON.parse(response.body)
|
52
53
|
end
|
53
|
-
|
54
|
-
if body.
|
55
|
-
|
56
|
-
|
57
|
-
|
54
|
+
|
55
|
+
if !response.body.to_s.empty?
|
56
|
+
body = JSON.parse(response.body)
|
57
|
+
if body.key?("description")
|
58
|
+
raise TransbankError, "Transbank Error: #{body['code']} - #{body['description']}"
|
59
|
+
else
|
60
|
+
raise TransbankError, "Transbank Error: #{body['error_message']}"
|
61
|
+
end
|
58
62
|
end
|
63
|
+
|
64
|
+
raise TransbankError, "Transbank Error: HTTP-STATUS #{response&.code}"
|
59
65
|
end
|
60
66
|
|
61
67
|
def build_client
|
@@ -8,10 +8,6 @@ module Transbank
|
|
8
8
|
STATUS_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}').freeze
|
9
9
|
REFUND_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/refunds').freeze
|
10
10
|
CAPTURE_ENDPOINT = (RESOURCES_URL + '/transactions/capture').freeze
|
11
|
-
INCREASE_AMOUNT_ENDPOINT = (RESOURCES_URL + '/transactions/amount').freeze
|
12
|
-
INCREASE_AUTHORIZATION_DATE_ENDPOINT = (RESOURCES_URL + '/transactions/authorization_date').freeze
|
13
|
-
REVERSE_PRE_AUTHORIZED_AMOUNT_ENDPOINT = (RESOURCES_URL + '/transactions/reverse/amount').freeze
|
14
|
-
DEFERRED_CAPTURE_HISTORY_ENDPOINT = (RESOURCES_URL + '/transactions/details').freeze
|
15
11
|
|
16
12
|
def initialize(commerce_code = ::Transbank::Common::IntegrationCommerceCodes::ONECLICK_MALL, api_key = ::Transbank::Common::IntegrationApiKeys::WEBPAY, environment = DEFAULT_ENVIRONMENT)
|
17
13
|
super(commerce_code, api_key, environment)
|
@@ -64,54 +60,6 @@ module Transbank
|
|
64
60
|
)
|
65
61
|
request_service.post(detail_buy_order: child_buy_order, commerce_code: child_commerce_code, amount: amount)
|
66
62
|
end
|
67
|
-
|
68
|
-
def increase_amount(child_commerce_code, child_buy_order, authorization_code, amount)
|
69
|
-
|
70
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
71
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
72
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
73
|
-
|
74
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
75
|
-
@environment, INCREASE_AMOUNT_ENDPOINT, @commerce_code, @api_key
|
76
|
-
)
|
77
|
-
request_service.put(commerce_code: child_commerce_code, buy_order: child_buy_order, authorization_code: authorization_code, amount: amount)
|
78
|
-
end
|
79
|
-
|
80
|
-
def increase_authorization_date(child_commerce_code, child_buy_order, authorization_code)
|
81
|
-
|
82
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
83
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
84
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
85
|
-
|
86
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
87
|
-
@environment, INCREASE_AUTHORIZATION_DATE_ENDPOINT, @commerce_code, @api_key
|
88
|
-
)
|
89
|
-
request_service.put(commerce_code: child_commerce_code, buy_order: child_buy_order, authorization_code: authorization_code)
|
90
|
-
end
|
91
|
-
|
92
|
-
def reverse_pre_authorized_amount(child_commerce_code, child_buy_order, authorization_code, amount)
|
93
|
-
|
94
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
95
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
96
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
97
|
-
|
98
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
99
|
-
@environment, REVERSE_PRE_AUTHORIZED_AMOUNT_ENDPOINT, @commerce_code, @api_key
|
100
|
-
)
|
101
|
-
request_service.put(commerce_code: child_commerce_code, buy_order: child_buy_order, authorization_code: authorization_code, amount: amount)
|
102
|
-
end
|
103
|
-
|
104
|
-
def deferred_capture_history(child_commerce_code, child_buy_order, authorization_code)
|
105
|
-
|
106
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
107
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
108
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
109
|
-
|
110
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
111
|
-
@environment, DEFERRED_CAPTURE_HISTORY_ENDPOINT, @commerce_code, @api_key
|
112
|
-
)
|
113
|
-
request_service.post(commerce_code: child_commerce_code, buy_order: child_buy_order, authorization_code: authorization_code)
|
114
|
-
end
|
115
63
|
end
|
116
64
|
end
|
117
65
|
end
|
@@ -10,10 +10,6 @@ module Transbank
|
|
10
10
|
STATUS_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}').freeze
|
11
11
|
REFUND_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/refunds').freeze
|
12
12
|
CAPTURE_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/capture').freeze
|
13
|
-
INCREASE_AMOUNT_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/amount').freeze
|
14
|
-
INCREASE_AUTHORIZATION_DATE_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/authorization_date').freeze
|
15
|
-
REVERSE_PRE_AUTHORIZED_AMOUNT_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/reverse/amount').freeze
|
16
|
-
DEFERRED_CAPTURE_HISTORY_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/details').freeze
|
17
13
|
|
18
14
|
def initialize(commerce_code = ::Transbank::Common::IntegrationCommerceCodes::TRANSACCION_COMPLETA_MALL, api_key = ::Transbank::Common::IntegrationApiKeys::WEBPAY, environment = DEFAULT_ENVIRONMENT)
|
19
15
|
super(commerce_code, api_key, environment)
|
@@ -65,57 +61,6 @@ module Transbank
|
|
65
61
|
)
|
66
62
|
request_service.put(buy_order: buy_order, commerce_code: commerce_code, authorization_code: authorization_code, capture_amount: amount)
|
67
63
|
end
|
68
|
-
|
69
|
-
def increase_amount(token, child_commerce_code, child_buy_order, authorization_code, amount)
|
70
|
-
|
71
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
72
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
73
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
74
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
75
|
-
|
76
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
77
|
-
@environment, format(INCREASE_AMOUNT_ENDPOINT, token: token), @commerce_code, @api_key
|
78
|
-
)
|
79
|
-
request_service.put(commerce_code: child_commerce_code, buy_order: child_buy_order, authorization_code: authorization_code, amount: amount)
|
80
|
-
end
|
81
|
-
|
82
|
-
def increase_authorization_date(token, child_commerce_code, child_buy_order, authorization_code)
|
83
|
-
|
84
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
85
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
86
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
87
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
88
|
-
|
89
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
90
|
-
@environment, format(INCREASE_AUTHORIZATION_DATE_ENDPOINT, token: token), @commerce_code, @api_key
|
91
|
-
)
|
92
|
-
request_service.put(commerce_code: child_commerce_code, buy_order: child_buy_order, authorization_code: authorization_code)
|
93
|
-
end
|
94
|
-
|
95
|
-
def reverse_pre_authorized_amount(token, child_commerce_code, child_buy_order, authorization_code, amount)
|
96
|
-
|
97
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
98
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
99
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
100
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
101
|
-
|
102
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
103
|
-
@environment, format(REVERSE_PRE_AUTHORIZED_AMOUNT_ENDPOINT, token: token), @commerce_code, @api_key
|
104
|
-
)
|
105
|
-
request_service.put(commerce_code: child_commerce_code, buy_order: child_buy_order, authorization_code: authorization_code, amount: amount)
|
106
|
-
end
|
107
|
-
|
108
|
-
def deferred_capture_history(token, child_commerce_code, child_buy_order)
|
109
|
-
|
110
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
111
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
112
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
113
|
-
|
114
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
115
|
-
@environment, format(DEFERRED_CAPTURE_HISTORY_ENDPOINT, token: token), @commerce_code, @api_key
|
116
|
-
)
|
117
|
-
request_service.post(commerce_code: child_commerce_code, buy_order: child_buy_order)
|
118
|
-
end
|
119
64
|
end
|
120
65
|
end
|
121
66
|
end
|
@@ -10,10 +10,6 @@ module Transbank
|
|
10
10
|
STATUS_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}').freeze
|
11
11
|
REFUND_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/refunds').freeze
|
12
12
|
CAPTURE_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/capture').freeze
|
13
|
-
INCREASE_AMOUNT_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/amount').freeze
|
14
|
-
INCREASE_AUTHORIZATION_DATE_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/authorization_date').freeze
|
15
|
-
REVERSE_PRE_AUTHORIZED_AMOUNT_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/reverse/amount').freeze
|
16
|
-
DEFERRED_CAPTURE_HISTORY_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/details').freeze
|
17
13
|
|
18
14
|
def initialize(commerce_code = ::Transbank::Common::IntegrationCommerceCodes::TRANSACCION_COMPLETA, api_key = ::Transbank::Common::IntegrationApiKeys::WEBPAY, environment = DEFAULT_ENVIRONMENT)
|
19
15
|
super
|
@@ -67,52 +63,6 @@ module Transbank
|
|
67
63
|
@environment, format(CAPTURE_ENDPOINT, token: token), @commerce_code, @api_key
|
68
64
|
)
|
69
65
|
request_service.put(buy_order: buy_order, authorization_code: authorization_code, capture_amount: amount)
|
70
|
-
end
|
71
|
-
|
72
|
-
def increase_amount(token, buy_order, authorization_code, amount)
|
73
|
-
|
74
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
75
|
-
Transbank::Common::Validation.has_text_with_max_length(buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "buy_order")
|
76
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
77
|
-
|
78
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
79
|
-
@environment, format(INCREASE_AMOUNT_ENDPOINT, token: token), @commerce_code, @api_key
|
80
|
-
)
|
81
|
-
request_service.put(commerce_code: @commerce_code, buy_order: buy_order, authorization_code: authorization_code, amount: amount)
|
82
|
-
end
|
83
|
-
|
84
|
-
def increase_authorization_date(token, buy_order, authorization_code)
|
85
|
-
|
86
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
87
|
-
Transbank::Common::Validation.has_text_with_max_length(buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "buy_order")
|
88
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
89
|
-
|
90
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
91
|
-
@environment, format(INCREASE_AUTHORIZATION_DATE_ENDPOINT, token: token), @commerce_code, @api_key
|
92
|
-
)
|
93
|
-
request_service.put(commerce_code: @commerce_code, buy_order: buy_order, authorization_code: authorization_code)
|
94
|
-
end
|
95
|
-
|
96
|
-
def reverse_pre_authorized_amount(token, buy_order, authorization_code, amount)
|
97
|
-
|
98
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
99
|
-
Transbank::Common::Validation.has_text_with_max_length(buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "buy_order")
|
100
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
101
|
-
|
102
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
103
|
-
@environment, format(REVERSE_PRE_AUTHORIZED_AMOUNT_ENDPOINT, token: token), @commerce_code, @api_key
|
104
|
-
)
|
105
|
-
request_service.put(commerce_code: @commerce_code, buy_order: buy_order, authorization_code: authorization_code, amount: amount)
|
106
|
-
end
|
107
|
-
|
108
|
-
def deferred_capture_history(token)
|
109
|
-
|
110
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
111
|
-
|
112
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
113
|
-
@environment, format(DEFERRED_CAPTURE_HISTORY_ENDPOINT, token: token), @commerce_code, @api_key
|
114
|
-
)
|
115
|
-
request_service.get
|
116
66
|
end
|
117
67
|
end
|
118
68
|
end
|
@@ -9,10 +9,6 @@ module Transbank
|
|
9
9
|
STATUS_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}').freeze
|
10
10
|
REFUND_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/refunds').freeze
|
11
11
|
CAPTURE_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/capture').freeze
|
12
|
-
INCREASE_AMOUNT_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/amount').freeze
|
13
|
-
INCREASE_AUTHORIZATION_DATE_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/authorization_date').freeze
|
14
|
-
REVERSE_PRE_AUTHORIZED_AMOUNT_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/reverse/amount').freeze
|
15
|
-
DEFERRED_CAPTURE_HISTORY_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/details').freeze
|
16
12
|
|
17
13
|
def initialize(commerce_code = ::Transbank::Common::IntegrationCommerceCodes::WEBPAY_PLUS_MALL, api_key = ::Transbank::Common::IntegrationApiKeys::WEBPAY, environment = DEFAULT_ENVIRONMENT)
|
18
14
|
super
|
@@ -77,57 +73,6 @@ module Transbank
|
|
77
73
|
)
|
78
74
|
request_service.put(commerce_code: child_commerce_code, buy_order: buy_order, authorization_code: authorization_code, capture_amount: capture_amount)
|
79
75
|
end
|
80
|
-
|
81
|
-
def increase_amount(token, child_commerce_code, child_buy_order, authorization_code, amount)
|
82
|
-
|
83
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
84
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
85
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
86
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
87
|
-
|
88
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
89
|
-
@environment, format(INCREASE_AMOUNT_ENDPOINT, token: token), @commerce_code, @api_key
|
90
|
-
)
|
91
|
-
request_service.put(commerce_code: child_commerce_code, buy_order: child_buy_order, authorization_code: authorization_code, amount: amount)
|
92
|
-
end
|
93
|
-
|
94
|
-
def increase_authorization_date(token, child_commerce_code, child_buy_order, authorization_code)
|
95
|
-
|
96
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
97
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
98
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
99
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
100
|
-
|
101
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
102
|
-
@environment, format(INCREASE_AUTHORIZATION_DATE_ENDPOINT, token: token), @commerce_code, @api_key
|
103
|
-
)
|
104
|
-
request_service.put(commerce_code: child_commerce_code, buy_order: child_buy_order, authorization_code: authorization_code)
|
105
|
-
end
|
106
|
-
|
107
|
-
def reverse_pre_authorized_amount(token, child_commerce_code, child_buy_order, authorization_code, amount)
|
108
|
-
|
109
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
110
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
111
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
112
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
113
|
-
|
114
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
115
|
-
@environment, format(REVERSE_PRE_AUTHORIZED_AMOUNT_ENDPOINT, token: token), @commerce_code, @api_key
|
116
|
-
)
|
117
|
-
request_service.put(commerce_code: child_commerce_code, buy_order: child_buy_order, authorization_code: authorization_code, amount: amount)
|
118
|
-
end
|
119
|
-
|
120
|
-
def deferred_capture_history(token, child_commerce_code, child_buy_order)
|
121
|
-
|
122
|
-
Transbank::Common::Validation.has_text_with_max_length(child_commerce_code, Transbank::Common::ApiConstants::COMMERCE_CODE_LENGTH, "child_commerce_code")
|
123
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
124
|
-
Transbank::Common::Validation.has_text_with_max_length(child_buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "child_buy_order")
|
125
|
-
|
126
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
127
|
-
@environment, format(DEFERRED_CAPTURE_HISTORY_ENDPOINT, token: token), @commerce_code, @api_key
|
128
|
-
)
|
129
|
-
request_service.post(commerce_code: child_commerce_code, buy_order: child_buy_order)
|
130
|
-
end
|
131
76
|
end
|
132
77
|
end
|
133
78
|
end
|
@@ -9,10 +9,6 @@ module Transbank
|
|
9
9
|
STATUS_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}').freeze
|
10
10
|
REFUND_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/refunds').freeze
|
11
11
|
CAPTURE_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/capture').freeze
|
12
|
-
INCREASE_AMOUNT_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/amount').freeze
|
13
|
-
INCREASE_AUTHORIZATION_DATE_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/authorization_date').freeze
|
14
|
-
REVERSE_PRE_AUTHORIZED_AMOUNT_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/reverse/amount').freeze
|
15
|
-
DEFERRED_CAPTURE_HISTORY_ENDPOINT = (RESOURCES_URL + '/transactions/%{token}/details').freeze
|
16
12
|
|
17
13
|
|
18
14
|
def initialize(commerce_code = ::Transbank::Common::IntegrationCommerceCodes::WEBPAY_PLUS, api_key = ::Transbank::Common::IntegrationApiKeys::WEBPAY, environment = DEFAULT_ENVIRONMENT)
|
@@ -73,54 +69,7 @@ module Transbank
|
|
73
69
|
@environment, format(CAPTURE_ENDPOINT, token: token), @commerce_code, @api_key
|
74
70
|
)
|
75
71
|
request_service.put(buy_order: buy_order, authorization_code: authorization_code, capture_amount: amount)
|
76
|
-
end
|
77
|
-
|
78
|
-
def increase_amount(token, buy_order, authorization_code, amount)
|
79
|
-
|
80
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
81
|
-
Transbank::Common::Validation.has_text_with_max_length(buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "buy_order")
|
82
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
83
|
-
|
84
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
85
|
-
@environment, format(INCREASE_AMOUNT_ENDPOINT, token: token), @commerce_code, @api_key
|
86
|
-
)
|
87
|
-
request_service.put(commerce_code: @commerce_code, buy_order: buy_order, authorization_code: authorization_code, amount: amount)
|
88
|
-
end
|
89
|
-
|
90
|
-
def increase_authorization_date(token, buy_order, authorization_code)
|
91
|
-
|
92
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
93
|
-
Transbank::Common::Validation.has_text_with_max_length(buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "buy_order")
|
94
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
95
|
-
|
96
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
97
|
-
@environment, format(INCREASE_AUTHORIZATION_DATE_ENDPOINT, token: token), @commerce_code, @api_key
|
98
|
-
)
|
99
|
-
request_service.put(commerce_code: @commerce_code, buy_order: buy_order, authorization_code: authorization_code)
|
100
72
|
end
|
101
|
-
|
102
|
-
def reverse_pre_authorized_amount(token, buy_order, authorization_code, amount)
|
103
|
-
|
104
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
105
|
-
Transbank::Common::Validation.has_text_with_max_length(buy_order, Transbank::Common::ApiConstants::BUY_ORDER_LENGTH, "buy_order")
|
106
|
-
Transbank::Common::Validation.has_text_with_max_length(authorization_code, Transbank::Common::ApiConstants::AUTHORIZATION_CODE_LENGTH, "authorization_code")
|
107
|
-
|
108
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
109
|
-
@environment, format(REVERSE_PRE_AUTHORIZED_AMOUNT_ENDPOINT, token: token), @commerce_code, @api_key
|
110
|
-
)
|
111
|
-
request_service.put(commerce_code: @commerce_code, buy_order: buy_order, authorization_code: authorization_code, amount: amount)
|
112
|
-
end
|
113
|
-
|
114
|
-
def deferred_capture_history(token)
|
115
|
-
|
116
|
-
Transbank::Common::Validation.has_text_with_max_length(token, Transbank::Common::ApiConstants::TOKEN_LENGTH, "token")
|
117
|
-
|
118
|
-
request_service = ::Transbank::Shared::RequestService.new(
|
119
|
-
@environment, format(DEFERRED_CAPTURE_HISTORY_ENDPOINT, token: token), @commerce_code, @api_key
|
120
|
-
)
|
121
|
-
request_service.get
|
122
|
-
end
|
123
|
-
|
124
73
|
end
|
125
74
|
end
|
126
75
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transbank-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Transbank Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -160,19 +160,16 @@ files:
|
|
160
160
|
- ".built"
|
161
161
|
- ".bundled"
|
162
162
|
- ".github/ISSUE_TEMPLATE/reporte-de-error.md"
|
163
|
+
- ".github/workflows/publish-lib.yml"
|
163
164
|
- ".gitignore"
|
164
165
|
- ".rakeTasks"
|
165
|
-
- ".travis.yml"
|
166
166
|
- CHANGELOG.md
|
167
|
-
- Dockerfile
|
168
167
|
- Gemfile
|
169
168
|
- LICENSE.md
|
170
|
-
- Makefile
|
171
169
|
- README.md
|
172
170
|
- Rakefile
|
173
171
|
- bin/console
|
174
172
|
- bin/setup
|
175
|
-
- docker-compose.yml
|
176
173
|
- lib/transbank/sdk.rb
|
177
174
|
- lib/transbank/sdk/common/api_constants.rb
|
178
175
|
- lib/transbank/sdk/common/base_transaction.rb
|
@@ -191,7 +188,6 @@ files:
|
|
191
188
|
- lib/transbank/sdk/webpay/webpay_plus/mall_transaction.rb
|
192
189
|
- lib/transbank/sdk/webpay/webpay_plus/transaction.rb
|
193
190
|
- lib/transbank/sdk/webpay/webpay_plus_modal/transaction.rb
|
194
|
-
- sdk_test.sh
|
195
191
|
- transbank-sdk.gemspec
|
196
192
|
homepage: https://www.transbankdevelopers.cl/
|
197
193
|
licenses:
|
@@ -212,7 +208,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
208
|
- !ruby/object:Gem::Version
|
213
209
|
version: '0'
|
214
210
|
requirements: []
|
215
|
-
|
211
|
+
rubyforge_project:
|
212
|
+
rubygems_version: 2.6.14.4
|
216
213
|
signing_key:
|
217
214
|
specification_version: 4
|
218
215
|
summary: Transbank SDK for Ruby
|
data/.travis.yml
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
deploy:
|
2
|
-
provider: rubygems
|
3
|
-
api_key:
|
4
|
-
secure: Y3z7qW8UhuDi0AqMr9T6ti46w3jLuLDRLuHUBTff80lYAZhBwCNj7U9UvlgELTiOC/nLREtboGW5ZUf3XIIiRr2oIqCSSWYVR6OCuPGTHS/hvGBi0T5jEL30/YuIEbIuz3xkXqN15WlOouKVgfPsNcL8mfLZBZMHQ9QwB6P0E2rg2GZj1QVqAUjnn/JGet0d2EJb48YyndN4nGVhaXXUQhcyyy1+XWEkC3nCo6v1dwE5pS8QK4kcRevRvL9G8mebxX74IuIbgW2bXBHPLNUbuUOHuNNUrrNIJDFUf8xXouLDT5QN4CsoldcgSIGuBvcJlmoubQFfju4iuGt/xnL8BtsKDy3iZ+xnIji6h7MGNAOpiZ7e2LavGvO5luYVEpuv2iG9V/FpJY5DJcBZ8779LnA97NAV7bz383tjihCfR9kzUh5rs2To42FV0IQj0btWuGesVmPefWjwV/EzjmbN0+PhNmxDwQAJS49cHycZKTeestaR4MgHigXZ2CGRAJSKYr3Tj7/r8KZW6MGY6KgXiwjpu+d3+UidAwI1viiRrCGuWBALkAAaxGR0H8qamMsJr/DQtjAgXDITRlAScpWzicgvEEHyXTos45EIrsJZV72O/jj8Zvbw83rEMv8It3yCS43deLsyw+5a4i9y9HFKuGQPa8w7yR1xEOnh6G3AiWY=
|
5
|
-
gem: transbank-sdk
|
6
|
-
on:
|
7
|
-
tags: true
|
8
|
-
repo: TransbankDevelopers/transbank-sdk-ruby
|
9
|
-
rvm:
|
10
|
-
- 2.4.1
|
data/Dockerfile
DELETED
data/Makefile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
SHELL := /bin/bash
|
2
|
-
|
3
|
-
all: build run
|
4
|
-
|
5
|
-
run: build
|
6
|
-
docker-compose run --rm web
|
7
|
-
|
8
|
-
build: .built .bundled
|
9
|
-
|
10
|
-
.built: Dockerfile
|
11
|
-
docker-compose build
|
12
|
-
touch .built
|
13
|
-
|
14
|
-
.bundled: Gemfile
|
15
|
-
docker-compose run web bundle install
|
16
|
-
touch .bundled
|
17
|
-
|
18
|
-
logs:
|
19
|
-
docker-compose logs
|
20
|
-
|
21
|
-
clean:
|
22
|
-
docker-compose rm
|
23
|
-
rm .built
|
24
|
-
rm .bundled
|
data/docker-compose.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
version: '2'
|
2
|
-
services:
|
3
|
-
web: &web
|
4
|
-
tty: true
|
5
|
-
stdin_open: true
|
6
|
-
build:
|
7
|
-
context: .
|
8
|
-
dockerfile: Dockerfile
|
9
|
-
command: rake test
|
10
|
-
volumes:
|
11
|
-
- .:/sdk
|
12
|
-
volumes_from:
|
13
|
-
- bundle_cache
|
14
|
-
ports:
|
15
|
-
- "8000:8000"
|
16
|
-
|
17
|
-
bundle_cache:
|
18
|
-
image: ruby:2.4-jessie # Should be the same as the app Dockerfile.dev base image
|
19
|
-
volumes:
|
20
|
-
- /usr/local/bundle
|
data/sdk_test.sh
DELETED