AlipayMarketingMaterialImageUploadRequest.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <?php
  2. /**
  3. * ALIPAY API: alipay.marketing.material.image.upload request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2023-05-31 16:19:00
  7. */
  8. class AlipayMarketingMaterialImageUploadRequest
  9. {
  10. /**
  11. * 服务商代商户创建投放必选
  12. bussinessType设置为ISV_FOR_MERCHANT。
  13. **/
  14. private $belongMerchantInfo;
  15. /**
  16. * 图片的byte字节数组。图片大小限制为2M
  17. **/
  18. private $fileContent;
  19. /**
  20. * 文件业务标识。
  21. 枚举值
  22. alipay.marketing.activity.delivery.create接口中
  23. delivery_base_info.delivery_material.delivery_single_material.delivery_image
  24. 当delivery_booth_code=PUBLIC_UNION,上传图片接口需指定file_key=PUBLIC_UNION_CHANNEL_PIC。上传图片尺寸600*600,支持格式:png、jpg、jpeg、bmp,大小不超过200kb;
  25. 当delivery_booth_code=PAYMENT_RESULT,上传图片接口需指定file_key=DELIVERY_CHANNEL_PIC。上传图片尺寸600*600,支持格式:png、jpg、jpeg、bmp,大小不超过200kb。
  26. 上传图片更多要求参考文档: https://render.alipay.com/p/c/18tpirlg12e8?operateFrom=BALIPAY
  27. alipay.marketing.activity.ordervoucher.create接口中
  28. voucher_display_info.brand_logo字段,file_key=PROMO_BRAND_LOGO,上传图片尺寸600*600,支持格式:png、jpg、jpeg、bmp,大小不超过2MB
  29. voucher_display_info.voucher_image字段,file_key=PROMO_VOUCHER_IMAGE,上传图片尺寸600*600,支持格式:png、jpg、jpeg、bmp,大小不超过2MB
  30. **/
  31. private $fileKey;
  32. /**
  33. * 商户接入模式
  34. 枚举值
  35. SELF_MODE 商户自接入模式
  36. AGENCY_MODE 服务商代接入模式
  37. **/
  38. private $merchantAccessMode;
  39. private $apiParas = array();
  40. private $terminalType;
  41. private $terminalInfo;
  42. private $prodCode;
  43. private $apiVersion="1.0";
  44. private $notifyUrl;
  45. private $returnUrl;
  46. private $needEncrypt=false;
  47. public function setBelongMerchantInfo($belongMerchantInfo)
  48. {
  49. $this->belongMerchantInfo = $belongMerchantInfo;
  50. $this->apiParas["belong_merchant_info"] = $belongMerchantInfo;
  51. }
  52. public function getBelongMerchantInfo()
  53. {
  54. return $this->belongMerchantInfo;
  55. }
  56. public function setFileContent($fileContent)
  57. {
  58. $this->fileContent = $fileContent;
  59. $this->apiParas["file_content"] = $fileContent;
  60. }
  61. public function getFileContent()
  62. {
  63. return $this->fileContent;
  64. }
  65. public function setFileKey($fileKey)
  66. {
  67. $this->fileKey = $fileKey;
  68. $this->apiParas["file_key"] = $fileKey;
  69. }
  70. public function getFileKey()
  71. {
  72. return $this->fileKey;
  73. }
  74. public function setMerchantAccessMode($merchantAccessMode)
  75. {
  76. $this->merchantAccessMode = $merchantAccessMode;
  77. $this->apiParas["merchant_access_mode"] = $merchantAccessMode;
  78. }
  79. public function getMerchantAccessMode()
  80. {
  81. return $this->merchantAccessMode;
  82. }
  83. public function getApiMethodName()
  84. {
  85. return "alipay.marketing.material.image.upload";
  86. }
  87. public function setNotifyUrl($notifyUrl)
  88. {
  89. $this->notifyUrl=$notifyUrl;
  90. }
  91. public function getNotifyUrl()
  92. {
  93. return $this->notifyUrl;
  94. }
  95. public function setReturnUrl($returnUrl)
  96. {
  97. $this->returnUrl=$returnUrl;
  98. }
  99. public function getReturnUrl()
  100. {
  101. return $this->returnUrl;
  102. }
  103. public function getApiParas()
  104. {
  105. return $this->apiParas;
  106. }
  107. public function getTerminalType()
  108. {
  109. return $this->terminalType;
  110. }
  111. public function setTerminalType($terminalType)
  112. {
  113. $this->terminalType = $terminalType;
  114. }
  115. public function getTerminalInfo()
  116. {
  117. return $this->terminalInfo;
  118. }
  119. public function setTerminalInfo($terminalInfo)
  120. {
  121. $this->terminalInfo = $terminalInfo;
  122. }
  123. public function getProdCode()
  124. {
  125. return $this->prodCode;
  126. }
  127. public function setProdCode($prodCode)
  128. {
  129. $this->prodCode = $prodCode;
  130. }
  131. public function setApiVersion($apiVersion)
  132. {
  133. $this->apiVersion=$apiVersion;
  134. }
  135. public function getApiVersion()
  136. {
  137. return $this->apiVersion;
  138. }
  139. public function setNeedEncrypt($needEncrypt)
  140. {
  141. $this->needEncrypt=$needEncrypt;
  142. }
  143. public function getNeedEncrypt()
  144. {
  145. return $this->needEncrypt;
  146. }
  147. }