img-sup.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * 1.1 商户进件 -> 照片补充
  4. * 接口:/api/v3/tkbs/open_merchant_img_sup
  5. * 请求加密:无 返回解密:无
  6. */
  7. $config = require __DIR__ . '/bootstrap.php';
  8. $api = new \Lakala\OpenAPISDK\V3\Api\LakalaApi($config, \Lakala\OpenAPISDK\V3\Api\EncryptMode::NONE);
  9. $request = new \Lakala\OpenAPISDK\V3\Model\ModelRequest();
  10. $request->setReqData([
  11. 'merchant_no' => '822191070110011',
  12. 'org_code' => JINGJIAN_ORG_CODE,
  13. 'attachments' => [
  14. [
  15. 'img_path' => 'merchant/null/20230616093253148380SHOP_OUTSIDE_IMG.jpg',
  16. 'img_type' => 'SHOP_OUTSIDE_IMG',
  17. 'openplatform_id' => '',
  18. ],
  19. [
  20. 'img_path' => 'merchant/null/20230616093253148380SHOP_INSIDE_IMG.jpg',
  21. 'img_type' => 'SHOP_INSIDE_IMG',
  22. 'openplatform_id' => '',
  23. ],
  24. ],
  25. ]);
  26. try {
  27. $response = $api->tradeApi('/api/v3/tkbs/open_merchant_img_sup', $request);
  28. print_r($response->getRespData());
  29. echo $response->getCode();
  30. print_r($response->getHeaders());
  31. echo $response->getOriginalText();
  32. } catch (\Lakala\OpenAPISDK\V3\ApiException $e) {
  33. echo $e->getMessage();
  34. }