AlipayMerchantItemFileUploadRequest.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. class AlipayMerchantItemFileUploadRequest
  8. {
  9. /**
  10. * 文件二进制字节流,最大为4M。
  11. 小程序订单中心场景中,商品图片宽度必须大于 750 px,宽高比建议 4:3 - 1:1 之间,且该场景下仅支持 png、jpg 格式,不支持其他格式图片。
  12. **/
  13. private $fileContent;
  14. /**
  15. * 业务场景描述。
  16. 小程序订单中心场景固定为 SYNC_ORDER。
  17. **/
  18. private $scene;
  19. private $apiParas = array();
  20. private $terminalType;
  21. private $terminalInfo;
  22. private $prodCode;
  23. private $apiVersion="1.0";
  24. private $notifyUrl;
  25. private $returnUrl;
  26. private $needEncrypt=false;
  27. public function setFileContent($fileContent)
  28. {
  29. $this->fileContent = $fileContent;
  30. $this->apiParas["file_content"] = $fileContent;
  31. }
  32. public function getFileContent()
  33. {
  34. return $this->fileContent;
  35. }
  36. public function setScene($scene)
  37. {
  38. $this->scene = $scene;
  39. $this->apiParas["scene"] = $scene;
  40. }
  41. public function getScene()
  42. {
  43. return $this->scene;
  44. }
  45. public function getApiMethodName()
  46. {
  47. return "alipay.merchant.item.file.upload";
  48. }
  49. public function setNotifyUrl($notifyUrl)
  50. {
  51. $this->notifyUrl=$notifyUrl;
  52. }
  53. public function getNotifyUrl()
  54. {
  55. return $this->notifyUrl;
  56. }
  57. public function setReturnUrl($returnUrl)
  58. {
  59. $this->returnUrl=$returnUrl;
  60. }
  61. public function getReturnUrl()
  62. {
  63. return $this->returnUrl;
  64. }
  65. public function getApiParas()
  66. {
  67. return $this->apiParas;
  68. }
  69. public function getTerminalType()
  70. {
  71. return $this->terminalType;
  72. }
  73. public function setTerminalType($terminalType)
  74. {
  75. $this->terminalType = $terminalType;
  76. }
  77. public function getTerminalInfo()
  78. {
  79. return $this->terminalInfo;
  80. }
  81. public function setTerminalInfo($terminalInfo)
  82. {
  83. $this->terminalInfo = $terminalInfo;
  84. }
  85. public function getProdCode()
  86. {
  87. return $this->prodCode;
  88. }
  89. public function setProdCode($prodCode)
  90. {
  91. $this->prodCode = $prodCode;
  92. }
  93. public function setApiVersion($apiVersion)
  94. {
  95. $this->apiVersion=$apiVersion;
  96. }
  97. public function getApiVersion()
  98. {
  99. return $this->apiVersion;
  100. }
  101. public function setNeedEncrypt($needEncrypt)
  102. {
  103. $this->needEncrypt=$needEncrypt;
  104. }
  105. public function getNeedEncrypt()
  106. {
  107. return $this->needEncrypt;
  108. }
  109. }