카드-결제-수단-삭제

$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
:
"accessToken ." `accessToken' ?
Was this page helpful?