Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 
 

94 рядки
2.5 KiB

  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Steven
  5. * Date: 2017/3/14
  6. * Time: 18:46
  7. * Ctrip 自助Mapping
  8. */
  9. require_once dirname(__DIR__) . '/Common/Utils.php';
  10. class Api_Mapping extends PhalApi_Api
  11. {
  12. public $obj_utils = '';
  13. public $SupplierID = 77; //供应商编码
  14. public $Brand = 1; //品牌编码
  15. public function __construct()
  16. {
  17. $this->obj_utils = new roomOrderUtils();
  18. }
  19. /**
  20. * User:Steven
  21. *
  22. * Desc:、GetHotelInfo(获得Ctrip的酒店信息)
  23. * 1-1. 接口调用方:合作方
  24. * 1-2. 接口返回方:携程
  25. * 1-3. 调用频率:不限制
  26. * 1-4. 使用说明:合作方获取ctrip的酒店对接信息,用于自助Mapping。 SupplierID或Brand会线下提供
  27. */
  28. public function GetHotelInfo()
  29. {
  30. /*$GetHotelInfoRequest['GetHotelInfoRequest'] = array(
  31. 'SupplierID' => $this->SupplierID, //供应商编码
  32. 'Brand' => $this->Brand,
  33. 'CurrentPage' => ''
  34. );
  35. $res = $this->obj_utils->xml_encode($GetHotelInfoRequest, 'GetHotelInfo');
  36. $GetHotelInfo = $this->obj_utils->soapRequest('GetHotelInfo', $res); //发送soap请求
  37. $result = $this->obj_utils->xml_to_array($GetHotelInfo);*/
  38. //测试
  39. $HotelList[0] = array(
  40. 'Hotel' => 12121,
  41. 'HotelName' => 'casdas',
  42. 'CountryName' => 'sadas',
  43. 'CityName' => 'dsadas',
  44. 'Address' => 'asdasd',
  45. 'Telephone' => 'sadas'
  46. );
  47. $HotelList[1] = array(
  48. 'Hotel' => 'weqeqwewq',
  49. 'HotelName' => 'casdas',
  50. 'CountryName' => 'sadas',
  51. 'CityName' => 'dsadas',
  52. 'Address' => 'asdasd',
  53. 'Telephone' => 'sadas'
  54. );
  55. $GetHotelInfoResponse = array(
  56. 'TotalPage' => 10,
  57. 'CurrentPage' => 1,
  58. 'TotalNum' => 1000,
  59. 'HotelList' => $HotelList,
  60. );
  61. $Response = array(
  62. 'HeaderInfo' => '',
  63. 'GetHotelInfoResponse' => $GetHotelInfoResponse
  64. );
  65. $RequestResponse['RequestResult'] = array(
  66. 'Message' => '',
  67. 'ResultCode' => '',
  68. 'Response' => $Response
  69. );
  70. $result['RequestResponse'] = $RequestResponse;
  71. return $result;
  72. }
  73. /**
  74. * User:Steven
  75. *
  76. * Desc:
  77. */
  78. public function getZzHotelInfo()
  79. {
  80. $domain = new Domain_hotel();
  81. $res=$domain->getHotelInfo();
  82. return $res;
  83. }
  84. }
  85. ?>