Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6117719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:21:10+00:00 2026-05-23T15:21:10+00:00

So I am trying to get transaction detail from paypal without creating a form

  • 0

So I am trying to get transaction detail from paypal without creating a form and just by sending a post to the url with the necessary information. This is a snippet of my code and I have tried doing the same through form and it works.

<form method=post action="https://www.sandbox.paypal.com/cgi-bin/webscr">
      <input type="hidden" name="cmd" value="_notify-synch">
      <input type="hidden" name="tx" value="<%= subscription.tx %>">
      <input type="hidden" name="at" value="<%= @identity_token %>">
      <input type="submit" value="View Details">
    </form>

The Ruby counterpart throws a EOFError and I don’t know why it’s doing it

paypal_uri = URI.parse('https://www.sandbox.paypal.com/cgi-bin/webscr')
@post_request = Net::HTTP.post_form(paypal_uri , {:tx => @subscription.tx, :at => IDENTITY_TOKEN, :cmd => "_notify-sync"})
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:21:11+00:00Added an answer on May 23, 2026 at 3:21 pm

    The URL is https, so you need to enable SSL on your Net::HTTP.

    require 'openssl'
    
    paypal_uri = URI.parse('https://www.sandbox.paypal.com/cgi-bin/webscr')
    req = Net::HTTP::Post.new(paypal_uri.path)
    req.set_form_data({:tx => @subscription.tx, :at => IDENTITY_TOKEN, :cmd => "_notify-sync"})
    sock = Net::HTTP.new(paypal_uri.host, 443)
    sock.use_ssl = true
    store = OpenSSL::X509::Store.new
    store.add_cert OpenSSL::X509::Certificate.new(File.new('paypal.pem'))
    store.add_cert OpenSSL::X509::Certificate.new(File.new('paypal2.pem'))
    sock.cert_store = store
    sock.start do |http|
      response = http.request(req)
    end
    

    To get the CA certificates paypal.pem and paypal2.pem, simply browse to the PayPal URL manually, I’ll describe it for FireFox. Click on the green icon on the left of your address bar, open the dialog, view certificate, Details, then export the two VeriSign certificates as paypal.pem and paypal2.pem. Put them into the same folder than your script. That should cure your problems!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to get this example working from http://www.munna.shatkotha.com/blog/post/2008/10/26/Light-box-effect-with-WPF.aspx However, I can't seem to get
I am trying to get some detailed performance information from an application my company
I am trying to get the value from transaction function. Example: $response = transaction(12346675);
I am trying to get the transaction info of paypal transaction that is passed
I'm trying to get JDBC transaction rollback when using Spring-test without success. When I
Gday All, I am trying to get the details of the first ever transaction
I'm trying get values from a GridView using the following code: foreach (GridViewRow row
Trying to get parameters from a PUT request using HttpServlet#doPut: public void doPut(HttpServletRequest request,
Just trying to get some opinions on whether or not CommandHandlers can/should communicate with
I am trying to get shipping quotes from FedEx. I found this library where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.