veritrans 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -0
  3. data/.idea/.gitignore +8 -0
  4. data/.rubocop.yml +1 -1
  5. data/.travis.yml +2 -1
  6. data/CHANGELOG.md +13 -0
  7. data/Gemfile +2 -11
  8. data/Gemfile.lock +116 -145
  9. data/Maintaining.MD +8 -0
  10. data/README.md +247 -278
  11. data/api_reference.md +482 -173
  12. data/example/coreapi/core_api_credit_card_example.rb +66 -0
  13. data/example/coreapi/readme.md +4 -0
  14. data/example/sinatra/Gemfile +7 -0
  15. data/example/sinatra/README.md +4 -6
  16. data/example/sinatra/index.erb +180 -192
  17. data/example/sinatra/response.erb +1 -40
  18. data/example/sinatra/snap.erb +33 -0
  19. data/example/sinatra/snap_redirect.erb +10 -0
  20. data/example/sinatra/webapp.rb +113 -0
  21. data/example/snap/readme.md +4 -0
  22. data/example/snap/snap_example.rb +39 -0
  23. data/lib/test/all.rb +1 -0
  24. data/lib/test/api_test.rb +319 -0
  25. data/lib/test/config_test.rb +26 -0
  26. data/lib/test/gopay_tokenization_test.rb +80 -0
  27. data/lib/test/snap_test.rb +79 -0
  28. data/lib/test/subscription_test.rb +116 -0
  29. data/lib/test/transaction_test.rb +160 -0
  30. data/lib/veritrans/api.rb +105 -8
  31. data/lib/veritrans/client.rb +40 -7
  32. data/lib/veritrans/config.rb +26 -3
  33. data/lib/veritrans/midtrans_error.rb +15 -0
  34. data/lib/veritrans/version.rb +1 -1
  35. data/lib/veritrans.rb +5 -6
  36. data/veritrans.gemspec +1 -2
  37. metadata +25 -248
  38. data/.rspec +0 -2
  39. data/Procfile +0 -1
  40. data/Rakefile +0 -16
  41. data/bin/midtrans +0 -3
  42. data/bin/veritrans +0 -68
  43. data/example/rails/cable/Gemfile +0 -48
  44. data/example/rails/cable/Gemfile.lock +0 -184
  45. data/example/rails/cable/README.md +0 -29
  46. data/example/rails/cable/Rakefile +0 -6
  47. data/example/rails/cable/app/assets/config/manifest.js +0 -3
  48. data/example/rails/cable/app/assets/images/.keep +0 -0
  49. data/example/rails/cable/app/assets/javascripts/application.js +0 -15
  50. data/example/rails/cable/app/assets/javascripts/cable.js +0 -13
  51. data/example/rails/cable/app/assets/javascripts/channels/.keep +0 -0
  52. data/example/rails/cable/app/assets/javascripts/chats.js +0 -39
  53. data/example/rails/cable/app/assets/javascripts/rooms.js +0 -55
  54. data/example/rails/cable/app/assets/stylesheets/application.css +0 -16
  55. data/example/rails/cable/app/assets/stylesheets/chatbox.scss +0 -31
  56. data/example/rails/cable/app/assets/stylesheets/peoplebox.scss +0 -6
  57. data/example/rails/cable/app/channels/application_cable/channel.rb +0 -4
  58. data/example/rails/cable/app/channels/application_cable/connection.rb +0 -4
  59. data/example/rails/cable/app/channels/rooms_texting_channel.rb +0 -13
  60. data/example/rails/cable/app/controllers/application_controller.rb +0 -3
  61. data/example/rails/cable/app/controllers/chats_controller.rb +0 -18
  62. data/example/rails/cable/app/controllers/concerns/.keep +0 -0
  63. data/example/rails/cable/app/controllers/pays_controller.rb +0 -28
  64. data/example/rails/cable/app/controllers/rooms_controller.rb +0 -4
  65. data/example/rails/cable/app/helpers/application_helper.rb +0 -2
  66. data/example/rails/cable/app/helpers/chats_helper.rb +0 -2
  67. data/example/rails/cable/app/helpers/rooms_helper.rb +0 -5
  68. data/example/rails/cable/app/jobs/application_job.rb +0 -2
  69. data/example/rails/cable/app/jobs/chat_broadcaster_job.rb +0 -15
  70. data/example/rails/cable/app/mailers/application_mailer.rb +0 -4
  71. data/example/rails/cable/app/models/application_record.rb +0 -3
  72. data/example/rails/cable/app/models/chat.rb +0 -41
  73. data/example/rails/cable/app/models/concerns/.keep +0 -0
  74. data/example/rails/cable/app/models/order.rb +0 -2
  75. data/example/rails/cable/app/models/user.rb +0 -2
  76. data/example/rails/cable/app/views/chats/_chat.html.erb +0 -18
  77. data/example/rails/cable/app/views/layouts/application.html.erb +0 -19
  78. data/example/rails/cable/app/views/layouts/mailer.html.erb +0 -13
  79. data/example/rails/cable/app/views/layouts/mailer.text.erb +0 -1
  80. data/example/rails/cable/app/views/rooms/_chatbox.html.erb +0 -13
  81. data/example/rails/cable/app/views/rooms/_online_people.html.erb +0 -53
  82. data/example/rails/cable/app/views/rooms/index.html.erb +0 -9
  83. data/example/rails/cable/bin/bundle +0 -3
  84. data/example/rails/cable/bin/rails +0 -9
  85. data/example/rails/cable/bin/rake +0 -9
  86. data/example/rails/cable/bin/setup +0 -34
  87. data/example/rails/cable/bin/spring +0 -16
  88. data/example/rails/cable/bin/update +0 -29
  89. data/example/rails/cable/config/application.rb +0 -16
  90. data/example/rails/cable/config/boot.rb +0 -3
  91. data/example/rails/cable/config/cable.yml +0 -9
  92. data/example/rails/cable/config/database.yml +0 -20
  93. data/example/rails/cable/config/environment.rb +0 -5
  94. data/example/rails/cable/config/environments/development.rb +0 -57
  95. data/example/rails/cable/config/environments/production.rb +0 -86
  96. data/example/rails/cable/config/environments/test.rb +0 -42
  97. data/example/rails/cable/config/initializers/application_controller_renderer.rb +0 -6
  98. data/example/rails/cable/config/initializers/assets.rb +0 -11
  99. data/example/rails/cable/config/initializers/backtrace_silencers.rb +0 -7
  100. data/example/rails/cable/config/initializers/cookies_serializer.rb +0 -5
  101. data/example/rails/cable/config/initializers/filter_parameter_logging.rb +0 -4
  102. data/example/rails/cable/config/initializers/inflections.rb +0 -16
  103. data/example/rails/cable/config/initializers/mime_types.rb +0 -4
  104. data/example/rails/cable/config/initializers/new_framework_defaults.rb +0 -24
  105. data/example/rails/cable/config/initializers/session_store.rb +0 -3
  106. data/example/rails/cable/config/initializers/sidekiq.rb +0 -2
  107. data/example/rails/cable/config/initializers/veritrans.rb +0 -46
  108. data/example/rails/cable/config/initializers/wrap_parameters.rb +0 -14
  109. data/example/rails/cable/config/locales/en.yml +0 -23
  110. data/example/rails/cable/config/puma.rb +0 -47
  111. data/example/rails/cable/config/routes.rb +0 -18
  112. data/example/rails/cable/config/secrets.yml +0 -22
  113. data/example/rails/cable/config/spring.rb +0 -6
  114. data/example/rails/cable/config/veritrans.yml +0 -13
  115. data/example/rails/cable/config.ru +0 -5
  116. data/example/rails/cable/db/development.sqlite3 +0 -0
  117. data/example/rails/cable/db/migrate/20161215070044_create_chats.rb +0 -10
  118. data/example/rails/cable/db/migrate/20161215072021_create_users.rb +0 -10
  119. data/example/rails/cable/db/migrate/20161219110219_create_orders.rb +0 -11
  120. data/example/rails/cable/db/schema.rb +0 -37
  121. data/example/rails/cable/db/seeds.rb +0 -41
  122. data/example/rails/cable/db/test.sqlite3 +0 -0
  123. data/example/rails/cable/lib/assets/.keep +0 -0
  124. data/example/rails/cable/lib/tasks/.keep +0 -0
  125. data/example/rails/cable/log/.keep +0 -0
  126. data/example/rails/cable/public/404.html +0 -67
  127. data/example/rails/cable/public/422.html +0 -67
  128. data/example/rails/cable/public/500.html +0 -66
  129. data/example/rails/cable/public/apple-touch-icon-precomposed.png +0 -0
  130. data/example/rails/cable/public/apple-touch-icon.png +0 -0
  131. data/example/rails/cable/public/favicon.ico +0 -0
  132. data/example/rails/cable/public/images/avatar1.jpg +0 -0
  133. data/example/rails/cable/public/images/avatar2.jpg +0 -0
  134. data/example/rails/cable/public/images/avatar3.jpg +0 -0
  135. data/example/rails/cable/public/images/avatar4.jpg +0 -0
  136. data/example/rails/cable/public/images/avatar5.jpg +0 -0
  137. data/example/rails/cable/public/images/avatar6.jpg +0 -0
  138. data/example/rails/cable/public/robots.txt +0 -5
  139. data/example/rails/cable/vendor/assets/javascripts/.keep +0 -0
  140. data/example/rails/cable/vendor/assets/stylesheets/.keep +0 -0
  141. data/example/rails/cable/vendor/assets/stylesheets/photon.css +0 -2333
  142. data/example/rails/simplepay/Gemfile +0 -54
  143. data/example/rails/simplepay/Gemfile.lock +0 -178
  144. data/example/rails/simplepay/README.md +0 -30
  145. data/example/rails/simplepay/Rakefile +0 -6
  146. data/example/rails/simplepay/app/assets/config/manifest.js +0 -3
  147. data/example/rails/simplepay/app/assets/images/.keep +0 -0
  148. data/example/rails/simplepay/app/assets/javascripts/application.js +0 -16
  149. data/example/rails/simplepay/app/assets/javascripts/cable.js +0 -13
  150. data/example/rails/simplepay/app/assets/javascripts/channels/.keep +0 -0
  151. data/example/rails/simplepay/app/assets/javascripts/pay.js +0 -18
  152. data/example/rails/simplepay/app/assets/stylesheets/application.css +0 -15
  153. data/example/rails/simplepay/app/assets/stylesheets/style.css +0 -254
  154. data/example/rails/simplepay/app/channels/application_cable/channel.rb +0 -4
  155. data/example/rails/simplepay/app/channels/application_cable/connection.rb +0 -4
  156. data/example/rails/simplepay/app/controllers/application_controller.rb +0 -3
  157. data/example/rails/simplepay/app/controllers/concerns/.keep +0 -0
  158. data/example/rails/simplepay/app/controllers/home_controller.rb +0 -16
  159. data/example/rails/simplepay/app/controllers/pay_controller.rb +0 -10
  160. data/example/rails/simplepay/app/helpers/application_helper.rb +0 -2
  161. data/example/rails/simplepay/app/helpers/pay_helper.rb +0 -2
  162. data/example/rails/simplepay/app/jobs/application_job.rb +0 -2
  163. data/example/rails/simplepay/app/mailers/application_mailer.rb +0 -4
  164. data/example/rails/simplepay/app/models/application_record.rb +0 -3
  165. data/example/rails/simplepay/app/models/concerns/.keep +0 -0
  166. data/example/rails/simplepay/app/models/order.rb +0 -2
  167. data/example/rails/simplepay/app/views/home/index.html.erb +0 -19
  168. data/example/rails/simplepay/app/views/layouts/application.html.erb +0 -15
  169. data/example/rails/simplepay/app/views/layouts/mailer.html.erb +0 -13
  170. data/example/rails/simplepay/app/views/layouts/mailer.text.erb +0 -1
  171. data/example/rails/simplepay/app/views/pay/notify.html.erb +0 -2
  172. data/example/rails/simplepay/bin/bundle +0 -3
  173. data/example/rails/simplepay/bin/rails +0 -9
  174. data/example/rails/simplepay/bin/rake +0 -9
  175. data/example/rails/simplepay/bin/setup +0 -34
  176. data/example/rails/simplepay/bin/spring +0 -16
  177. data/example/rails/simplepay/bin/update +0 -29
  178. data/example/rails/simplepay/config/application.rb +0 -15
  179. data/example/rails/simplepay/config/boot.rb +0 -3
  180. data/example/rails/simplepay/config/cable.yml +0 -9
  181. data/example/rails/simplepay/config/database.yml +0 -25
  182. data/example/rails/simplepay/config/environment.rb +0 -5
  183. data/example/rails/simplepay/config/environments/development.rb +0 -57
  184. data/example/rails/simplepay/config/environments/production.rb +0 -86
  185. data/example/rails/simplepay/config/environments/test.rb +0 -42
  186. data/example/rails/simplepay/config/initializers/application_controller_renderer.rb +0 -6
  187. data/example/rails/simplepay/config/initializers/assets.rb +0 -11
  188. data/example/rails/simplepay/config/initializers/backtrace_silencers.rb +0 -7
  189. data/example/rails/simplepay/config/initializers/cookies_serializer.rb +0 -5
  190. data/example/rails/simplepay/config/initializers/filter_parameter_logging.rb +0 -4
  191. data/example/rails/simplepay/config/initializers/inflections.rb +0 -16
  192. data/example/rails/simplepay/config/initializers/mime_types.rb +0 -4
  193. data/example/rails/simplepay/config/initializers/new_framework_defaults.rb +0 -24
  194. data/example/rails/simplepay/config/initializers/session_store.rb +0 -3
  195. data/example/rails/simplepay/config/initializers/veritrans.rb +0 -46
  196. data/example/rails/simplepay/config/initializers/wrap_parameters.rb +0 -14
  197. data/example/rails/simplepay/config/locales/en.yml +0 -23
  198. data/example/rails/simplepay/config/puma.rb +0 -47
  199. data/example/rails/simplepay/config/routes.rb +0 -5
  200. data/example/rails/simplepay/config/secrets.yml +0 -22
  201. data/example/rails/simplepay/config/spring.rb +0 -6
  202. data/example/rails/simplepay/config/veritrans.yml +0 -18
  203. data/example/rails/simplepay/config.ru +0 -5
  204. data/example/rails/simplepay/db/development.sqlite3 +0 -0
  205. data/example/rails/simplepay/db/migrate/20161221090855_create_orders.rb +0 -10
  206. data/example/rails/simplepay/db/schema.rb +0 -22
  207. data/example/rails/simplepay/db/seeds.rb +0 -7
  208. data/example/rails/simplepay/db/test.sqlite3 +0 -0
  209. data/example/rails/simplepay/lib/assets/.keep +0 -0
  210. data/example/rails/simplepay/lib/tasks/.keep +0 -0
  211. data/example/rails/simplepay/log/.keep +0 -0
  212. data/example/rails/simplepay/public/404.html +0 -67
  213. data/example/rails/simplepay/public/422.html +0 -67
  214. data/example/rails/simplepay/public/500.html +0 -66
  215. data/example/rails/simplepay/public/apple-touch-icon-precomposed.png +0 -0
  216. data/example/rails/simplepay/public/apple-touch-icon.png +0 -0
  217. data/example/rails/simplepay/public/favicon.ico +0 -0
  218. data/example/rails/simplepay/public/robots.txt +0 -5
  219. data/example/rails/simplepay/vendor/assets/javascripts/.keep +0 -0
  220. data/example/rails/simplepay/vendor/assets/stylesheets/.keep +0 -0
  221. data/example/sinatra/config.ru +0 -9
  222. data/example/sinatra/localization.erb +0 -249
  223. data/example/sinatra/points.erb +0 -188
  224. data/example/sinatra/recurring.erb +0 -201
  225. data/example/sinatra/sinatra.rb +0 -194
  226. data/example/sinatra/style.css +0 -137
  227. data/example/sinatra/veritrans.yml +0 -11
  228. data/example/sinatra/widget.erb +0 -63
  229. data/lib/generators/templates/assets/credit_card_form.js +0 -57
  230. data/lib/generators/templates/payments_controller.rb +0 -85
  231. data/lib/generators/templates/veritrans.rb +0 -46
  232. data/lib/generators/templates/veritrans.yml +0 -18
  233. data/lib/generators/templates/views/_credit_card_form.erb +0 -42
  234. data/lib/generators/templates/views/_veritrans_include.erb +0 -10
  235. data/lib/generators/templates/views/payments/create.erb +0 -15
  236. data/lib/generators/templates/views/payments/new.erb +0 -6
  237. data/lib/generators/veritrans/install_generator.rb +0 -32
  238. data/lib/generators/veritrans/payment_form_generator.rb +0 -45
  239. data/lib/veritrans/cli.rb +0 -161
  240. data/lib/veritrans/testing.rb +0 -156
  241. data/spec/cli_spec.rb +0 -83
  242. data/spec/configs/real_key.yml +0 -4
  243. data/spec/configs/veritrans.yml +0 -7
  244. data/spec/configs/veritrans_flat.yml +0 -2
  245. data/spec/configs/veritrans_with_erb.yml +0 -2
  246. data/spec/fixtures/approve_failed.yml +0 -48
  247. data/spec/fixtures/cancel_failed.yml +0 -48
  248. data/spec/fixtures/cancel_success.yml +0 -126
  249. data/spec/fixtures/capture_failed.yml +0 -48
  250. data/spec/fixtures/charge.yml +0 -50
  251. data/spec/fixtures/charge_direct.yml +0 -56
  252. data/spec/fixtures/charge_vtweb.yml +0 -50
  253. data/spec/fixtures/cli_test_1111-not-exists.yml +0 -45
  254. data/spec/fixtures/cli_test_not_exists.yml +0 -45
  255. data/spec/fixtures/cli_test_real_txn.yml +0 -55
  256. data/spec/fixtures/cli_test_unauthorized.yml +0 -47
  257. data/spec/fixtures/deny_failed.yml +0 -144
  258. data/spec/fixtures/events_test_real_txn.yml +0 -55
  259. data/spec/fixtures/expire_failed.yml +0 -50
  260. data/spec/fixtures/expire_success.yml +0 -56
  261. data/spec/fixtures/midtrans_status.yml +0 -117
  262. data/spec/fixtures/refund_failed.yml +0 -54
  263. data/spec/fixtures/status_fail.yml +0 -48
  264. data/spec/fixtures/status_success.yml +0 -128
  265. data/spec/fixtures/test_token.yml +0 -49
  266. data/spec/midtrans_rename_spec.rb +0 -27
  267. data/spec/rails_plugin_spec.rb +0 -317
  268. data/spec/spec_helper.rb +0 -71
  269. data/spec/veritrans_client_spec.rb +0 -235
  270. data/spec/veritrans_config_spec.rb +0 -70
  271. data/spec/veritrans_events_spec.rb +0 -72
  272. data/spec/veritrans_logger_spec.rb +0 -46
  273. data/spec/veritrans_snap_spec.rb +0 -54
  274. data/spec/veritrans_testing_spec.rb +0 -184
  275. data/testing_webhooks.md +0 -78
@@ -1,50 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.sandbox.midtrans.com/v2/charge
6
- body:
7
- encoding: UTF-8
8
- string: '{"payment_type":"VTWEB","transaction_details":{"order_id":"2014-11-04
9
- 20:58:14 +0700","gross_amount":100000}}'
10
- headers:
11
- User-Agent:
12
- - excon/0.40.0
13
- Authorization:
14
- - Basic VlQtc2VydmVyLTlIdGItUnhYa2c3LTdoem5TQ0NqeHZvWTo=
15
- Accept:
16
- - application/json
17
- Content-Type:
18
- - application/json
19
- response:
20
- status:
21
- code: 200
22
- message: ''
23
- headers:
24
- Server:
25
- - nginx/1.5.13
26
- Date:
27
- - Tue, 04 Nov 2014 13:59:46 GMT
28
- Content-Type:
29
- - application/json
30
- Content-Length:
31
- - '217'
32
- Connection:
33
- - keep-alive
34
- Cache-Control:
35
- - no-cache
36
- Pragma:
37
- - no-cache
38
- Expires:
39
- - Wed, 31 Dec 1969 17:00:00 GMT
40
- body:
41
- encoding: UTF-8
42
- string: |-
43
- {
44
- "status_code" : "201",
45
- "status_message" : "OK, success do VTWeb transaction, please go to redirect_url",
46
- "redirect_url" : "https://vtweb.sandbox.midtrans.com/v2/vtweb/f523ecff-34e7-4791-a558-3f579f731b75"
47
- }
48
- http_version:
49
- recorded_at: Tue, 04 Nov 2014 13:58:15 GMT
50
- recorded_with: VCR 2.9.3
@@ -1,56 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.sandbox.midtrans.com/v2/charge
6
- body:
7
- encoding: UTF-8
8
- string: '{"payment_type":"permata","transaction_details":{"order_id":"2014-11-04
9
- 21:06:32 +0700","gross_amount":100000}}'
10
- headers:
11
- User-Agent:
12
- - Veritrans ruby gem 2.0.0beta
13
- Authorization:
14
- - Basic VlQtc2VydmVyLTlIdGItUnhYa2c3LTdoem5TQ0NqeHZvWTo=
15
- Accept:
16
- - application/json
17
- Content-Type:
18
- - application/json
19
- response:
20
- status:
21
- code: 200
22
- message: ''
23
- headers:
24
- Server:
25
- - nginx/1.5.13
26
- Date:
27
- - Tue, 04 Nov 2014 14:08:04 GMT
28
- Content-Type:
29
- - application/json
30
- Content-Length:
31
- - '396'
32
- Connection:
33
- - keep-alive
34
- Cache-Control:
35
- - no-cache
36
- Pragma:
37
- - no-cache
38
- Expires:
39
- - Wed, 31 Dec 1969 17:00:00 GMT
40
- body:
41
- encoding: UTF-8
42
- string: |-
43
- {
44
- "status_code" : "201",
45
- "status_message" : "Success, PERMATA VA transaction is successful",
46
- "transaction_id" : "3544730a-e5ca-46b6-9512-233c37670500",
47
- "order_id" : "2014-11-04 21:06:32 +0700",
48
- "payment_type" : "bank_transfer",
49
- "transaction_time" : "2014-11-04 21:08:23",
50
- "transaction_status" : "pending",
51
- "permata_va_number" : "8778990000000019",
52
- "gross_amount" : "100000.00"
53
- }
54
- http_version:
55
- recorded_at: Tue, 04 Nov 2014 14:06:33 GMT
56
- recorded_with: VCR 2.9.3
@@ -1,50 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.sandbox.midtrans.com/v2/charge
6
- body:
7
- encoding: UTF-8
8
- string: '{"payment_type":"vtweb","transaction_details":{"order_id":"2014-11-04
9
- 21:10:15 +0700","gross_amount":100000}}'
10
- headers:
11
- User-Agent:
12
- - Veritrans ruby gem 2.0.0beta
13
- Authorization:
14
- - Basic VlQtc2VydmVyLTlIdGItUnhYa2c3LTdoem5TQ0NqeHZvWTo=
15
- Accept:
16
- - application/json
17
- Content-Type:
18
- - application/json
19
- response:
20
- status:
21
- code: 200
22
- message: ''
23
- headers:
24
- Server:
25
- - nginx/1.5.13
26
- Date:
27
- - Tue, 04 Nov 2014 14:11:46 GMT
28
- Content-Type:
29
- - application/json
30
- Content-Length:
31
- - '217'
32
- Connection:
33
- - keep-alive
34
- Cache-Control:
35
- - no-cache
36
- Pragma:
37
- - no-cache
38
- Expires:
39
- - Wed, 31 Dec 1969 17:00:00 GMT
40
- body:
41
- encoding: UTF-8
42
- string: |-
43
- {
44
- "status_code" : "201",
45
- "status_message" : "OK, success do VTWeb transaction, please go to redirect_url",
46
- "redirect_url" : "https://vtweb.sandbox.midtrans.com/v2/vtweb/aff32361-ad6b-4e3f-9173-95b057e68157"
47
- }
48
- http_version:
49
- recorded_at: Tue, 04 Nov 2014 14:10:15 GMT
50
- recorded_with: VCR 2.9.3
@@ -1,45 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.sandbox.midtrans.com/v2/1111-not-exists/status
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Veritrans ruby gem 2.0.0beta
12
- Authorization:
13
- - Basic VlQtc2VydmVyLTlIdGItUnhYa2c3LTdoem5TQ0NqeHZvWTo=
14
- Accept:
15
- - application/json
16
- Content-Type:
17
- - application/json
18
- response:
19
- status:
20
- code: 200
21
- message: ''
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Mon, 01 Dec 2014 05:19:25 GMT
27
- Content-Type:
28
- - application/json
29
- Connection:
30
- - keep-alive
31
- Cache-Control:
32
- - no-cache
33
- Pragma:
34
- - no-cache
35
- Expires:
36
- - Wed, 31 Dec 1969 17:00:00 GMT
37
- Strict-Transport-Security:
38
- - max-age=31536000; includeSubdomains;
39
- body:
40
- encoding: US-ASCII
41
- string: ! "{\n \"status_code\" : \"404\",\n \"status_message\" : \"The requested
42
- resource is not found\"\n}"
43
- http_version:
44
- recorded_at: Mon, 01 Dec 2014 05:19:46 GMT
45
- recorded_with: VCR 2.9.3
@@ -1,45 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.sandbox.midtrans.com/v2/1111-not-exists/status
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Veritrans ruby gem 2.0.0beta
12
- Authorization:
13
- - Basic VlQtc2VydmVyLTlIdGItUnhYa2c3LTdoem5TQ0NqeHZvWTo=
14
- Accept:
15
- - application/json
16
- Content-Type:
17
- - application/json
18
- response:
19
- status:
20
- code: 200
21
- message: ''
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Mon, 01 Dec 2014 08:10:32 GMT
27
- Content-Type:
28
- - application/json
29
- Connection:
30
- - keep-alive
31
- Cache-Control:
32
- - no-cache
33
- Pragma:
34
- - no-cache
35
- Expires:
36
- - Wed, 31 Dec 1969 17:00:00 GMT
37
- Strict-Transport-Security:
38
- - max-age=31536000; includeSubdomains;
39
- body:
40
- encoding: US-ASCII
41
- string: ! "{\n \"status_code\" : \"404\",\n \"status_message\" : \"The requested
42
- resource is not found\"\n}"
43
- http_version:
44
- recorded_at: Mon, 01 Dec 2014 08:10:52 GMT
45
- recorded_with: VCR 2.9.3
@@ -1,55 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.sandbox.midtrans.com/v2/testing-0.2703-1415600236/status
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Veritrans ruby gem 2.0.0beta
12
- Authorization:
13
- - Basic VlQtc2VydmVyLTlIdGItUnhYa2c3LTdoem5TQ0NqeHZvWTo=
14
- Accept:
15
- - application/json
16
- Content-Type:
17
- - application/json
18
- response:
19
- status:
20
- code: 200
21
- message: ''
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Mon, 01 Dec 2014 08:23:11 GMT
27
- Content-Type:
28
- - application/json
29
- Content-Length:
30
- - '602'
31
- Connection:
32
- - keep-alive
33
- Cache-Control:
34
- - no-cache
35
- Pragma:
36
- - no-cache
37
- Expires:
38
- - Wed, 31 Dec 1969 17:00:00 GMT
39
- Vary:
40
- - Accept-Encoding, User-Agent
41
- Strict-Transport-Security:
42
- - max-age=31536000; includeSubdomains;
43
- body:
44
- encoding: US-ASCII
45
- string: ! "{\n \"status_code\" : \"200\",\n \"status_message\" : \"Success,
46
- transaction found\",\n \"transaction_id\" : \"b1cbcc66-5608-4af1-a3ed-0f152f9ed871\",\n
47
- \ \"masked_card\" : \"481111-1114\",\n \"order_id\" : \"testing-0.2703-1415600236\",\n
48
- \ \"payment_type\" : \"credit_card\",\n \"transaction_time\" : \"2014-11-10
49
- 13:17:33\",\n \"transaction_status\" : \"settlement\",\n \"fraud_status\"
50
- : \"accept\",\n \"approval_code\" : \"1415600254322\",\n \"signature_key\"
51
- : \"90da23d37a4ba8fc717990c35240948ab5a97cad71e46777de77b0fe468ffac8624dc09a80a422671f1f9a56f20956ccbe16c91074327c0ba5a33c8974c8973c\",\n
52
- \ \"bank\" : \"bni\",\n \"gross_amount\" : \"30000.00\"\n}"
53
- http_version:
54
- recorded_at: Mon, 01 Dec 2014 08:23:31 GMT
55
- recorded_with: VCR 2.9.3
@@ -1,47 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.sandbox.midtrans.com/v2/1111-not-exists/status
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Veritrans ruby gem 2.0.0beta
12
- Authorization:
13
- - Basic c3BlY19zZXJ2ZXJfa2V5Og==
14
- Accept:
15
- - application/json
16
- Content-Type:
17
- - application/json
18
- response:
19
- status:
20
- code: 200
21
- message: ''
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Mon, 01 Dec 2014 08:12:49 GMT
27
- Content-Type:
28
- - application/json
29
- Content-Length:
30
- - '132'
31
- Connection:
32
- - keep-alive
33
- Cache-Control:
34
- - no-cache
35
- Pragma:
36
- - no-cache
37
- Expires:
38
- - Wed, 31 Dec 1969 17:00:00 GMT
39
- Strict-Transport-Security:
40
- - max-age=31536000; includeSubdomains;
41
- body:
42
- encoding: US-ASCII
43
- string: ! "{\n \"status_code\" : \"401\",\n \"status_message\" : \"Access
44
- denied due to unauthorized transaction, please check client or server key\"\n}"
45
- http_version:
46
- recorded_at: Mon, 01 Dec 2014 08:13:09 GMT
47
- recorded_with: VCR 2.9.3
@@ -1,144 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.sandbox.midtrans.com/v2/token?card_cvv=123&card_exp_month=1&card_exp_year=2020&card_number=4811111111111114&client_key=VT-client-NArmatJZqzsmTmzR
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Veritrans ruby gem 2.3.0
12
- Authorization:
13
- - Basic VlQtc2VydmVyLTlIdGItUnhYa2c3LTdoem5TQ0NqeHZvWTo=
14
- Accept:
15
- - application/json
16
- Content-Type:
17
- - application/json
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Date:
24
- - Wed, 03 Apr 2019 19:45:47 GMT
25
- Content-Type:
26
- - application/json
27
- Content-Length:
28
- - '170'
29
- Connection:
30
- - keep-alive
31
- Pragma:
32
- - no-cache
33
- Cache-Control:
34
- - no-cache
35
- X-Kong-Upstream-Latency:
36
- - '71'
37
- X-Kong-Proxy-Latency:
38
- - '0'
39
- Via:
40
- - kong/0.14.0
41
- Strict-Transport-Security:
42
- - max-age=15724800; includeSubDomains;
43
- body:
44
- encoding: ASCII-8BIT
45
- string: '{"status_code":"200","status_message":"Credit card token is created
46
- as Token ID.","token_id":"481111-1114-af98ef7c-4d8e-4216-8027-d657bbaa3bf2","hash":"481111-1114-mami"}'
47
- http_version:
48
- recorded_at: Mon, 01 Apr 2019 00:00:00 GMT
49
- - request:
50
- method: post
51
- uri: https://api.sandbox.midtrans.com/v2/charge
52
- body:
53
- encoding: UTF-8
54
- string: '{"payment_type":"credit_card","credit_card":{"token_id":"481111-1114-af98ef7c-4d8e-4216-8027-d657bbaa3bf2"},"transaction_details":{"order_id":"1554076800","gross_amount":3000}}'
55
- headers:
56
- User-Agent:
57
- - Veritrans ruby gem 2.3.0
58
- Authorization:
59
- - Basic VlQtc2VydmVyLTlIdGItUnhYa2c3LTdoem5TQ0NqeHZvWTo=
60
- Accept:
61
- - application/json
62
- Content-Type:
63
- - application/json
64
- response:
65
- status:
66
- code: 200
67
- message: OK
68
- headers:
69
- Date:
70
- - Wed, 03 Apr 2019 19:45:48 GMT
71
- Content-Type:
72
- - application/json
73
- Content-Length:
74
- - '499'
75
- Connection:
76
- - keep-alive
77
- Vary:
78
- - Accept-Encoding
79
- Pragma:
80
- - no-cache
81
- Cache-Control:
82
- - no-cache
83
- X-Kong-Upstream-Latency:
84
- - '228'
85
- X-Kong-Proxy-Latency:
86
- - '1'
87
- Via:
88
- - kong/0.14.0
89
- Strict-Transport-Security:
90
- - max-age=15724800; includeSubDomains;
91
- body:
92
- encoding: ASCII-8BIT
93
- string: '{"status_code":"200","status_message":"Success, Credit Card transaction
94
- is successful","transaction_id":"af98ef7c-4d8e-4216-8027-d657bbaa3bf2","order_id":"1554076800","gross_amount":"3000.00","currency":"IDR","payment_type":"credit_card","transaction_time":"2019-04-04
95
- 02:45:47","transaction_status":"capture","fraud_status":"accept","approval_code":"1554320748048","masked_card":"481111-1114","bank":"mandiri","card_type":"credit","channel_response_code":"00","channel_response_message":"Approved"}'
96
- http_version:
97
- recorded_at: Mon, 01 Apr 2019 00:00:00 GMT
98
- - request:
99
- method: post
100
- uri: https://api.sandbox.midtrans.com/v2/1554076800/deny
101
- body:
102
- encoding: UTF-8
103
- string: "{}"
104
- headers:
105
- User-Agent:
106
- - Veritrans ruby gem 2.3.0
107
- Authorization:
108
- - Basic VlQtc2VydmVyLTlIdGItUnhYa2c3LTdoem5TQ0NqeHZvWTo=
109
- Accept:
110
- - application/json
111
- Content-Type:
112
- - application/json
113
- response:
114
- status:
115
- code: 200
116
- message: OK
117
- headers:
118
- Date:
119
- - Wed, 03 Apr 2019 19:45:48 GMT
120
- Content-Type:
121
- - application/json
122
- Content-Length:
123
- - '122'
124
- Connection:
125
- - keep-alive
126
- Pragma:
127
- - no-cache
128
- Cache-Control:
129
- - no-cache
130
- X-Kong-Upstream-Latency:
131
- - '24'
132
- X-Kong-Proxy-Latency:
133
- - '19'
134
- Via:
135
- - kong/0.14.0
136
- Strict-Transport-Security:
137
- - max-age=15724800; includeSubDomains;
138
- body:
139
- encoding: ASCII-8BIT
140
- string: '{"status_code":"412","status_message":"Transaction status cannot be
141
- updated.","id":"af98ef7c-4d8e-4216-8027-d657bbaa3bf2"}'
142
- http_version:
143
- recorded_at: Mon, 01 Apr 2019 00:00:00 GMT
144
- recorded_with: VCR 4.0.0
@@ -1,55 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.sandbox.midtrans.com/v2/testing-0.2703-1415600236/status
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Veritrans ruby gem 2.0.0beta
12
- Authorization:
13
- - Basic VlQtc2VydmVyLTlIdGItUnhYa2c3LTdoem5TQ0NqeHZvWTo=
14
- Accept:
15
- - application/json
16
- Content-Type:
17
- - application/json
18
- response:
19
- status:
20
- code: 200
21
- message: ''
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Mon, 01 Dec 2014 08:35:12 GMT
27
- Content-Type:
28
- - application/json
29
- Content-Length:
30
- - '602'
31
- Connection:
32
- - keep-alive
33
- Cache-Control:
34
- - no-cache
35
- Pragma:
36
- - no-cache
37
- Expires:
38
- - Wed, 31 Dec 1969 17:00:00 GMT
39
- Vary:
40
- - Accept-Encoding, User-Agent
41
- Strict-Transport-Security:
42
- - max-age=31536000; includeSubdomains;
43
- body:
44
- encoding: US-ASCII
45
- string: ! "{\n \"status_code\" : \"200\",\n \"status_message\" : \"Success,
46
- transaction found\",\n \"transaction_id\" : \"b1cbcc66-5608-4af1-a3ed-0f152f9ed871\",\n
47
- \ \"masked_card\" : \"481111-1114\",\n \"order_id\" : \"testing-0.2703-1415600236\",\n
48
- \ \"payment_type\" : \"credit_card\",\n \"transaction_time\" : \"2014-11-10
49
- 13:17:33\",\n \"transaction_status\" : \"settlement\",\n \"fraud_status\"
50
- : \"accept\",\n \"approval_code\" : \"1415600254322\",\n \"signature_key\"
51
- : \"90da23d37a4ba8fc717990c35240948ab5a97cad71e46777de77b0fe468ffac8624dc09a80a422671f1f9a56f20956ccbe16c91074327c0ba5a33c8974c8973c\",\n
52
- \ \"bank\" : \"bni\",\n \"gross_amount\" : \"30000.00\"\n}"
53
- http_version:
54
- recorded_at: Mon, 01 Dec 2014 08:35:32 GMT
55
- recorded_with: VCR 2.9.3
@@ -1,50 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.sandbox.midtrans.com/v2/not-exists/expire
6
- body:
7
- encoding: UTF-8
8
- string: "{}"
9
- headers:
10
- User-Agent:
11
- - Veritrans ruby gem 2.0.2
12
- Authorization:
13
- - Basic VlQtc2VydmVyLW9iQWdUTms0NW9jYUpWUGlGTXRRLXFmNjo=
14
- Accept:
15
- - application/json
16
- Content-Type:
17
- - application/json
18
- response:
19
- status:
20
- code: 200
21
- message: ''
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Fri, 19 Jun 2015 05:29:53 GMT
27
- Content-Type:
28
- - application/json
29
- Content-Length:
30
- - '87'
31
- Connection:
32
- - keep-alive
33
- Cache-Control:
34
- - no-cache
35
- Pragma:
36
- - no-cache
37
- Expires:
38
- - Wed, 31 Dec 1969 17:00:00 GMT
39
- Strict-Transport-Security:
40
- - max-age=31536000; includeSubdomains;
41
- body:
42
- encoding: UTF-8
43
- string: |-
44
- {
45
- "status_code" : "404",
46
- "status_message" : "The requested resource is not found"
47
- }
48
- http_version:
49
- recorded_at: Fri, 19 Jun 2015 05:23:02 GMT
50
- recorded_with: VCR 2.9.3
@@ -1,56 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.sandbox.midtrans.com/v2/af3fb136-c405-4103-9a36-5a6a9e2855a9/expire
6
- body:
7
- encoding: UTF-8
8
- string: 'null'
9
- headers:
10
- User-Agent:
11
- - Veritrans ruby gem 2.0.2
12
- Authorization:
13
- - Basic NjJiMTVhN2QtZTVmOC00YjNjLTllYWItY2E4MjdjYTM3ZjU1Og==
14
- Accept:
15
- - application/json
16
- Content-Type:
17
- - application/json
18
- response:
19
- status:
20
- code: 200
21
- message: ''
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Fri, 19 Jun 2015 06:21:11 GMT
27
- Content-Type:
28
- - application/json
29
- Content-Length:
30
- - '339'
31
- Connection:
32
- - keep-alive
33
- Cache-Control:
34
- - no-cache
35
- Pragma:
36
- - no-cache
37
- Expires:
38
- - Wed, 31 Dec 1969 17:00:00 GMT
39
- Strict-Transport-Security:
40
- - max-age=31536000; includeSubdomains;
41
- body:
42
- encoding: UTF-8
43
- string: |-
44
- {
45
- "status_code" : "407",
46
- "status_message" : "Success, transaction has expired",
47
- "transaction_id" : "af3fb136-c405-4103-9a36-5a6a9e2855a9",
48
- "order_id" : "e15dd6fa56-190615060748696",
49
- "payment_type" : "bank_transfer",
50
- "transaction_time" : "2015-06-19 13:09:05",
51
- "transaction_status" : "expire",
52
- "gross_amount" : "231231.00"
53
- }
54
- http_version:
55
- recorded_at: Fri, 19 Jun 2015 06:15:19 GMT
56
- recorded_with: VCR 2.9.3