카드-결제-수단-삭제
$response = curl_exec($curl);
$err = curl_error($curl);
$response_array = json_decode($response, true);
//var_dump($response_array['cards'][0]['methodKey']);
$url = 'https://api.tosspayments.com/v1/brandpay/payments/methods/card/remove';
$data = ['methodKey' => $response_array['cards'][0]['methodKey']];
$curl = curl_init($url);
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 = curl_exec($curl);
$err = curl_error($curl); 이렇게 코드를 했는데 data
:
code
:
"INVALID_ACCESS_TOKEN"
message
:
"유효하지 않은
$err = curl_error($curl);
$response_array = json_decode($response, true);
//var_dump($response_array['cards'][0]['methodKey']);
$url = 'https://api.tosspayments.com/v1/brandpay/payments/methods/card/remove';
$data = ['methodKey' => $response_array['cards'][0]['methodKey']];
$curl = curl_init($url);
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 = curl_exec($curl);
$err = curl_error($curl); 이렇게 코드를 했는데 data
:
code
:
"INVALID_ACCESS_TOKEN"
message
:
"유효하지 않은
accessToken 입니다." 라 나옵니다 유효하지 않은 `accessToken' 오류 이유를 알수 있을까요 ?