혹시 카드관련해서요


private CardRequest card;
@Getter
@Setter
public static class CardRequest {
private String number;
private String issuerCode;
private String acquirerCode;
private String installmentPlanMonths;
private String approveNo;
private String cardType;
private String ownerType;
private String acquireStatus;
private String isInterestFree;
private String interestPayer;
private BigDecimal amount;
}
서 Failed to execute 'json' on 'Response': Unexpected end of JSON input고 issuerCode
?


// Authorization (: )
const token = getCookie('accessToken');
async function confirm() {
const requestData = {
orderId: searchParams.get("orderId"),
amount: searchParams.get("amount"),
paymentKey: searchParams.get("paymentKey"),
};

const response = await fetch("/api/confirm/widget", {
method: "POST",
headers: {
Authorization: Bearer ${token} ,// Authorization
"Content-Type": "application/json",
},
body: JSON.stringify(requestData),
});

const json = await response.json();

if (!response.ok) {
throw { message: json.message, code: json.code };
}

return json;
}

confirm()
.then((data) => {
setResponseData(data);
})
.catch((error) => {
navigate(/fail?code=${error.code}&message=${error.message});
});
}, [searchParams]);
.
Was this page helpful?