|
|
@@ -90,7 +90,7 @@ class LakalaOnboardingClient
|
|
|
'raw' => $raw,
|
|
|
];
|
|
|
} catch (\Throwable $e) {
|
|
|
- Yii::error('Lakala onboarding ' . $path . ': ' . $e->getResponseHeaders() . $e->getMessage()); // . $e->getResponseHeaders()
|
|
|
+ Yii::error('Lakala onboarding ' . $path . ': ' . $e->getMessage()); // . $e->getResponseHeaders()
|
|
|
throw new \RuntimeException('拉卡拉接口请求失败:' . $e->getMessage());
|
|
|
}
|
|
|
}
|
|
|
@@ -98,6 +98,14 @@ class LakalaOnboardingClient
|
|
|
public function upload($base64, $imgType, $ocr = false)
|
|
|
{
|
|
|
$base = $base64;
|
|
|
+ $data = [
|
|
|
+ 'file_base64' => $base,
|
|
|
+ 'img_type' => $imgType,
|
|
|
+ //'prefix' => 'reg',
|
|
|
+ 'sourcechnl' => 0,
|
|
|
+ 'is_ocr' => $ocr ? 'true' : 'false',
|
|
|
+ ];
|
|
|
+ Yii::info(json_encode($data));
|
|
|
return $this->call('/api/v3/tkbs/customer/file/upload', [
|
|
|
'file_base64' => $base,
|
|
|
'img_type' => $imgType,
|
|
|
@@ -109,6 +117,8 @@ class LakalaOnboardingClient
|
|
|
|
|
|
public function ocr($batchNo, $imgType)
|
|
|
{
|
|
|
+ $data = ['batch_no' => $batchNo, 'img_type' => $imgType];
|
|
|
+ Yii::info(json_encode($data));
|
|
|
return $this->call('/api/v3/tkbs/ocr_result', ['batch_no' => $batchNo, 'img_type' => $imgType]);
|
|
|
}
|
|
|
|