将$ _GET变量转换为$ _POST paypal以隐藏返回URL

时间:2015-09-06 07:38:12

标签: php post paypal

我想将$_GET变量转换为$_POST paypal以隐藏返回网址

<?      
    //i want Convert $_GET variables to $_POST paypal to hide return url

    $return = 'http://my site. com/tks.php?id=150';
    $mypost='cmd=_cart&currency_code=USD&business=email@gmail.com&tax_cart=0.00&handling_cart=0.00&charset=utf-8
    &item_name_1=IDM Download Manager(4)&quantity_1=1&amount_1=5.00&item_number_1=1&option_index_0=0&return='.$return;

    // this $mypost will be post to $posted url 
    // i don't want this method $posturl = 'https://www.paypal.com/cgi-bin/webscr?$mypost';

    $posturl = 'https://www.paypal.com/cgi-bin/webscr?';

    header("Location: $posturl");        
?>

1 个答案:

答案 0 :(得分:0)

在客户端使用jQuery并将$return编码为JSON,并使用POST方法类型将其发布到服务器。