khipu-api-client 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -14
- data/lib/khipu-api-client/api/payments_api.rb +5 -5
- data/lib/khipu-api-client/models/payment_response.rb +1 -1
- data/lib/khipu-api-client/version.rb +1 -1
- metadata +40 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec66993a9c92a9a0c64fbd5b76e4a76ba06aeb20
|
4
|
+
data.tar.gz: 5305d735cbc1b9cbd5df5bf28298bb0eb8801d5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7ee8fb890586e0f2fde60bfab00e604ddb1c6c37e7f843041d5a5cd06903651819c3621a212e334625b8b6f2087f4f77961c24c147369eb49148aaa12c4efcb
|
7
|
+
data.tar.gz: 7dded017e164a57f56d920a25c2926957b8c20e89b91839ad79b65057495b66e2cb0ecc1bf973f82cd21ad9f2178cda00faa4fd74bda02f61fc41610764dfd1d
|
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
## Installation
|
2
2
|
|
3
|
-
```
|
3
|
+
```
|
4
4
|
gem install khipu-api-client
|
5
5
|
```
|
6
6
|
|
7
7
|
## Usage
|
8
8
|
|
9
9
|
### Basic configuration
|
10
|
-
```
|
10
|
+
```
|
11
11
|
require 'khipu-api-client'
|
12
12
|
|
13
13
|
Khipu.configure do |c|
|
@@ -19,18 +19,18 @@ end
|
|
19
19
|
### Basic usage
|
20
20
|
|
21
21
|
#### Create a new payment
|
22
|
-
```
|
22
|
+
```
|
23
23
|
api = Khipu::PaymentsApi.new()
|
24
24
|
options = {
|
25
25
|
expires_date: 1.day.from_now.to_datetime, # DateTime.new(2016,1,1)
|
26
|
-
send_email: true,
|
26
|
+
send_email: true,
|
27
27
|
payer_name: "payer",
|
28
28
|
payer_email: "payer@mail.com"
|
29
29
|
}
|
30
30
|
response = api.payments_post("Test de api nueva", "CLP", 1, options)
|
31
31
|
|
32
32
|
print response
|
33
|
-
# response keys:
|
33
|
+
# response keys:
|
34
34
|
# [:payment_id, :payment_url, :simplified_transfer_url, :transfer_url, :app_url]
|
35
35
|
|
36
36
|
```
|
@@ -54,7 +54,7 @@ print status
|
|
54
54
|
|
55
55
|
|
56
56
|
#### Confirm a payment
|
57
|
-
If you send a notification_url when creating the payment or if you have set it up on your account configuration, Khipu will sent you a request with a notification_token and a api_version. You can use the notification_token param to get the payment information from the khipu service.
|
57
|
+
If you send a notification_url when creating the payment or if you have set it up on your account configuration, Khipu will sent you a request with a notification_token and a api_version. You can use the notification_token param to get the payment information from the khipu service.
|
58
58
|
|
59
59
|
```
|
60
60
|
notification_token = params["notification_token"]
|
@@ -68,14 +68,14 @@ if response.status == 'done'
|
|
68
68
|
end
|
69
69
|
|
70
70
|
print response
|
71
|
-
# response keys:
|
71
|
+
# response keys:
|
72
72
|
# [
|
73
|
-
# :payment_id, :payment_url, :simplified_transfer_url, :transfer_url,
|
74
|
-
# :app_url, :ready_for_terminal, :subject, :amount, :currency, :status,
|
75
|
-
# :status_detail, :body, :picture_url, :receipt_url, :return_url,
|
76
|
-
# :cancel_url, :notify_url, :notify_api_version, :expires_date,
|
77
|
-
# :attachment_urls, :bank, :bank_id, :payer_name, :payer_email,
|
78
|
-
# :personal_identifier, :bank_account_number, :out_of_date_conciliation,
|
73
|
+
# :payment_id, :payment_url, :simplified_transfer_url, :transfer_url,
|
74
|
+
# :app_url, :ready_for_terminal, :subject, :amount, :currency, :status,
|
75
|
+
# :status_detail, :body, :picture_url, :receipt_url, :return_url,
|
76
|
+
# :cancel_url, :notify_url, :notify_api_version, :expires_date,
|
77
|
+
# :attachment_urls, :bank, :bank_id, :payer_name, :payer_email,
|
78
|
+
# :personal_identifier, :bank_account_number, :out_of_date_conciliation,
|
79
79
|
# :transaction_id, :custom, :responsible_user_email, :send_reminders, :send_email
|
80
|
-
# ]
|
80
|
+
# ]
|
81
81
|
```
|
@@ -64,7 +64,7 @@ module Khipu
|
|
64
64
|
# Crea un pago en khipu y obtiene las URLs para redirección al usuario para que complete el pago.
|
65
65
|
# @param subject Motivo
|
66
66
|
# @param currency El código de moneda en formato ISO-4217
|
67
|
-
# @param amount El monto del cobro. Sin separador de miles y usando
|
67
|
+
# @param amount El monto del cobro. Sin separador de miles y usando '.' como separador de decimales. Hasta 4 lugares decimales, dependiendo de la moneda
|
68
68
|
# @param [Hash] opts the optional parameters
|
69
69
|
# @option opts [String] :transaction_id Identificador propio de la transacción. Ej: número de factura u orden de compra
|
70
70
|
# @option opts [String] :custom Parámetro para enviar información personalizada de la transacción. Ej: documento XML con el detalle del carro de compra
|
@@ -76,10 +76,10 @@ module Khipu
|
|
76
76
|
# @option opts [String] :notify_url La dirección del web-service que utilizará khipu para notificar cuando el pago esté conciliado
|
77
77
|
# @option opts [String] :notify_api_version Versión de la API de notifiaciones para recibir avisos por web-service
|
78
78
|
# @option opts [DateTime] :expires_date Fecha de expiración del cobro. Pasada esta fecha el cobro es inválido. Formato ISO-8601. Ej: 2017-03-01T13:00:00Z
|
79
|
-
# @option opts [BOOLEAN] :send_email Si es
|
80
|
-
# @option opts [String] :payer_name Nombre del pagador. Es obligatorio cuando send_email es
|
81
|
-
# @option opts [String] :payer_email Correo del pagador. Es obligatorio cuando send_email es
|
82
|
-
# @option opts [BOOLEAN] :send_reminders Si es
|
79
|
+
# @option opts [BOOLEAN] :send_email Si es 'true', se enviará una solicitud de cobro al correo especificado en 'payer_email'
|
80
|
+
# @option opts [String] :payer_name Nombre del pagador. Es obligatorio cuando send_email es 'true'
|
81
|
+
# @option opts [String] :payer_email Correo del pagador. Es obligatorio cuando send_email es 'true'
|
82
|
+
# @option opts [BOOLEAN] :send_reminders Si es 'true', se enviarán recordatorios de cobro.
|
83
83
|
# @option opts [String] :responsible_user_email Correo electrónico del responsable de este cobro, debe corresponder a un usuario khipu con permisos para cobrar usando esta cuenta de cobro
|
84
84
|
# @option opts [String] :fixed_payer_personal_identifier Identificador personal. Si se especifica, solo podrá ser pagado usando ese identificador
|
85
85
|
# @option opts [Float] :integrator_fee Comisión para el integrador. Sólo es válido si la cuenta de cobro tiene una cuenta de integrador asociada
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: khipu-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- khipu
|
@@ -14,180 +14,180 @@ dependencies:
|
|
14
14
|
name: typhoeus
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.2'
|
20
|
-
- -
|
20
|
+
- - '>='
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 0.2.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0.2'
|
30
|
-
- -
|
30
|
+
- - '>='
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 0.2.1
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: json
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- -
|
37
|
+
- - ~>
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '1.4'
|
40
|
-
- -
|
40
|
+
- - '>='
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: 1.4.6
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - ~>
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '1.4'
|
50
|
-
- -
|
50
|
+
- - '>='
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 1.4.6
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rspec
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- -
|
57
|
+
- - ~>
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '3.2'
|
60
|
-
- -
|
60
|
+
- - '>='
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 3.2.0
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '3.2'
|
70
|
-
- -
|
70
|
+
- - '>='
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: 3.2.0
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: vcr
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- -
|
77
|
+
- - ~>
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '2.9'
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 2.9.3
|
83
83
|
type: :development
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '2.9'
|
90
|
-
- -
|
90
|
+
- - '>='
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: 2.9.3
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: webmock
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- -
|
97
|
+
- - ~>
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '1.6'
|
100
|
-
- -
|
100
|
+
- - '>='
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: 1.6.2
|
103
103
|
type: :development
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ~>
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '1.6'
|
110
|
-
- -
|
110
|
+
- - '>='
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: 1.6.2
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: autotest
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- -
|
117
|
+
- - ~>
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '4.4'
|
120
|
-
- -
|
120
|
+
- - '>='
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: 4.4.6
|
123
123
|
type: :development
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- -
|
127
|
+
- - ~>
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '4.4'
|
130
|
-
- -
|
130
|
+
- - '>='
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: 4.4.6
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: autotest-rails-pure
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ~>
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '4.1'
|
140
|
-
- -
|
140
|
+
- - '>='
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: 4.1.2
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
145
|
version_requirements: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
|
-
- -
|
147
|
+
- - ~>
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: '4.1'
|
150
|
-
- -
|
150
|
+
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 4.1.2
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: autotest-growl
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ~>
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0.2'
|
160
|
-
- -
|
160
|
+
- - '>='
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: 0.2.16
|
163
163
|
type: :development
|
164
164
|
prerelease: false
|
165
165
|
version_requirements: !ruby/object:Gem::Requirement
|
166
166
|
requirements:
|
167
|
-
- -
|
167
|
+
- - ~>
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0.2'
|
170
|
-
- -
|
170
|
+
- - '>='
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: 0.2.16
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
174
|
name: autotest-fsevent
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
|
-
- -
|
177
|
+
- - ~>
|
178
178
|
- !ruby/object:Gem::Version
|
179
179
|
version: '0.2'
|
180
|
-
- -
|
180
|
+
- - '>='
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: 0.2.10
|
183
183
|
type: :development
|
184
184
|
prerelease: false
|
185
185
|
version_requirements: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
|
-
- -
|
187
|
+
- - ~>
|
188
188
|
- !ruby/object:Gem::Version
|
189
189
|
version: '0.2'
|
190
|
-
- -
|
190
|
+
- - '>='
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: 0.2.10
|
193
193
|
description:
|
@@ -227,17 +227,17 @@ require_paths:
|
|
227
227
|
- lib
|
228
228
|
required_ruby_version: !ruby/object:Gem::Requirement
|
229
229
|
requirements:
|
230
|
-
- -
|
230
|
+
- - '>='
|
231
231
|
- !ruby/object:Gem::Version
|
232
232
|
version: '0'
|
233
233
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
234
234
|
requirements:
|
235
|
-
- -
|
235
|
+
- - '>='
|
236
236
|
- !ruby/object:Gem::Version
|
237
237
|
version: '0'
|
238
238
|
requirements: []
|
239
239
|
rubyforge_project:
|
240
|
-
rubygems_version: 2.
|
240
|
+
rubygems_version: 2.0.14
|
241
241
|
signing_key:
|
242
242
|
specification_version: 4
|
243
243
|
summary: A ruby wrapper for the khipu APIs
|