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"})
The URL is https, so you need to enable SSL on your Net::HTTP.
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!