Paypal SandBox IPN always returns INVALID

前端 未结 9 1419
予麋鹿
予麋鹿 2020-12-03 08:33

As mentioned in one of the comments in an answer below, I tried following this tutorial. So now I have the following:


The ipn.php file:

9条回答
  •  一整个雨季
    2020-12-03 09:18

    It's a problem with the + character, it often get wrongly fetched so I made that workaround, and it worked for me.

    payment_data = Sat Jun 04 2016 15:11:16 GMT+0200 (CEST)

    foreach ($_POST as $key => $value) {
    if($key !== "payment_date"){
        $req .= '&' . $key . '=' . rawurlencode(html_entity_decode($value, ENT_QUOTES, 'UTF-8'));
    }else{
        $req .= '&' . $key . '=' . rawurlencode(str_replace(array('GMT '),array('GMT+'),$value));
    }}
    

提交回复
热议问题