You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

21 lines
891 B

  1. <?php
  2. ini_set('date.timezone','Asia/Shanghai');
  3. require_once '../../Common/Function.php';
  4. $postStr = file_get_contents("php://input");
  5. success_notify(json_encode($postStr));
  6. if (!empty($postStr)){
  7. libxml_disable_entity_loader(true);
  8. $dataArray= (array)simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);
  9. foreach ($dataArray as $key=>$v){
  10. success_notify($key."--".$v);
  11. }
  12. $orderno=$dataArray['out_trade_no'];
  13. $url="http://xmwxc.zhizhuchuxing.cn/core/order_confirm2.asp?orderno=".$orderno;
  14. $result=http_request($url);
  15. success_notify($url."--".$result.'--'.json_encode($result));
  16. $xml="<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>";
  17. echo $xml;
  18. }
  19. function success_notify($result){
  20. file_put_contents('./success_notify.txt', date("Y-m-d H:i:s")." ".$result.PHP_EOL,FILE_APPEND);//订单成功后通知后台日志
  21. }