AlipayMarketingMaterialImageUploadRequest.php 3.8 KB

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