AlipayMerchantItemFileUploadRequest.php 2.6 KB

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