[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: http_url_post_raw and paypal nvp



> From: Jürgen Seifert

> If i post the url direct in a webbrowser, i get the correct data:
>
> https://api-3t.paypal.com/nvp?USER=BENUTZER&PWD=PASSWORT&SIGNATURE=SIGNATUR&METHOD=GetTransactionDetails&Version=71.0&transactionID=TRANSAKTION
>
>
> but  if  i  use http_url_post_raw, the server gives an answer with an error, as if i do not send the corrent request.

If you are putting the https URL in your browser address bar and pressing enter, then you are using GET not POST.  To match that in HTTPAPI, use GET instead of POST there as well.

I'm not familiar with Paypal API and didn't carefully look at your program, but it seems odd to me that Paypal would encourage the use of a password in a GET request.  That is not encrypted.  POST seems more likely as an expected method...

So I guess all I'm saying is if I understood your question correctly, you're not doing the same thing in HTTPAPI as you are in the browser.

Having said all that, I glanced back at your program.  I think the problem may relate to the formatting of your "data" variable.  POST data would (in my limited understanding) expect the "?" which separates the variables from the URI in a GET request.  The "&" may also be inappropriate, but others who have really done this would know better than I (especially after only 1 cup of coffee...)
--
Sean Porterfield

This email is confidential, intended only for the named recipient(s) above and may contain information that is privileged.  If you have received this message in error or are not the named recipient(s), please notify the sender immediately and delete this email message from your computer as any and all unauthorized distribution or use of this message is strictly prohibited.  Thank you.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------