Paypal integration using GET instead of POST

Discussion in 'PHP' started by samirkumardas, Oct 29, 2008.

  1. #1
    HI,



    I am trying to integrate paypal using GET method instead of POST. Is it posible to do it? IPN is not working in this case. Code as follows:



    <?php
                  $url = "https://www.sandbox.paypal.com/cgi-bin/webscr";
        $parameters = '?cmd=_xclick&business=samir_1186414131_biz@yahoo.com&invoice=123&currency_code=USD&no_shipping=23423&item_name=test item&item_number=321&amount=232&return=http://www.bdjokes.com&notify_url=http://www.bdjokes.com/register.php';
    
           header("location:$url.$parameters")
    
     ?>
    PHP:

     
    samirkumardas, Oct 29, 2008 IP
  2. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    As far as I know, PayPal's API only takes Post back using, well, the POST method. They also provide good sample PHP code which you can use :)

    Jay
     
    jayshah, Oct 29, 2008 IP
  3. samirkumardas

    samirkumardas Banned

    Messages:
    123
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Actually I am using existing project and it is restricted to use old code. But I found paypal is not working. Could you please tell anyone that is it possible to integrate using GET?

    Thanks
     
    samirkumardas, Oct 29, 2008 IP
  4. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #4
    The above link works fine for me.

    Peace,
     
    Barti1987, Oct 29, 2008 IP