accessToken값이 필요해서 code 값을 구하는데 null 값이 나옵니다
$url_code = 'https://api.tosspayments.com/v1/brandpay/terms/agree';
$data = ['customerKey' => $customerKey, 'scope'=> '["REGISTER","CARD"]', 'termsId'=> $responsetrtms];
$curl = curl_init($url_code);
curl_setopt_array($curl, [
CURLOPT_POST => TRUE,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_HTTPHEADER => [
'Authorization: Basic' . $credential,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($data)
]);
$response_code = curl_exec($curl); 코드는 이런 습니다
$customerKey, 값은 고객의 아이디로 하고 있습니다
$data = ['customerKey' => $customerKey, 'scope'=> '["REGISTER","CARD"]', 'termsId'=> $responsetrtms];
$curl = curl_init($url_code);
curl_setopt_array($curl, [
CURLOPT_POST => TRUE,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_HTTPHEADER => [
'Authorization: Basic' . $credential,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($data)
]);
$response_code = curl_exec($curl); 코드는 이런 습니다
$customerKey, 값은 고객의 아이디로 하고 있습니다
