diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 91466d8d..87b1f0a2 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -886,10 +886,9 @@ class Index extends CI_Controller { // APP 组的China Train Booking-开头的订单号 // 发送邮件提醒外联核对收款金额, 不写入收款记录 $if_empty_gai = $this->process_notify_APP($item, $orderid_info); - if($if_empty_gai !== true) { - $this->Note_model->update_send($item->pn_txn_id, 'send', $item->pn_sn); - continue; - } // 收款记录为空, 需要补录 + $send = $if_empty_gai !== true ? 'send-app' : 'sendfail'; + $this->Note_model->update_send($item->pn_txn_id, $send, $item->pn_sn); + continue; } //检测是否是APP订单,默认不处理 @@ -1609,8 +1608,13 @@ class Index extends CI_Controller { { $content = json_decode($item->pn_memo, true); $post_body = http_build_query($content); - $this->async_curl("http://wx.chinatrainbooking.com/paypalend/", $post_body, 5); - return false; + $post_body .= '&appkey=jdfk*$jfjdk1688'; + $app_return = $this->async_curl("http://wx.chinatrainbooking.com/paypalend/", $post_body, 5); + if (intval($app_return)===200) { + return false; // 下一步更新为send + } + return true; // 下一步: sendfail + $advisor_info = $this->Paypal_model->get_order($orderid_info->orderid, false, $orderid_info->ordertype); //查不到订单信息 if (empty($advisor_info)) { @@ -1680,8 +1684,9 @@ class Index extends CI_Controller { if (!in_array(curl_getinfo($ch, CURLINFO_HTTP_CODE),array(0,200)) ) { log_message('error', "Webht Async Curl Call Request html Status Code: ".curl_getinfo($ch, CURLINFO_HTTP_CODE)."; curl url: ".$url); } + $http_ret_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); - return $data; + return $http_ret_code; } }