Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Wee bit of a problem integrating with Paypal

Options
  • 13-03-2007 11:18am
    #1
    Closed Accounts Posts: 333 ✭✭


    Greetings

    Having a wee bit of a problem integrating with Paypal's "website payments standard integration" that hopefully someone might have come across before.

    The website which will be going live this week just sells one product. The integration with Paypal works fine except that the Paypal site does not seem to return any variables back to me. It does return to my site though.

    According to their manual, you can have Paypal return all of the variables that you passed to it back to you using either GET or POST methods. There are two options that you set for this in your outgoing POST:
    (1) "return" - which should contain the URL of your return page - this works fine because it does return to either be success or failure pages.
    (2) "rm" - this option should be set to 0, 1 or 2. Setting it to 0 should force Paypal to return your data back by GET method. Setting it to 2 will use POST method.

    The problem is that neither of the "rm" options seem to work. I'm using PHP to capture both the $_POST and $_GET data but to no avail.


    I am trying to get the variable "item_number" passed back to me. That variable stores the unique order number and I need it to update a separate MySQL database saying that the transaction has either failed or succeeded.

    Any help or suggestions would really be appreciated.

    Cheers

    McGintyMcGoo


Comments

  • Registered Users Posts: 568 ✭✭✭phil


    Use phpinfo() on the page paypal passes back to.

    You can identify the variables Paypal passes back and their values quite easily then.

    Phil.


  • Closed Accounts Posts: 333 ✭✭McGintyMcGoo


    Hi Phil

    I tried that and although it shows me a tonne of information, it does not list any of the variables that I passed to it.

    Can I ask you what your interpretation of the meaning of the RM variable is (see extract below taken from the PayPal manual)?

    RM
    Return method GET or POST: the FORM METHOD used to send data to the URL specified by the return variable after payment completion.
    Note: The rm variable takes effect only if the return variable is also set.
    Default or 0: GET method is used for all Shopping Cart transactions.
    1: GET. The customer's browser is redirected to the return URL by the GET method, and no transaction variables are sent.
    2: POST. The customer's browser is redirected to the return URL by the POST method, and all transaction variables are also posted.


    Firstly, the return variable IS set and I pass the value "2" for RM through to PayPal in the hope of receiving the data backvia the POST method. Although, looking at it again, I may need to pass the value "POST" through instead of "2".

    McGintyMcGoo


Advertisement