YopResponse.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. namespace app\common\modules\yop\sdk;
  3. /**
  4. * Created by PhpStorm.
  5. * User: wilson
  6. * Date: 16/7/22
  7. * Time: 15:04
  8. */
  9. class YopResponse{
  10. /**
  11. * 状态(SUCCESS/FAILURE)
  12. */
  13. public $state;
  14. /**
  15. * 业务结果,非简单类型解析后为LinkedHashMap
  16. */
  17. public $result;
  18. /**
  19. * 时间戳
  20. */
  21. public $ts;
  22. /**
  23. * 结果签名,签名算法为Request指定算法,示例:SHA(<secret>stringResult<secret>)
  24. */
  25. public $sign;
  26. /**
  27. * 错误信息
  28. */
  29. public $error;
  30. /**
  31. * 字符串形式的业务结果
  32. */
  33. public $stringResult;
  34. /**
  35. * 响应格式,冗余字段,跟Request的format相同,用于解析结果
  36. */
  37. public $format;
  38. /**
  39. * 业务结果签名是否合法,冗余字段
  40. */
  41. public $validSign;
  42. public $verSign;
  43. public function __set($name, $value){
  44. // TODO: Implement __set() method.
  45. $this->$name = $value;
  46. }
  47. public function __get($name){
  48. // TODO: Implement __get() method.
  49. return $this->$name;
  50. }
  51. }