셀러 등록 400 에러 문의

.
{
"version": "2022-11-16",
"traceId": "0d7f470b8ff74e07955a1815ff93a47c",
"entityBody": null,
"entityType": null,
"error": {
"code": "INVALID_REQUEST",
"message": "."
}
}

던 PHP .

$requestBody = json_encode([
"refSellerId" => "my-seller-1000001",
"businessType" => "INDIVIDUAL",
"individual" => [
"name" => "",
"email" => "",
"phone" => ""
],
"account" => [
"bankCode" => "020",
"accountNumber" => "",
"holderName" => ""
],
"metadata" => [
"key1" => "value1",
"key2" => "value2"
]
]);
$encryptedRequestBody = $this->encrypt($requestBody, $securityKey);
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tosspayments.com/v2/sellers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_SSL_VERIFYPEER => false, // SSL ()
CURLOPT_POSTFIELDS => $encryptedRequestBody,
CURLOPT_HTTPHEADER => [
"Authorization: Basic $encodedSecret", //
"Content-Type: text/plain",
'TossPayments-api-security-mode: ENCRYPTION'
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
$httpStatusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
Was this page helpful?