Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Post cart data to paypal

by Anonymous Monk
on Jan 25, 2016 at 03:32 UTC ( [id://1153533]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Post cart data to paypal
by Anonymous Monk on Jan 25, 2016 at 03:42 UTC

    I would the user to submit the form data to PayPal directly without presenting the html form. Here's what I have:

    Is that legal?

    What paypal documentation explains what you need to do?

      This sounds fishy to me... why would you not want the end user knowing about the html form? what triggers this process? what is the desired outcome? for the user to pay you without knowing about it? xD

      sorry, just trying to understand... the why of it.

        The user will still be directed to the PayPal page, exactly as if he or she were submiting via an html form. On the PayPal the amount and item name are displayed and the user then proceed to make the payment. So, nothing fishy...

Re: Post cart data to paypal
by Old_Gray_Bear (Bishop) on Jan 26, 2016 at 00:28 UTC
    Um.... This suspiciously like a man-in-the-middle attack. What are you really trying to get: the ID/password, perhaps.

    With put a whole lot more explanation of why you want to do this you ain't gonna get help from me.

    ----
    I Go Back to Sleep, Now.

    OGB

Re: Post cart data to paypal
by thomas895 (Deacon) on Jan 26, 2016 at 01:54 UTC

    All you need to do is have your script output the form with the fields filled out properly, like

    <body onload="document.myform.submit()"> <form action="the paypal url" name="myform" method="post"> <input type="hidden" name="some paypal form key" value="the correspond +ing value"> <input type="submit" value="click here to continue">

    If the user has JavaScript enabled, they probably won't notice the redirect.

    Edit: It seems people are misunderstanding what I wrote. OP's problem, as I understood it, was that their script needs to add items to their user's PayPal cart. PayPal has a way of doing this, which involves putting a form on your webpage for the user to click on. Perhaps OP needs to look up the product ID or something, so just using the default form won't work. Here's what PayPal suggests you put on your page. Those hidden fields are already filled out. The only thing the user would see is the "Add to cart" button. My suggestion was to have OP's script fill out those fields as they should be anyways, and then to "click" the button for the user, to streamline the buying process.

    -Thomas
    "Excuse me for butting in, but I'm interrupt-driven..."
      Without a proper explanation as to why he even wants to attempt this, why would you give him any clues on how to do it? I am certain what he is trying to accomplish is capturing credentials, which no user will agree to. IF he put, above the user credential form on his website, "user credentials will be copied into paypal for your convinience", no user in their right mind would allow him to do this and is a serious security risk.

      Maybe allowing him to explain WHY he is doing it before telling him HOW, would be a better path.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1153533]
Approved by Laurent_R
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-29 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found