Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby Example for Verification #5

Closed
sushant12 opened this issue Feb 9, 2018 · 0 comments
Closed

Ruby Example for Verification #5

sushant12 opened this issue Feb 9, 2018 · 0 comments
Assignees

Comments

@sushant12
Copy link

Hi guys,

If you guys are planning on to add a ruby example code, here it is:

headers = {
  Authorization: 'Key test_secret_key_f59e8b7d18b4499ca40f68195a846e9b'
 }
uri = URI.parse('https://khalti.com/api/payment/verify/')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri, headers)
request.set_form_data('token' => params[:token], 'amount' => params[:amount])
response = https.request(request)
@poudel poudel self-assigned this Mar 5, 2018
@poudel poudel closed this as completed in 3db13a3 Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants