supplement-business-license.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * 1.3 商户信息变更 -> 商户变更-添加营业执照
  4. * 接口:/api/v3/tkbs/open_merchant_supplement_business_license_encry
  5. * 请求加密:SM4 返回解密:SM4
  6. */
  7. $config = require __DIR__ . '/bootstrap.php';
  8. $api = new \Lakala\OpenAPISDK\V3\Api\LakalaApi($config, \Lakala\OpenAPISDK\V3\Api\EncryptMode::BOTH);
  9. $request = new \Lakala\OpenAPISDK\V3\Model\ModelRequest();
  10. $request->setReqData([
  11. 'org_code' => JINGJIAN_ORG_CODE,
  12. 'customer_update_basic_dto' => [
  13. 'channel_type' => 'TP_PERSONAL',
  14. 'customer_no' => 100131161,
  15. 'merchant_no' => '8221620701109AZ',
  16. 'mer_blis' => '91150102MA7KUU3C02',
  17. 'mer_blis_name' => '呼和浩特市晓利商业管理有限公司',
  18. 'mer_blis_exp_dt' => '9999-12-31',
  19. 'lar_name' => '宋立杰',
  20. 'lar_idcard' => '211302197009110865',
  21. 'lar_idcard_exp_dt' => '9999-12-31',
  22. 'file_data' => [
  23. ['img_path' => 'merchant/100131161/20241023114918955182ID_CARD_FRONT.jpeg', 'img_type' => 'ID_CARD_FRONT'],
  24. ['img_path' => 'merchant/100131161/20241023114925727893ID_CARD_BEHIND.jpeg', 'img_type' => 'ID_CARD_BEHIND'],
  25. ['img_path' => 'merchant/100131161/20241023114951278116BUSINESS_LICENCE.jpeg', 'img_type' => 'BUSINESS_LICENCE'],
  26. ],
  27. ],
  28. ]);
  29. try {
  30. $response = $api->tradeApi('/api/v3/tkbs/open_merchant_supplement_business_license_encry', $request);
  31. print_r($response->getRespData());
  32. echo $response->getCode();
  33. print_r($response->getHeaders());
  34. echo $response->getOriginalText();
  35. } catch (\Lakala\OpenAPISDK\V3\ApiException $e) {
  36. echo $e->getMessage();
  37. }