Skip to content

Commit ed6690e

Browse files
author
Tim Martinak
committed
Properly return Order create as JSON
1 parent 74282ac commit ed6690e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

advanced-integration/v2/server/ruby/server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
),
5555
'prefer' => 'return=representation'
5656
})
57-
order_response.data.to_json
57+
json order_response.data
5858
end
5959

6060
# Capture payment for the created order to complete the transaction.
@@ -65,6 +65,6 @@
6565
'id' => order_id,
6666
'prefer' => 'return=representation'
6767
})
68-
capture_response.data.to_json
68+
json capture_response.data
6969
rescue ErrorException => e
7070
end

standard-integration/server/ruby/server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
),
5555
'prefer' => 'return=representation'
5656
})
57-
order_response.data.to_json
57+
json order_response.data
5858
end
5959

6060
# Capture payment for the created order to complete the transaction.
@@ -65,6 +65,6 @@
6565
'id' => order_id,
6666
'prefer' => 'return=representation'
6767
})
68-
capture_response.data.to_json
68+
json capture_response.data
6969
rescue ErrorException => e
7070
end

0 commit comments

Comments
 (0)