Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Goto page: [-1] 1 - 2

Bottom
URL Query String not working w/FORM GET method - workaround?
  • Posted: 29.11.2005, 02:37
     
    Chestnut
    rank:
    Steering Committee Steering Committee
    registered:
     August 2002
    Status:
    offline
    last visit:
    03.03.08
    Posts:
    1221
    I'm not very up to date with the POST-GET HTML bla bla I admit except that PayPal use the thank you link to "POST" to your site the tx (transaction id)...
    So in my words, I guess that it would probably be like some Paypal dude is using a form with your thank you link in the action param.

    You then get the transaction id via pnVarCleanFromInput and to get the transaction info, you call back PayPal :

    Code

    $req  = "cmd=_notify-synch";
        $req .= "&tx=".$tx_token."&at=".$sellerid;

        $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
        $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
        $header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
        if ($dummymode == 1) {
            $fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr, 30);
        } else {
            $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
        }
    .................................... etc, etc, etc...


    --
    Chestnut !
    Support via Private message won't be answered...
    http://dev.pnconcept.com
    http://www.postnuke-france.org
  • Posted: 29.11.2005, 02:40
     
    nate_02631
    rank:
    Professional Professional
    registered:
     September 2003
    Status:
    offline
    last visit:
    11.04.08
    Posts:
    3055
    Erm... ya lost me...

    Apparantly the donate and shopping cart thank you use different methods - I'll dust off my PayPal Developer account and see if there are any creative solution's there, or if some var can be passed to force a POST vs. GET return...

    Thanks again...

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • Posted: 29.11.2005, 02:52
     
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    26.08.08
    Posts:
    7720
    Nate,

    I'll leave you in Franky's capable hands as he has direct experience with paypal. But one hint maybe to take a look at this code (pncPaypal) as it may give you just the nugde in the right direction you need.

    -Mark
  • Posted: 29.11.2005, 05:01
     
    nate_02631
    rank:
    Professional Professional
    registered:
     September 2003
    Status:
    offline
    last visit:
    11.04.08
    Posts:
    3055
    I think I found it... due to recent changes at PP, the default return method (at least for Shopping Cart) is GET... it can however be overriden with a hidden "rm" variable...

    Code

    <input type="hidden" name="rm" value="2" />

    (1=GET, 2=POST) PayPal's got a bit of updating to do on its site, the "2.5 MB" "integration" guide PDF updated Aug '05 is actually a 7MB guide last updated Nov. '05...

    Will do some further testing, but look for PPC 1.5 later this week or on the weekend!

    Thanks again for everyone's insights...

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • Posted: 29.11.2005, 05:06
     
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    26.08.08
    Posts:
    7720
    Nate,

    Cool - glad you got there in the end. I look forward to seeing the end result.

    -Mark

Goto page: [-1] 1 - 2

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula