-
-
Save havenwood/f909568b77c8b4a6e90e48433f82bcd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'uri' | |
require 'json' | |
uri = URI('https://eoftqqzi7ii7mmn.m.pipedream.net') | |
request = Net::HTTP::Post.new(uri) | |
request.content_type = 'application/json' | |
json = { | |
card_cvc: 'tok_sandbox_sXTRFEQqsidYhF6uwW1w9r', | |
card_exp: '10/25', | |
card_number: 'tok_sandbox_uQPorT8AJ5g4e3727Q93bm' | |
}.to_json | |
request.body = json | |
response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http| | |
http.request(request) | |
end | |
pp response.body |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment